qmake: fix look-up of relative files from .depend_command in shadow builds
the dependency paths are fixified against the output directory, so we must resolve them accordingly. Change-Id: Id92750aad358153bd2db5daca3194c54eda58dbb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
395a19f032
commit
75587c8030
@ -1953,11 +1953,12 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
}
|
}
|
||||||
QT_PCLOSE(proc);
|
QT_PCLOSE(proc);
|
||||||
if(!indeps.isEmpty()) {
|
if(!indeps.isEmpty()) {
|
||||||
|
QDir outDir(Option::output_dir);
|
||||||
// ### This is basically fubar. Add 'lines' flag to CONFIG?
|
// ### This is basically fubar. Add 'lines' flag to CONFIG?
|
||||||
QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' ');
|
QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' ');
|
||||||
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 = QDir(Option::output_dir).absoluteFilePath(file);
|
QString absFile = outDir.absoluteFilePath(file);
|
||||||
if (exists(absFile)) {
|
if (exists(absFile)) {
|
||||||
file = absFile;
|
file = absFile;
|
||||||
} else {
|
} else {
|
||||||
@ -1965,8 +1966,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
||||||
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
||||||
dit != depdirs.end(); ++dit) {
|
dit != depdirs.end(); ++dit) {
|
||||||
if (exists((*dit).local() + '/' + file)) {
|
QString lf = outDir.absoluteFilePath((*dit).local() + '/' + file);
|
||||||
localFile = (*dit).local() + '/' + file;
|
if (exists(lf)) {
|
||||||
|
localFile = lf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2045,11 +2047,12 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
}
|
}
|
||||||
QT_PCLOSE(proc);
|
QT_PCLOSE(proc);
|
||||||
if(!indeps.isEmpty()) {
|
if(!indeps.isEmpty()) {
|
||||||
|
QDir outDir(Option::output_dir);
|
||||||
// ### This is basically fubar. Add 'lines' flag to CONFIG?
|
// ### This is basically fubar. Add 'lines' flag to CONFIG?
|
||||||
QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' ');
|
QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' ');
|
||||||
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 = QDir(Option::output_dir).absoluteFilePath(file);
|
QString absFile = outDir.absoluteFilePath(file);
|
||||||
if (exists(absFile)) {
|
if (exists(absFile)) {
|
||||||
file = absFile;
|
file = absFile;
|
||||||
} else {
|
} else {
|
||||||
@ -2057,8 +2060,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
||||||
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
||||||
dit != depdirs.end(); ++dit) {
|
dit != depdirs.end(); ++dit) {
|
||||||
if (exists((*dit).local() + '/' + file)) {
|
QString lf = outDir.absoluteFilePath((*dit).local() + '/' + file);
|
||||||
localFile = (*dit).local() + '/' + file;
|
if (exists(lf)) {
|
||||||
|
localFile = lf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user