summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-03-29 13:56:23 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-04-12 12:00:35 +0200
commit26dd9a45c3b1e92c356ee7f80f728e2ddca0c1d8 (patch)
tree182a3300c1988c0dbc1e321dc27871fd1313aeab /qmake
parent430b743946178c3f05208434331b8017159612b1 (diff)
fix fixifying of QMAKE_SUBSTITUTES
use the correct bases. notably, don't expect the input file in the output dir. Reviewed-by: mariusSO
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 7eccc2e2ff..d096eb4dfe 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -483,19 +483,22 @@ MakefileGenerator::init()
subs.at(i).toLatin1().constData());
continue;
}
- inn = tinn.first();
- outn = toutn.first();
+ inn = fileFixify(tinn.first(), qmake_getpwd());
+ outn = fileFixify(toutn.first(), qmake_getpwd(), Option::output_dir);
} else {
- inn = subs.at(i);
+ inn = fileFixify(subs.at(i), qmake_getpwd());
+ if (!QFile::exists(inn)) {
+ // random insanity for backwards compat: .in file specified with absolute out dir
+ inn = fileFixify(subs.at(i));
+ }
if(!inn.endsWith(".in")) {
warn_msg(WarnLogic, "Substitute '%s' does not end with '.in'",
inn.toLatin1().constData());
continue;
}
- outn = inn.left(inn.length()-3);
+ outn = fileFixify(inn.left(inn.length()-3), qmake_getpwd(), Option::output_dir);
}
- QFile in(fileFixify(inn));
- QFile out(fileFixify(outn, qmake_getpwd(), Option::output_dir));
+ QFile in(inn);
if(in.open(QFile::ReadOnly)) {
QString contents;
QStack<int> state;
@@ -547,6 +550,7 @@ MakefileGenerator::init()
contents += project->expand(line, in.fileName(), count);
}
}
+ QFile out(outn);
if(out.exists() && out.open(QFile::ReadOnly)) {
QString old = QString::fromUtf8(out.readAll());
if(contents == old) {