summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-04-09 18:46:49 +0200
committerKai Koehne <kai.koehne@qt.io>2018-07-25 06:53:56 +0000
commit80dea66424c4887f66f64ea1920ab460f27b78af (patch)
treed4f3bbe3af0aacd784500f2d468dea8b32b6e5f7 /qmake
parent92c5f3fb7b3f3a90e27be71e73395ac517f0b3ea (diff)
qmake: don't drop non-existing files from .depend_command output
this allows for dynamic generation of the dependencies. Task-number: QTBUG-61267 Change-Id: If5b8aed6b9e4bde189cc3ba6a5f13dcf8def3a1e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 85f517774d..cec4892e1f 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1997,7 +1997,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
QString &file = dep_cmd_deps[i];
QString absFile = outDir.absoluteFilePath(file);
- if (exists(absFile)) {
+ if (absFile == file) {
+ // already absolute; don't do any checks.
+ } else if (exists(absFile)) {
file = absFile;
} else {
QString localFile;
@@ -2016,7 +2018,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
" prints paths relative to source directory",
(*it).toLatin1().constData());
else
- file.clear();
+ file = absFile; // fallback for generated resources
} else {
file = localFile;
}
@@ -2090,7 +2092,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
QString &file = dep_cmd_deps[i];
QString absFile = outDir.absoluteFilePath(file);
- if (exists(absFile)) {
+ if (absFile == file) {
+ // already absolute; don't do any checks.
+ } else if (exists(absFile)) {
file = absFile;
} else {
QString localFile;
@@ -2109,7 +2113,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
" prints paths relative to source directory",
(*it).toLatin1().constData());
else
- file.clear();
+ file = absFile; // fallback for generated resources
} else {
file = localFile;
}