From 7a5f7db481b6d3743eb89fd127b1355b551e3668 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 15:21:11 +0200 Subject: 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 --- qmake/generators/metamakefile.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index adbe94a..1646b5b 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 -- cgit v0.12