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>
This commit is contained in:
parent
de39c3bcdd
commit
6a9f38a11d
@ -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();
|
||||
|
@ -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")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user