diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-07 16:17:29 +0200 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-07 16:18:32 +0200 |
commit | 2346ae167568bb9e5d247da0b946067b7f9aad48 (patch) | |
tree | f3a975711bcd223f4d6803caa5b53c080bb68819 /qmake/generators | |
parent | 5dd2713c8ba98e06ae5c4f3da44b2ed73121d247 (diff) | |
parent | 730bc064a070e886e10950ccfd59780e8976f5fd (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/makefile.cpp | 18 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 1 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 13 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 8 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 11 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 12 |
6 files changed, 28 insertions, 35 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index a8ae84a4e2..766904cd60 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2203,6 +2203,24 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) } bool +MakefileGenerator::writeDummyMakefile(QTextStream &t) +{ + if (project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) + return false; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; + const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); + for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) + t << *it << " "; + t << "first all clean install distclean uninstall qmake_all:\n\t" + << "@echo \"Some of the required modules (" + << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" + << "@echo \"Skipped.\"\n\n"; + writeMakeQmake(t); + t << "FORCE:\n\n"; + return true; +} + +bool MakefileGenerator::writeStubMakefile(QTextStream &t) { t << "QMAKE = " << var("QMAKE_QMAKE") << endl; diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 47acc8098f..09327c599c 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -104,6 +104,7 @@ protected: void writeExtraTargets(QTextStream &t); void writeExtraCompilerTargets(QTextStream &t); void writeExtraCompilerVariables(QTextStream &t); + bool writeDummyMakefile(QTextStream &t); virtual bool writeStubMakefile(QTextStream &t); virtual bool writeMakefile(QTextStream &t); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index cd6f441472..2373059f79 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -80,19 +80,8 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t) { writeHeader(t); - if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; - const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); - for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) - t << *it << " "; - t << "first all clean install distclean uninstall qmake_all:\n\t" - << "@echo \"Some of the required modules (" - << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" - << "@echo \"Skipped.\"\n\n"; - writeMakeQmake(t); - t << "FORCE:\n\n"; + if (writeDummyMakefile(t)) return true; - } if (project->values("TEMPLATE").first() == "app" || project->values("TEMPLATE").first() == "lib" || diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 38e6c56bb5..29b27cb7d7 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -114,14 +114,8 @@ bool MingwMakefileGenerator::findLibraries() bool MingwMakefileGenerator::writeMakefile(QTextStream &t) { writeHeader(t); - if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - t << "all clean:\n\t" - << "@echo \"Some of the required modules (" - << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" - << "@echo \"Skipped.\"\n\n"; - writeMakeQmake(t); + if (writeDummyMakefile(t)) return true; - } if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib" || diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 8af80e572e..f7b85d3621 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -58,17 +58,8 @@ bool NmakeMakefileGenerator::writeMakefile(QTextStream &t) { writeHeader(t); - if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); - for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) - t << *it << " "; - t << "all first clean:\n\t" - << "@echo \"Some of the required modules (" - << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"\n\t" - << "@echo \"Skipped.\"\n\n"; - writeMakeQmake(t); + if (writeDummyMakefile(t)) return true; - } if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib" || diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 8c25ab6f9b..d6d40bcc68 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2311,7 +2311,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) inputs += Option::fixPathToTargetOS(file, false); } } - deps += inputs; // input files themselves too.. + deps = inputs + deps; // input files themselves too.. // Replace variables for command w/all input files // ### join gives path issues with directories containing spaces! @@ -2319,7 +2319,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) inputs.join(' '), out); } else { - deps += inFile; // input file itself too.. + deps.prepend(inFile); // input file itself too.. cmd = Project->replaceExtraCompilerVariables(tmp_cmd, inFile, out); @@ -2356,14 +2356,14 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) deps += CustomBuildTool.AdditionalDependencies; // Make sure that all deps are only once - QHash<QString, bool> uniqDeps; + QStringList uniqDeps; for (int c = 0; c < deps.count(); ++c) { QString aDep = deps.at(c).trimmed(); if (!aDep.isEmpty()) - uniqDeps[aDep] = false; + uniqDeps << aDep; } - CustomBuildTool.AdditionalDependencies = uniqDeps.keys(); - CustomBuildTool.AdditionalDependencies.sort(); + uniqDeps.removeDuplicates(); + CustomBuildTool.AdditionalDependencies = uniqDeps; } // Ensure that none of the output files are also dependencies. Or else, the custom buildstep |