diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-03-29 11:56:23 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-04-12 10:00:35 (GMT) |
commit | 26dd9a45c3b1e92c356ee7f80f728e2ddca0c1d8 (patch) | |
tree | 182a3300c1988c0dbc1e321dc27871fd1313aeab /qmake | |
parent | 430b743946178c3f05208434331b8017159612b1 (diff) | |
download | Qt-26dd9a45c3b1e92c356ee7f80f728e2ddca0c1d8.zip Qt-26dd9a45c3b1e92c356ee7f80f728e2ddca0c1d8.tar.gz Qt-26dd9a45c3b1e92c356ee7f80f728e2ddca0c1d8.tar.bz2 |
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.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7eccc2e..d096eb4 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) { |