From e4113aa813ede62db0a6dcad27bf8b71a0e90a8f Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Mon, 10 May 2010 13:47:15 +0200
Subject: [PATCH] HACK: ensure a cleaner sourcedir for symbian builds

The symbian makefile generator don't support shadow builds. Thus they
always pollute the source directory with build artefacts. Mixing
in-source and shadow builds is obviously broken.

We do as good as we can, setting OBJECTS_DIR, MOC_DIR, UI_DIR, RCC_DIR
to .obj, .moc, .ui and .rcc, which keeps the source dir clean of at least
some of the artefacts. This is as good as we can, but not really good.

Task-Nr: QTCREATORBUG-1293
(cherry picked from commit 33ef722b6f893a4689dc4436a1ebe43bfcc9af7e)
---
 src/plugins/qt4projectmanager/qmakestep.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index eb34c86d7e3..bfc1e546880 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -109,6 +109,19 @@ QStringList QMakeStep::allArguments()
     if (type == ToolChain::GCC_MAEMO)
         arguments << QLatin1String("-unix");
 #endif
+    if (bc->target()->id() == Constants::S60_DEVICE_TARGET_ID
+        || bc->target()->id() == Constants::S60_EMULATOR_TARGET_ID) {
+        // We have a target which does not allow shadow building.
+        // But we really don't want to have the build artefacts in the source dir
+        // so we try to hack around it, to make the common cases work.
+        // This is a HACK, remove once the symbian make generator supports
+        // shadow building
+        arguments << QLatin1String("-after")
+                  << QLatin1String("OBJECTS_DIR=.obj")
+                  << QLatin1String("MOC_DIR=.moc")
+                  << QLatin1String("UI_DIR=.ui")
+                  << QLatin1String("RCC_DIR=.rcc");
+    }
 
     // Find out what flags we pass on to qmake
     QStringList addedUserConfigArguments;
-- 
GitLab