diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-09 15:21:11 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-11 15:52:42 +0200 |
commit | 7a5f7db481b6d3743eb89fd127b1355b551e3668 (patch) | |
tree | 60a18ca46314d8eb610fafddfda1d4b23321a4a1 /qmake | |
parent | 9d2e3f87aba9e87437c27ef94c9215f8b916bd6a (diff) | |
download | qt4-tools-7a5f7db481b6d3743eb89fd127b1355b551e3668.tar.gz |
do not make PWD and OUT_PWD have trailing slashes upon returning from a SUBDIRS target
they don't have initially, either.
Reviewed-by: mariusSO
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/metamakefile.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index adbe94abd6..1646b5b4e8 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -289,12 +289,11 @@ SubdirsMetaMakefileGenerator::init() if(Option::recursive) { QString old_output_dir = QDir::cleanPath(Option::output_dir); - if(!old_output_dir.endsWith('/')) - old_output_dir += '/'; QString old_output = Option::output.fileName(); QString oldpwd = QDir::cleanPath(qmake_getpwd()); - if(!oldpwd.endsWith('/')) - oldpwd += '/'; + QString thispwd = oldpwd; + if(!thispwd.endsWith('/')) + thispwd += '/'; const QStringList &subdirs = project->values("SUBDIRS"); static int recurseDepth = -1; ++recurseDepth; @@ -314,8 +313,8 @@ SubdirsMetaMakefileGenerator::init() sub_name = subdir.baseName(); if(!subdir.isRelative()) { //we can try to make it relative QString subdir_path = subdir.filePath(); - if(subdir_path.startsWith(oldpwd)) - subdir = QFileInfo(subdir_path.mid(oldpwd.length())); + if(subdir_path.startsWith(thispwd)) + subdir = QFileInfo(subdir_path.mid(thispwd.length())); } //handle sub project |