do not add "/." to _PRO_FILE_PWD_
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Mon, 14 May 2012 13:13:12 +0000 (15:13 +0200)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tue, 19 Jun 2012 14:46:04 +0000 (16:46 +0200)
if a "subdir" project added a project file from the same directory as
itself, "/." would be appended to the path, which is obviously not useful.

Change-Id: Ia733dedb57e568c5cf9a3d5eb29727176a5142c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
qmake/generators/metamakefile.cpp

index 0603020..a1ab4ad 100644 (file)
@@ -338,7 +338,7 @@ SubdirsMetaMakefileGenerator::init()
                 printf(" ");
             sub->input_dir = subdir.absolutePath();
             if(subdir.isRelative() && old_output_dir != oldpwd) {
-                sub->output_dir = old_output_dir + "/" + subdir.path();
+                sub->output_dir = old_output_dir + (subdir.path() != "." ? "/" + subdir.path() : QString());
                 printf("Reading %s [%s]\n", subdir.absoluteFilePath().toLatin1().constData(), sub->output_dir.toLatin1().constData());
             } else { //what about shadow builds?
                 sub->output_dir = sub->input_dir;