Skip to content

Commit

Permalink
Remove references to Borland and bmake
Browse files Browse the repository at this point in the history
Remove references to an old compiler that has not been
supported for a long time.  Also remove Borland specific
configuration flags which have no meaning elsewhere.

Change-Id: I3634a52b78f737ea972073e14c2b6669dcd0ae63
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
Andy Shaw authored and Qt by Nokia committed Aug 1, 2012
1 parent a992a12 commit 44a7330
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 380 deletions.
7 changes: 2 additions & 5 deletions qmake/Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ QMKSRC = $(SOURCE_PATH)/qmake
OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \
mingw_make.o option.o winmakefile.o projectgenerator.o \
meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
borland_bmake.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o \
msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o \
gbuild.o cesdkhandler.o

#qt code
Expand All @@ -35,7 +35,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge
generators/unix/unixmake.cpp generators/win32/winmakefile.cpp generators/projectgenerator.cpp \
generators/mac/pbuilder_pbx.cpp generators/mac/xmloutput.cpp generators/metamakefile.cpp \
generators/makefiledeps.cpp option.cpp generators/win32/mingw_make.cpp generators/makefile.cpp \
generators/win32/msvc_vcproj.cpp generators/win32/msvc_vcxproj.cpp generators/win32/msvc_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp generators/win32/msvc_nmake.cpp generators/win32/borland_bmake.cpp \
generators/win32/msvc_vcproj.cpp generators/win32/msvc_vcxproj.cpp generators/win32/msvc_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp generators/win32/msvc_nmake.cpp \
generators/integrity/gbuild.cpp generators/win32/cesdkhandler.cpp \
$(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp \
$(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(SOURCE_PATH)/src/corelib/io/qfile.cpp \
Expand Down Expand Up @@ -139,9 +139,6 @@ unixmake2.o: $(QMKSRC)/generators/unix/unixmake2.cpp
winmakefile.o: $(QMKSRC)/generators/win32/winmakefile.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

borland_bmake.o: $(QMKSRC)/generators/win32/borland_bmake.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

mingw_make.o: $(QMKSRC)/generators/win32/mingw_make.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<

Expand Down
2 changes: 1 addition & 1 deletion qmake/Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ADDCLEAN = vc60.pdb vc70.pdb qmake.pdb qmake.ilk
OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \
borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \
msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \
msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj \
gbuild.obj cesdkhandler.obj

Expand Down
2 changes: 1 addition & 1 deletion qmake/Makefile.win32-g++
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ADDCLEAN =
OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
option.o winmakefile.o projectgenerator.o property.o meta.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \
msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \
msvc_objectmodel.o msbuild_objectmodel.o registry.o gbuild.o \
cesdkhandler.o

Expand Down
139 changes: 36 additions & 103 deletions qmake/generators/makefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
t << " " << escapeDependencyPath(targ);
}
}
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << "\n\t";
t << " FORCE\n\t";
const QStringList &dirs = project->values(pvar);
for(QStringList::ConstIterator pit = dirs.begin(); pit != dirs.end(); ++pit) {
QString tmp_dst = fileFixify((*pit), FileFixifyAbsolute, false);
Expand All @@ -1349,12 +1347,8 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
}
t << target << endl << endl;
if(!uninst.isEmpty()) {
t << "uninstall_" << (*it) << ": ";
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << "\n\t"
<< uninst.join(" ") << "\n\t"
<< "-$(DEL_DIR) " << filePrefixRoot(root, dst) << " " << endl << endl;
t << "uninstall_" << (*it) << ": FORCE\n\t" << uninst.join(" ")
<< "\n\t-$(DEL_DIR) " << filePrefixRoot(root, dst) << " " << endl << endl;
}
t << endl;

Expand All @@ -1367,14 +1361,9 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
debug_msg(1, "no definition for install %s: install target not created",(*it).toLatin1().constData());
}
}
t << "install: " << var("INSTALLDEPS") << " " << all_installs;
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << "\n\n";
t << "uninstall: " << all_uninstalls << " " << var("UNINSTALLDEPS");
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << "\n\n";
t << "install: " << var("INSTALLDEPS") << " " << all_installs
<< " FORCE\n\nuninstall: " << all_uninstalls << " " << var("UNINSTALLDEPS")
<< " FORCE\n\n";
}

QString
Expand Down Expand Up @@ -1743,9 +1732,8 @@ MakefileGenerator::writeExtraTargets(QTextStream &t)
}
if(project->values((*it) + ".CONFIG").indexOf("fix_target") != -1)
targ = fileFixify(targ, Option::output_dir, Option::output_dir);
if(project->isEmpty("QMAKE_NOFORCE") &&
project->values((*it) + ".CONFIG").indexOf("phony") != -1)
deps += QString(" ") + "FORCE";
if (project->values((*it) + ".CONFIG").indexOf("phony") != -1)
deps += QLatin1String(" FORCE");
t << escapeDependencyPath(targ) << ":" << deps;
if(!cmd.isEmpty())
t << "\n\t" << cmd;
Expand Down Expand Up @@ -2115,8 +2103,7 @@ MakefileGenerator::writeStubMakefile(QTextStream &t)
t << "first all clean install distclean uninstall: " << "qmake" << endl
<< "qmake_all:" << endl;
writeMakeQmake(t);
if(project->isEmpty("QMAKE_NOFORCE"))
t << "FORCE:" << endl << endl;
t << "FORCE:" << endl << endl;
return true;
}

Expand All @@ -2130,8 +2117,7 @@ MakefileGenerator::writeMakefile(QTextStream &t)
t << "####### Install" << endl << endl;
writeInstalls(t, "INSTALLS");

if(project->isEmpty("QMAKE_NOFORCE"))
t << "FORCE:" << endl << endl;
t << "FORCE:" << endl << endl;
return true;
}

Expand Down Expand Up @@ -2338,17 +2324,15 @@ MakefileGenerator::writeSubDirs(QTextStream &t)
}

void MakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix,
const QString &makeArguments, const QString &callPostfix)
const QString &makeArguments)
{
t << callPrefix
<< "$(MAKE)" << makeArguments
<< callPostfix << endl;
t << callPrefix << "$(MAKE)" << makeArguments << endl;
}

void
MakefileGenerator::writeSubTargetCall(QTextStream &t,
const QString &in_directory, const QString &in, const QString &out_directory, const QString &out,
const QString &out_directory_cdin, const QString &makefilein, const QString &out_directory_cdout)
const QString &out_directory_cdin, const QString &makefilein)
{
QString pfx;
if (!in.isEmpty()) {
Expand All @@ -2358,7 +2342,7 @@ MakefileGenerator::writeSubTargetCall(QTextStream &t,
+ "$(QMAKE) " + in + buildArgs(in_directory) + " -o " + out
+ " ) && ";
}
writeSubMakeCall(t, out_directory_cdin + pfx, makefilein, out_directory_cdout);
writeSubMakeCall(t, out_directory_cdin + pfx, makefilein);
}

void
Expand Down Expand Up @@ -2419,30 +2403,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
if(!abs_source_path.isEmpty() && out_directory.startsWith(abs_source_path))
out_directory = Option::output_dir + out_directory.mid(abs_source_path.length());

#define MAKE_CD_IN_AND_OUT(directory) \
if(!directory.isEmpty()) { \
if(project->isActiveConfig("cd_change_global")) { \
directory ## _cdin = "\n\tcd " + directory + "\n\t"; \
QDir pwd(Option::output_dir); \
QStringList in = directory.split(Option::dir_sep), out; \
for(int i = 0; i < in.size(); i++) { \
if(in.at(i) == "..") \
out.prepend(fileInfo(pwd.path()).fileName()); \
else if(in.at(i) != ".") \
out.prepend(".."); \
pwd.cd(in.at(i)); \
} \
directory ## _cdout = "\n\t@cd " + out.join(Option::dir_sep); \
} else { \
directory ## _cdin = "\n\tcd " + directory + " && "; \
} \
} else { \
directory ## _cdin = "\n\t"; \
}

QString out_directory_cdin, out_directory_cdout;
MAKE_CD_IN_AND_OUT(out_directory);

QString out_directory_cdin = out_directory.isEmpty() ? "\n\t"
: "\n\tcd " + out_directory + " && ";
QString makefilein = " -f " + subtarget->makefile;

//qmake it
Expand All @@ -2461,19 +2423,14 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
if (!subtarget->depends.isEmpty())
t << valGlue(subtarget->depends, QString(), "-qmake_all ", "-qmake_all");
}
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << "\n\t";
t << " FORCE\n\t";
if(!in_directory.isEmpty()) {
t << mkdir_p_asstring(out_directory)
<< out_directory_cdin
<< "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
<< out_directory_cdout;
} else {
t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out;
<< out_directory_cdin;
}
t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out;
if (!dont_recurse)
writeSubMakeCall(t, out_directory_cdin, makefilein + " qmake_all", out_directory_cdout);
writeSubMakeCall(t, out_directory_cdin, makefilein + " qmake_all");
else
t << endl;
}
Expand All @@ -2482,10 +2439,9 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << subtarget->target << ":";
if(!subtarget->depends.isEmpty())
t << " " << valList(subtarget->depends);
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << " FORCE";
writeSubTargetCall(t, in_directory, in, out_directory, out,
out_directory_cdin, makefilein, out_directory_cdout);
out_directory_cdin, makefilein);
}

for(int suffix = 0; suffix < targetSuffixes.size(); ++suffix) {
Expand All @@ -2501,19 +2457,17 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << subtarget->target << "-" << targetSuffixes.at(suffix) << "-ordered:";
if(target)
t << " " << targets.at(target-1)->target << "-" << targetSuffixes.at(suffix) << "-ordered ";
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << " FORCE";
writeSubTargetCall(t, in_directory, in, out_directory, out,
out_directory_cdin, makefilein + " " + s, out_directory_cdout);
out_directory_cdin, makefilein + " " + s);
}
t << subtarget->target << "-" << targetSuffixes.at(suffix) << ":";
if(!subtarget->depends.isEmpty())
t << " " << valGlue(subtarget->depends, QString(), "-" + targetSuffixes.at(suffix) + " ",
"-"+targetSuffixes.at(suffix));
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << " FORCE";
writeSubTargetCall(t, in_directory, in, out_directory, out,
out_directory_cdin, makefilein + " " + s, out_directory_cdout);
out_directory_cdin, makefilein + " " + s);
}
}
t << endl;
Expand All @@ -2528,11 +2482,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << " " << (*it)->target << "-" << "qmake_all";
}
}
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
if(project->isActiveConfig("no_empty_targets"))
t << "\n\t" << "@cd .";
t << endl << endl;
t << " FORCE" << endl << endl;
}

for(int s = 0; s < targetSuffixes.size(); ++s) {
Expand Down Expand Up @@ -2560,18 +2510,14 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << varGlue("ALL_DEPS"," "," ","");
if(suffix == "clean")
t << varGlue("CLEAN_DEPS"," "," ","");
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << endl;
t << " FORCE" << endl;
if(suffix == "clean") {
t << fileVarGlue("QMAKE_CLEAN", "\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "\n");
} else if(suffix == "distclean") {
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
if(!ofile.isEmpty())
t << "\t-$(DEL_FILE) " << ofile << endl;
t << fileVarGlue("QMAKE_DISTCLEAN", "\t-$(DEL_FILE) ", " ", "\n");
} else if(project->isActiveConfig("no_empty_targets")) {
t << "\t" << "@cd ." << endl;
}
}

Expand Down Expand Up @@ -2613,9 +2559,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
if(!recurse.contains(subtarget->name))
continue;

QString out_directory_cdin, out_directory_cdout;
MAKE_CD_IN_AND_OUT(out_directory);

QString out_directory_cdin = out_directory.isEmpty() ? "\n\t"
: "\n\tcd " + out_directory + " && ";
QString makefilein = " -f " + subtarget->makefile;

QString out;
Expand Down Expand Up @@ -2648,11 +2593,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT

//write the commands
writeSubTargetCall(t, in_directory, in, out_directory, out,
out_directory_cdin, makefilein + " " + sub_targ, out_directory_cdout);
out_directory_cdin, makefilein + " " + sub_targ);
}
}
if(project->isEmpty("QMAKE_NOFORCE") &&
project->values((*qut_it) + ".CONFIG").indexOf("phony") != -1)
if (project->values((*qut_it) + ".CONFIG").indexOf("phony") != -1)
deps += " FORCE";
t << targ << ":" << deps << "\n";
if(!cmd.isEmpty())
Expand All @@ -2664,9 +2608,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
project->values("UNINSTALLDEPS") += "uninstall_subtargets";
writeInstalls(t, "INSTALLS", true);
}

if(project->isEmpty("QMAKE_NOFORCE"))
t << "FORCE:" << endl << endl;
t << "FORCE:" << endl << endl;
}

void
Expand Down Expand Up @@ -2704,18 +2646,9 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
}
}
if(project->first("QMAKE_ORIG_TARGET") != "qmake") {
t << "qmake:";
if(project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
t << "\n\t" << "@" << qmake << endl << endl;
if (!noDummyQmakeAll) {
t << "qmake_all:";
if (project->isEmpty("QMAKE_NOFORCE"))
t << " FORCE";
if (project->isActiveConfig("no_empty_targets"))
t << "\n\t" << "@cd .";
t << endl << endl;
}
t << "qmake: FORCE\n\t@" << qmake << endl << endl;
if (!noDummyQmakeAll)
t << "qmake_all: FORCE" << endl << endl;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions qmake/generators/makefile.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ class MakefileGenerator : protected QMakeSourceFileInfo
QList<MakefileGenerator::SubTarget*> findSubDirsSubTargets() const;
void writeSubTargetCall(QTextStream &t,
const QString &in_directory, const QString &in, const QString &out_directory, const QString &out,
const QString &out_directory_cdin, const QString &makefilein, const QString &out_directory_cdout);
const QString &out_directory_cdin, const QString &makefilein);
virtual void writeSubMakeCall(QTextStream &t, const QString &outDirectory_cdin,
const QString &makeFileIn, const QString &outDirectory_cdout);
const QString &makeFileIn);
void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags);

//extra compiler interface
Expand Down
4 changes: 0 additions & 4 deletions qmake/generators/metamakefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include "projectgenerator.h"
#include "pbuilder_pbx.h"
#include "msvc_nmake.h"
#include "borland_bmake.h"
#include "msvc_vcproj.h"
#include "msvc_vcxproj.h"
#include "gbuild.h"
Expand Down Expand Up @@ -461,8 +460,6 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
mkfile = new VcxprojGenerator;
else
mkfile = new NmakeMakefileGenerator;
} else if(gen == "BMAKE") {
mkfile = new BorlandMakefileGenerator;
} else if(gen == "GBUILD") {
mkfile = new GBuildMakefileGenerator;
} else {
Expand Down Expand Up @@ -496,5 +493,4 @@ MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &na

#endif // QT_QMAKE_PARSER_ONLY


QT_END_NAMESPACE
3 changes: 1 addition & 2 deletions qmake/generators/unix/unixmake2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
<< var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
<< "@echo \"Skipped.\"" << endl << endl;
writeMakeQmake(t);
if(project->isEmpty("QMAKE_NOFORCE"))
t << "FORCE:" << endl << endl;
t << "FORCE:" << endl << endl;
return true;
}

Expand Down
Loading

0 comments on commit 44a7330

Please sign in to comment.