From 6b4f2f755671843e794b15ef795524816b9ffc4a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 10 Jul 2018 21:04:48 +0200 Subject: 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 --- qmake/generators/win32/msvc_nmake.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qmake/generators/win32/msvc_nmake.cpp') 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; -- cgit v1.2.3