From 5b05c37845887c275c8b076505f536bc42edf099 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 Nov 2016 19:40:33 +0100 Subject: qmake: fix up dist targets for mingw & nmake somewhat actually pack the extra compilers' input files, not the variable names. unlike on unix, we don't create an actual distdir, so the package is still going to be rather broken. Change-Id: If0a15bbe9db95aebd88c2a21ca3c0f787ce5c7e1 Reviewed-by: Joerg Bornemann --- qmake/generators/win32/winmakefile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qmake/generators') diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index ccf6457048..26e1901f8b 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -608,8 +608,10 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS"); for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) { const ProStringList &inputs = project->values(ProKey(*it + ".input")); - for (ProStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) - t << escapeFilePath(*input) << ' '; + for (ProStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) { + const ProStringList &val = project->values((*input).toKey()); + t << escapeFilePaths(val).join(' ') << ' '; + } } } t << endl << endl; -- cgit v1.2.3 From 0810d48bc4cb820c0cba982a2ec392058eccd466 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 Nov 2016 19:05:54 +0100 Subject: unbreak "aux" template for mingw & msvc, take 2 of course, we should stub out everything related to TARGET - only the generic "all" and "first" targets including their deps should be emitted. amends af2847260. Change-Id: I8ed7a550b8022c69328d2e16dbd078928d176964 Reviewed-by: Joerg Bornemann --- qmake/generators/win32/mingw_make.cpp | 9 +++++++-- qmake/generators/win32/msvc_nmake.cpp | 9 +++++++-- qmake/generators/win32/winmakefile.cpp | 18 ++++++++++-------- 3 files changed, 24 insertions(+), 12 deletions(-) (limited to 'qmake/generators') diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 8c315e0696..92c6f35817 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -313,7 +313,12 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) { t << "first: all\n"; t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) - << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n"; + << ' ' << depVar("ALL_DEPS"); + 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" <first("TEMPLATE") != "aux") { + } else { t << "\n\t$(LINKER) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) " << objectsLinkLine << " $(LIBS)"; } if(!project->isEmpty("QMAKE_POST_LINK")) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 41bec4c36d..8f70be4665 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -552,7 +552,12 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "first: all\n"; t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) - << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n"; + << ' ' << depVar("ALL_DEPS"); + 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")) @@ -561,7 +566,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "\n\t$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n\t " << "$(OBJECTS)" << "\n<<"; - } else if (templateName != "aux") { + } else { const bool embedManifest = ((templateName == "app" && project->isActiveConfig("embed_manifest_exe")) || (templateName == "lib" && project->isActiveConfig("embed_manifest_dll") && !(project->isActiveConfig("plugin") && project->isActiveConfig("no_plugin_manifest")) diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 26e1901f8b..ec66efd1cb 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -575,16 +575,18 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "####### Build rules\n\n"; writeBuildRulesPart(t); - if(project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) { - const ProStringList &dlldirs = project->values("DLLDESTDIR"); - for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { - t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) " - << escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl; + if (project->first("TEMPLATE") != "aux") { + if (project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) { + const ProStringList &dlldirs = project->values("DLLDESTDIR"); + for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { + t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) " + << escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl; + } } - } - t << endl; + t << endl; - writeRcFilePart(t); + writeRcFilePart(t); + } writeMakeQmake(t); -- cgit v1.2.3