qmake/generators/makefile.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 0 1918ee327afb
child 5 d3bac044e0f0
--- a/qmake/generators/makefile.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/qmake/generators/makefile.cpp	Fri Feb 19 23:40:16 2010 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -2417,16 +2417,14 @@
 
         //qmake it
         if(!subtarget->profile.isEmpty()) {
-            QString out = out_directory + subtarget->makefile,
-                     in = fileFixify(in_directory + subtarget->profile, in_directory);
-            if(in.startsWith(in_directory))
-                in = in.mid(in_directory.length());
+            QString out = subtarget->makefile;
+            QString in = fileFixify(in_directory + subtarget->profile, out_directory, QString(), FileFixifyAbsolute);
             if(out.startsWith(in_directory))
                 out = out.mid(in_directory.length());
             t << mkfile << ": " << "\n\t";
             if(!in_directory.isEmpty()) {
-                t << mkdir_p_asstring(in_directory)
-                  << in_directory_cdin
+                t << mkdir_p_asstring(out_directory)
+                  << out_directory_cdin
                   << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
                   << in_directory_cdout << endl;
             } else {
@@ -2437,8 +2435,8 @@
                 t <<  " FORCE";
             t << "\n\t";
             if(!in_directory.isEmpty()) {
-                t << mkdir_p_asstring(in_directory)
-                  << in_directory_cdin
+                t << mkdir_p_asstring(out_directory)
+                  << out_directory_cdin
                   << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
                   << in_directory_cdout << endl;
             } else {