summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-24 10:33:37 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-25 20:06:06 +0100
commit318b58562ae89453fb98e8145cd0440e14ba60b0 (patch)
tree622bc032cf076b4569621032f3a3315d95c3ae88 /qmake/generators/makefile.cpp
parentc28fde3fdac19fd5a5f614bb7983080031c924b3 (diff)
parent79352528a1726b4551ea4d9285dd2394dd0d43da (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp15
1 files changed, 10 insertions, 5 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();