From 5b66f4ba400d0f9550e14874eb7d42f3c43e3027 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 1 Jul 2016 00:44:29 +0200 Subject: [PATCH] Allow passing configure opts with two dashes again The regexp were capturing too greedy: $$replace(c, "^--?(.*)", "\\1") changes --developer-build to -developer-build. Do not accidentally capture the second dash. Change-Id: I19586a1678fc3bf3f450ec31f5bd7e71e9514b34 Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 7a1e588994..4372da6499 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -186,11 +186,11 @@ defineTest(qtConfParseCommandLine) { } 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 = $$replace(c, "^--?([^-].*)=(.*)", "\\2") + } else: contains(c, "^--?([^-].*)") { + opt = $$replace(c, "^--?([^-].*)", "\\1") val = } else { error("Invalid command line parameter $$c")