summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-30 18:10:41 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-10-04 08:26:39 +0000
commit0872b62b2e3429743db89ac84827943f5b630357 (patch)
tree028b6824a0019ebec39f850c42f6e45ae9ee2538 /mkspecs
parentd01133a7fcc50a791025cddca53c18d34deb40a0 (diff)
make command line parsing more compliant with configure script
- generic --* options are defined to be booleans, without the possibility of having an additional parameter - -qt and -system options don't exist in the --* form - --foo=bar options exist only in the --* form Task-number: QTBUG-55610 Change-Id: Ib0480ac6f479df48045c9de8e854a525862ee363 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/qt_configure.prf21
1 files changed, 12 insertions, 9 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index e34d7ad194..8119a130b8 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -245,17 +245,20 @@ defineTest(qtConfParseCommandLine) {
} else: contains(c, "^--?(disable|no)-(.*)") {
opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2")
val = no
- } else: contains(c, "^--?qt-(.*)") {
- opt = $$replace(c, "^--?qt-(.*)", "\\1")
+ } else: contains(c, "^--([^=]+)=(.*)") {
+ opt = $$replace(c, "^--?([^=]+)=(.*)", "\\1")
+ val = $$replace(c, "^--?([^=]+)=(.*)", "\\2")
+ } else: contains(c, "^--(.*)") {
+ opt = $$replace(c, "^--(.*)", "\\1")
+ val = yes
+ } else: contains(c, "^-qt-(.*)") {
+ opt = $$replace(c, "^-qt-(.*)", "\\1")
val = qt
- } else: contains(c, "^--?system-(.*)") {
- opt = $$replace(c, "^--?system-(.*)", "\\1")
+ } else: contains(c, "^-system-(.*)") {
+ opt = $$replace(c, "^-system-(.*)", "\\1")
val = system
- } else: contains(c, "^--?([^-].*)=(.*)") {
- opt = $$replace(c, "^--?([^-].*)=(.*)", "\\1")
- val = $$replace(c, "^--?([^-].*)=(.*)", "\\2")
- } else: contains(c, "^--?([^-].*)") {
- opt = $$replace(c, "^--?([^-].*)", "\\1")
+ } else: contains(c, "^-(.*)") {
+ opt = $$replace(c, "^-(.*)", "\\1")
val =
} else {
qtConfAddError("Invalid command line parameter '$$c'.")