summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-26 13:24:11 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-26 13:24:11 (GMT)
commitb78012c855a8b00fa0d100cd0cf6c8de024dfa69 (patch)
tree75cd20ff9e068c04996daf0d4aed4e15b49b5992 /mkspecs/features
parent5e9382c018e231c5e2ef49dd8a38eaff535b9837 (diff)
parent7ca00ed67cb18fb858e1e89cec21b3db696fa923 (diff)
downloadQt-b78012c855a8b00fa0d100cd0cf6c8de024dfa69.zip
Qt-b78012c855a8b00fa0d100cd0cf6c8de024dfa69.tar.gz
Qt-b78012c855a8b00fa0d100cd0cf6c8de024dfa69.tar.bz2
Merge branch '4.6'
Conflicts: mkspecs/common/symbian/symbian.conf
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/symbian/add_mmp_rules.prf33
1 files changed, 33 insertions, 0 deletions
diff --git a/mkspecs/features/symbian/add_mmp_rules.prf b/mkspecs/features/symbian/add_mmp_rules.prf
new file mode 100644
index 0000000..5384dbe
--- /dev/null
+++ b/mkspecs/features/symbian/add_mmp_rules.prf
@@ -0,0 +1,33 @@
+# Arg1: List of conditions to generate block for
+# Arg2: List of variables containing rules to add
+defineTest(addMMPRules) {
+ unset(myConditions)
+ unset(myVariables)
+ unset(myIfDef)
+
+ myConditions = $$eval($$1) default
+ myVariables = $$eval($$2)
+ myIfDef = if
+
+ for(condition, $$list($$myConditions)) {
+ contains(condition, default) {
+ libBlock = "$${LITERAL_HASH}else"
+ } else {
+ libBlock = "$${LITERAL_HASH}$${myIfDef} defined($${condition})"
+ myIfDef = elif
+ }
+
+ for(var, $$list($$myVariables)) {
+ varVal = $$eval($${var}.$${condition})
+ isEmpty(varVal) {
+ # No value defined for current condition, so use default
+ varVal = $$eval($${var}.default)
+ }
+ !isEmpty(varVal): libBlock += "$$join(varVal,$$escape_expand(\n))"
+ }
+
+ MMP_RULES += $$libBlock
+ }
+ MMP_RULES += "$${LITERAL_HASH}endif"
+ export(MMP_RULES)
+}