diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-02-01 10:54:30 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2019-02-04 08:10:25 +0000 |
commit | 29d5a287abc3d3c9b75619db18042dea66236cb3 (patch) | |
tree | 2f9dfb27b1004818f96d010cc8cc22d13bf80cbe /qmake/generators/makefile.cpp | |
parent | 3bf895c8d52a4172cd29ab8a8121e37ec790c47d (diff) |
Make the Makefile a dependency of default targets for nmake
If the user changes the .pro file, the Makefile is supposed to be
re-generated by calling qmake again. NMake however lacks a "Makefile
remake feature" like GNU make has.
The generated Makefiles for nmake however have already a proper
Makefile target that can be used to re-generate the Makefile. What was
missing is the dependency from an entry-target in the meta-Makefile.
Now changes in the .pro file trigger a re-generation of
Makefile.Debug/Makefile.Release when calling nmake without target
arguments or with "debug" or "release".
Fixes: QTBUG-29193
Change-Id: I9f2dd5deba4a043ab6c9502bb0b0ba83dc843612
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f824f12bce..6a46df1af6 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2585,6 +2585,9 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT { //actually compile t << subtarget->target << ":"; + auto extraDeps = extraSubTargetDependencies(); + if (!extraDeps.isEmpty()) + t << " " << valList(extraDeps); if(!subtarget->depends.isEmpty()) t << " " << valList(subtarget->depends); t << " FORCE"; |