summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_nmake.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-07-10 21:04:48 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-07-16 15:44:44 +0000
commit6b4f2f755671843e794b15ef795524816b9ffc4a (patch)
tree325ed1391bda768b6a8a44786f710deb8da6957d /qmake/generators/win32/msvc_nmake.cpp
parent7a33f49e15fd5bd1e5f599f85179b15a90a1684d (diff)
qmake: get rid of (some) makefile expansions in dependency paths
the variables are quoted correctly for commands, which is incompatible with quoting for dependencies under mingw. so insert the paths as literals, where we can control quoting. this fixes building in directories with spaces, which i broke in 7c34e0a7b by using different quoting styles for deps and commands in the first place. this breaks the hypothetical use case where somebody wants to override TARGET or DESTDIR (or DESTDIR_TARGET under windows) on the *make* command line. not sure why anyone would do that - just do it at the *qmake* level. we did not get rid of OBJECTS, because that would cause significant duplication in the makefile (not that it would matter too much, given the dependency lists ...). this isn't a problem, because these are short relative paths which are not expected to contain "funny" characters. an alternative would have been to change the variables' quoting and eliminate them from the commands instead, but that would be backwards-incompatible, because commands are "user-servicable". for the same reason, we cannot get rid of the variables entirely. Change-Id: Ic7592c7fc67d8b7d2b64de80808365cd1c3f79d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators/win32/msvc_nmake.cpp')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 92b4eb5054..a1e3c08a7e 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -584,8 +584,9 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
t << "first: all\n";
t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName()))
- << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n";
- t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
+ << ' ' << depVar("ALL_DEPS") << ' ' << depVar("DEST_TARGET") << "\n\n";
+ t << depVar("DEST_TARGET") << ": "
+ << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS");
if (templateName == "aux") {
t << "\n\n";
return;