summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-12-02 19:53:47 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-20 17:49:20 +0000
commitfe11d175b10061a09a303f462787c49d4aa12687 (patch)
tree08cb68f2435f160e07146c182129f08f1474aec9 /qmake
parentcd0304b7f08731faea4ef698b3b7b82809af582d (diff)
unbreak "aux" template for mingw & msvc, take 3
eliminating everying TARGET-related was a nice try, but in the real world (e.g., qttranslations), extra compilers are activated by PRE_TARGETDEPS, which of course doesn't work when TARGET is entirely gone. so instead, let it act as a phony target. this is consistent with the unix generator. supersedes 0810d48bc in amending af2847260. Task-number: QTBUG-57423 Task-number: QTBUG-58000 Change-Id: I3d2ecc4ff42b37ffe5f71f5c20d17c06b31f4da2 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 019c932ca9bf7c274fd8a402c2af200b5b0cbc59) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/mingw_make.cpp6
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp5
-rw-r--r--qmake/generators/win32/winmakefile.cpp3
3 files changed, 8 insertions, 6 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 92c6f35817..96fd24cd31 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -313,13 +313,13 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
{
t << "first: all\n";
t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName()))
- << ' ' << depVar("ALL_DEPS");
+ << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n";
+ t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
if (project->first("TEMPLATE") == "aux") {
t << "\n\n";
return;
}
- t << " $(DESTDIR_TARGET)\n\n";
- t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
+
if(!project->isEmpty("QMAKE_PRE_LINK"))
t << "\n\t" <<var("QMAKE_PRE_LINK");
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 8f70be4665..337b957e32 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -552,13 +552,12 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
t << "first: all\n";
t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName()))
- << ' ' << depVar("ALL_DEPS");
+ << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n";
+ t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
if (templateName == "aux") {
t << "\n\n";
return;
}
- t << " $(DESTDIR_TARGET)\n\n";
- t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
if(!project->isEmpty("QMAKE_PRE_LINK"))
t << "\n\t" <<var("QMAKE_PRE_LINK");
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index ec66efd1cb..714f941550 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -170,6 +170,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
void Win32MakefileGenerator::processVars()
{
+ if (project->first("TEMPLATE").endsWith("aux"))
+ return;
+
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
if (project->isEmpty("QMAKE_PROJECT_NAME"))
project->values("QMAKE_PROJECT_NAME") = project->values("QMAKE_ORIG_TARGET");