summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-26 18:38:39 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-30 13:24:20 +0000
commit57d4b8f328a480ad837c518323c3af369a14d781 (patch)
tree11fb2b88d5610a276fe6954ee5eb742a13182eee /mkspecs/features
parent793f4ae5c9f2e9aaaf3eb66771dfb14c64bbed7c (diff)
de-duplicate code relating to evaluation of 'negative' flags
Change-Id: I3fe4816719d9b2885319a1bb516cfb137f13e3f8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/qt_configure.prf17
1 files changed, 5 insertions, 12 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 0a75c998b5..536ae2cd8a 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -1363,8 +1363,7 @@ defineTest(qtConfOutputVar) {
defineTest(qtConfOutputVarHelper) {
negative = $$eval($${2}.negative)
isEmpty(negative): negative = false
- !$${3}:!$$negative: return()
- $${3}:$$negative: return()
+ equals(3, $$negative): return()
output = $$qtConfOutputSelectProFile($${2})
name = $$eval($${2}.name)
@@ -1394,6 +1393,7 @@ defineTest(qtConfOutputConfigVar) {
var = $$4
negative = $$eval($${1}.negative)
isEmpty(negative): negative = false
+ equals(2, $$negative): return()
val = $$eval($${1}.name)
isEmpty(val) {
@@ -1401,11 +1401,7 @@ defineTest(qtConfOutputConfigVar) {
$$negative: val = no-$$val
}
- $${2} {
- !$$negative: qtConfOutputVar(append, $$pro, $$var, $$val)
- } else {
- $$negative: qtConfOutputVar(append, $$pro, $$var, $$val)
- }
+ qtConfOutputVar(append, $$pro, $$var, $$val)
}
defineTest(qtConfOutput_publicQtConfig) {
@@ -1436,12 +1432,9 @@ defineTest(qtConfOutput_define) {
negative = $$eval($${1}.negative)
isEmpty(negative): negative = false
+ equals(2, $$negative): return()
- $${2} {
- !$$negative: qtConfOutputSetDefine($$output, $$define, $$value)
- } else {
- $$negative: qtConfOutputSetDefine($$output, $$define, $$value)
- }
+ qtConfOutputSetDefine($$output, $$define, $$value)
}
defineTest(qtConfOutput_feature) {