summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-09-16 13:18:23 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-09-18 08:24:46 +0200
commit90779d96adfa51a3fc00b6c0d93168b4bbfcf983 (patch)
treecc88fa39c192444c85a0e65c708cf2ec7005830e /qmake/generators/makefile.cpp
parent1456b8091a681316f0e6256554fd138c6399f564 (diff)
Ignore non-existent .ui file dependencies
Commit 80dea664 broke .ui files with global includes that are not part of the project, because we blindly added every file path that falls out of 'uic -d' as dependency. Introduce the extra compiler CONFIG flag dep_existing_only to bring back the old behavior that ignores non-existent dependencies and set it for uic. Change-Id: I6eaa82817c932a98ebac6d08115a9815d4b9dd21 Fixes: QTBUG-78144 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp5
1 files changed, 5 insertions, 0 deletions
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 {