summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-03 19:10:14 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-06 20:09:18 +0000
commit34cc41d8a17e6e30f01f22c5d382c28d49ae37e1 (patch)
tree1bb4b6623d8a16ae37bfb99c05b176781b733170 /qmake/generators
parent52d64fca662d0e488801fc40dffdc0a732cfdbd5 (diff)
don't pass qmake configure arguments to sub-projects
the arguments after '--' are by definition meant only for the top-level project, as that's where configure is invoked from. passing them to sub-projects just adds noise to the make output and misleads users. note that this specifically does not support qmake -r, which will break if the subprojects rely on the arguments being absent. this isn't a problem, because the qt build doesn't support qmake -r anyway. Change-Id: I7ecff6212ce3137526005fc324a4a7ae45e3345e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp15
-rw-r--r--qmake/generators/makefile.h2
-rw-r--r--qmake/generators/unix/unixmake2.cpp2
3 files changed, 12 insertions, 7 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 1ba2587bd0..2845888dde 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2254,12 +2254,17 @@ MakefileGenerator::writeDefaultVariables(QTextStream &t)
t << "MOVE = " << var("QMAKE_MOVE") << endl;
}
-QString MakefileGenerator::buildArgs()
+QString MakefileGenerator::buildArgs(bool withExtra)
{
QString ret;
for (const QString &arg : qAsConst(Option::globals->qmake_args))
ret += " " + shellQuote(arg);
+ if (withExtra && !Option::globals->qmake_extra_args.isEmpty()) {
+ ret += " --";
+ for (const QString &arg : qAsConst(Option::globals->qmake_extra_args))
+ ret += " " + shellQuote(arg);
+ }
return ret;
}
@@ -2278,7 +2283,7 @@ QString MakefileGenerator::build_args()
ret += " " + escapeFilePath(fileFixify(project->projectFile()));
// general options and arguments
- ret += buildArgs();
+ ret += buildArgs(true);
return ret;
}
@@ -2442,7 +2447,7 @@ MakefileGenerator::writeSubTargetCall(QTextStream &t,
if (!in_directory.isEmpty())
t << "\n\t" << mkdir_p_asstring(out_directory);
pfx = "( " + chkexists.arg(out) +
- + " $(QMAKE) -o " + out + ' ' + in + buildArgs()
+ + " $(QMAKE) -o " + out + ' ' + in + buildArgs(false)
+ " ) && ";
}
writeSubMakeCall(t, out_directory_cdin + pfx, makefilein);
@@ -2513,7 +2518,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << mkdir_p_asstring(out_directory)
<< out_directory_cdin;
}
- t << "$(QMAKE) -o " << out << ' ' << in << buildArgs();
+ t << "$(QMAKE) -o " << out << ' ' << in << buildArgs(false);
if (!dont_recurse)
writeSubMakeCall(t, out_directory_cdin, makefilein + " qmake_all");
else
@@ -2710,7 +2715,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 " << files.join(' ') << ' ' << buildArgs() << endl;
+ << "@$(QMAKE) -prl " << files.join(' ') << ' ' << buildArgs(true) << endl;
}
QString qmake = build_args();
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 86fec748eb..4ced3bd121 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -178,7 +178,7 @@ protected:
QString specdir();
//subclasses can use these to query information about how the generator was "run"
- QString buildArgs();
+ QString buildArgs(bool withExtra);
virtual QStringList &findDependencies(const QString &file);
virtual bool doDepends() const { return Option::mkfile::do_deps; }
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 6fa355390f..946906ba65 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 " << escapeFilePath(project->projectFile()) << ' ' << buildArgs() << endl;
+ << "@$(QMAKE) -prl " << escapeFilePath(project->projectFile()) << ' ' << buildArgs(true) << endl;
}
if (!project->isEmpty("QMAKE_BUNDLE")) {