summaryrefslogtreecommitdiffstats
path: root/qmake/generators/metamakefile.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-09 13:21:11 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-11 13:52:42 (GMT)
commit7a5f7db481b6d3743eb89fd127b1355b551e3668 (patch)
tree60a18ca46314d8eb610fafddfda1d4b23321a4a1 /qmake/generators/metamakefile.cpp
parent9d2e3f87aba9e87437c27ef94c9215f8b916bd6a (diff)
downloadQt-7a5f7db481b6d3743eb89fd127b1355b551e3668.zip
Qt-7a5f7db481b6d3743eb89fd127b1355b551e3668.tar.gz
Qt-7a5f7db481b6d3743eb89fd127b1355b551e3668.tar.bz2
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/generators/metamakefile.cpp')
-rw-r--r--qmake/generators/metamakefile.cpp11
1 files 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