summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc5
-rw-r--r--qmake/generators/makefile.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index a388b89477..b178084690 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -4816,6 +4816,11 @@
\li The dependencies for the output only get generated from the depends
member and from nowhere else.
\row
+ \li dep_existing_only
+ \li Every dependency that is a result of .depend_command is checked for
+ existence. Non-existing dependencies are ignored.
+ This value was introduced in Qt 5.13.2.
+ \row
\li dep_lines
\li The output from the .depend_command is interpreted to be one file
per line. The default is to split on whitespace and is maintained
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index a45b676d5f..22ac7bf534 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1992,6 +1992,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
}
t << 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_)"))) {
@@ -2033,6 +2034,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
" prints paths relative to source directory",
(*it).toLatin1().constData());
+ else if (existingDepsOnly)
+ file.clear();
else
file = absFile; // fallback for generated resources
} else {
@@ -2118,6 +2121,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
" prints paths relative to source directory",
(*it).toLatin1().constData());
+ else if (existingDepsOnly)
+ file.clear();
else
file = absFile; // fallback for generated resources
} else {