summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm18
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qt.xml5
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp12
3 files changed, 35 insertions, 0 deletions
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
new file mode 100644
index 0000000..fe35e6e
--- /dev/null
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
@@ -0,0 +1,18 @@
+# /****************************************************************************
+# **
+# ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+# ** Contact: Nokia Corporation (qt-info@nokia.com)
+# **
+# ** This file is part of symbian-sbsv2 mkspec.
+# **
+# ****************************************************************************/
+
+
+SINGLETON:=$(call sanitise,QMAKE_CLEAN_SINGLETON_$(EXTENSION_ROOT))
+
+ifeq ($($(SINGLETON)),)
+# Prevent duplicate targets from being created
+$(SINGLETON):=1
+$(eval $(call GenerateStandardCleanTarget,$(CLEAN_FILES),''))
+endif
+
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qt.xml b/mkspecs/symbian-sbsv2/flm/qt/qt.xml
index ddd8d55..f2f32ee 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qt.xml
+++ b/mkspecs/symbian-sbsv2/flm/qt/qt.xml
@@ -38,4 +38,9 @@
<interface name="qt.qmake_store_build" extends="Symbian.UserFLM"
flm="qmake_store_build.flm">
</interface>
+
+ <interface name="qt.qmake_clean" extends="Symbian.UserFLM"
+ flm="qmake_clean.flm">
+ <param name='CLEAN_FILES' />
+ </interface>
</build>
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 9eccd46..f94a63f 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -721,6 +721,18 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << "END" << endl;
t << endl;
+ // Handle QMAKE_CLEAN
+ QStringList cleanFiles = project->values("QMAKE_CLEAN");
+ if (!cleanFiles.isEmpty()) {
+ QStringList absoluteCleanFiles;
+ foreach (QString cleanFile, cleanFiles) {
+ QFileInfo fi(cleanFile);
+ absoluteCleanFiles << fi.absoluteFilePath();
+ }
+ t << "START EXTENSION qt/qmake_clean" << endl;
+ t << "OPTION CLEAN_FILES " << absoluteCleanFiles.join(" ") << endl;
+ t << "END" << endl;
+ }
t << endl;
}