diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-08-23 17:39:33 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-08-25 11:55:32 +0000 |
commit | 6a9f38a11d56bb3ba6ec59955f3220627c0d30b6 (patch) | |
tree | a76a61d23fa76e7e6272f626a97eaf055decee66 /qmake | |
parent | de39c3bcdd850e944bd0e9d79881a7ac708f406b (diff) |
fix argument order in recursive qmake invocations
the inherited arguments may contain the '--' argument, which turns
additional arguments into configure arguments. the simplest fix for
that is injecting additional arguments at the front, not at the end.
Change-Id: I7cc00a42f0148e5ccbbeda2ad59fa8c63749f02d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/makefile.cpp | 12 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 11b1c8329d..5d7700ec82 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2269,9 +2269,6 @@ QString MakefileGenerator::build_args() { QString ret = "$(QMAKE)"; - // general options and arguments - ret += buildArgs(); - //output QString ofile = fileFixify(Option::output.fileName()); if(!ofile.isEmpty() && ofile != project->first("QMAKE_MAKEFILE")) @@ -2280,6 +2277,9 @@ QString MakefileGenerator::build_args() //inputs ret += " " + escapeFilePath(fileFixify(project->projectFile())); + // general options and arguments + ret += buildArgs(); + return ret; } @@ -2442,7 +2442,7 @@ MakefileGenerator::writeSubTargetCall(QTextStream &t, if (!in_directory.isEmpty()) t << "\n\t" << mkdir_p_asstring(out_directory); pfx = "( " + chkexists.arg(out) + - + " $(QMAKE) " + in + buildArgs() + " -o " + out + + " $(QMAKE) -o " + out + ' ' + in + buildArgs() + " ) && "; } writeSubMakeCall(t, out_directory_cdin + pfx, makefilein); @@ -2513,7 +2513,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT t << mkdir_p_asstring(out_directory) << out_directory_cdin; } - t << "$(QMAKE) " << in << buildArgs() << " -o " << out; + t << "$(QMAKE) -o " << out << ' ' << in << buildArgs(); if (!dont_recurse) writeSubMakeCall(t, out_directory_cdin, makefilein + " qmake_all"); else @@ -2710,7 +2710,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { QStringList files = escapeFilePaths(fileFixify(Option::mkfile::project_files)); t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t" - << "@$(QMAKE) -prl " << buildArgs() << " " << files.join(' ') << endl; + << "@$(QMAKE) -prl " << files.join(' ') << ' ' << buildArgs() << endl; } QString qmake = build_args(); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index c53393e268..d437a0782b 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -731,7 +731,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if(!meta_files.isEmpty()) t << escapeDependencyPaths(meta_files).join(" ") << ": \n\t" - << "@$(QMAKE) -prl " << buildArgs() << ' ' << escapeFilePath(project->projectFile()) << endl; + << "@$(QMAKE) -prl " << escapeFilePath(project->projectFile()) << ' ' << buildArgs() << endl; } if (!project->isEmpty("QMAKE_BUNDLE")) { |