diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-20 08:20:47 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-20 08:20:47 +0200 |
commit | 73f880d3934650de18def4eee615162d47416674 (patch) | |
tree | 07acedd242b334aba49df57a2983c07224b6d385 /qmake/generators/makefile.cpp | |
parent | 6234286925153279ca259cec04429fa584187b16 (diff) | |
parent | 0d9f43d534983411e37a9f3912de272a4a6ced64 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
qmake/generators/makefile.cpp
qmake/generators/makefile.h
Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 94e9259c68..c5868adf27 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1856,7 +1856,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom const QString &inpf, const QString &tmp_out, bool dep_lines, - QStringList *deps) + QStringList *deps, + bool existingDepsOnly) { char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell); @@ -1885,6 +1886,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom warn_msg(WarnDeprecated, ".depend_command for extra compiler %s" " prints paths relative to source directory", extraCompiler.toLatin1().constData()); + } else if (existingDepsOnly) { + file.clear(); } else { file = absFile; // fallback for generated resources } @@ -2013,6 +2016,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << Qt::endl; } + const bool existingDepsOnly = config.contains("dep_existing_only"); QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList(); if (config.indexOf("combine") != -1) { if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) { @@ -2029,7 +2033,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) inputs += Option::fixPathToTargetOS(inpf, false); if(!tmp_dep_cmd.isEmpty() && doDepends()) { callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, - tmp_out, dep_lines, &deps); + tmp_out, dep_lines, &deps, existingDepsOnly); } } for(int i = 0; i < inputs.size(); ) { @@ -2078,7 +2082,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")"); if(!tmp_dep_cmd.isEmpty() && doDepends()) { callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, - tmp_out, dep_lines, &deps); + tmp_out, dep_lines, &deps, existingDepsOnly); //use the depend system to find includes of these included files QStringList inc_deps; for(int i = 0; i < deps.size(); ++i) { |