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>
This commit is contained in:
parent
92c5f3fb7b
commit
80dea66424
@ -1997,7 +1997,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
||||||
QString &file = dep_cmd_deps[i];
|
QString &file = dep_cmd_deps[i];
|
||||||
QString absFile = outDir.absoluteFilePath(file);
|
QString absFile = outDir.absoluteFilePath(file);
|
||||||
if (exists(absFile)) {
|
if (absFile == file) {
|
||||||
|
// already absolute; don't do any checks.
|
||||||
|
} else if (exists(absFile)) {
|
||||||
file = absFile;
|
file = absFile;
|
||||||
} else {
|
} else {
|
||||||
QString localFile;
|
QString localFile;
|
||||||
@ -2016,7 +2018,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
" prints paths relative to source directory",
|
" prints paths relative to source directory",
|
||||||
(*it).toLatin1().constData());
|
(*it).toLatin1().constData());
|
||||||
else
|
else
|
||||||
file.clear();
|
file = absFile; // fallback for generated resources
|
||||||
} else {
|
} else {
|
||||||
file = localFile;
|
file = localFile;
|
||||||
}
|
}
|
||||||
@ -2090,7 +2092,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
||||||
QString &file = dep_cmd_deps[i];
|
QString &file = dep_cmd_deps[i];
|
||||||
QString absFile = outDir.absoluteFilePath(file);
|
QString absFile = outDir.absoluteFilePath(file);
|
||||||
if (exists(absFile)) {
|
if (absFile == file) {
|
||||||
|
// already absolute; don't do any checks.
|
||||||
|
} else if (exists(absFile)) {
|
||||||
file = absFile;
|
file = absFile;
|
||||||
} else {
|
} else {
|
||||||
QString localFile;
|
QString localFile;
|
||||||
@ -2109,7 +2113,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
" prints paths relative to source directory",
|
" prints paths relative to source directory",
|
||||||
(*it).toLatin1().constData());
|
(*it).toLatin1().constData());
|
||||||
else
|
else
|
||||||
file.clear();
|
file = absFile; // fallback for generated resources
|
||||||
} else {
|
} else {
|
||||||
file = localFile;
|
file = localFile;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user