summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-11-15 20:49:43 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-12-13 18:55:32 +0000
commit8ebc7e967c5d245ffab5dcbf666fc01a4df4fe6a (patch)
tree46fab2186cc4c6946fe3d9da8356a4f5b25a552d /configure.pri
parent24cb1580e2bdb9eace8a419dcc44bffe13ed1550 (diff)
move configure -redo handling (mostly) to qmake-based system
the qmake bootstrap uses some of the options, so the configures still read config.opt for their own purposes, but the general handling is entirely in the new system now. Change-Id: I2c6c657d4da01c8d520ac74795454747bb224bdd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.pri b/configure.pri
index 526b09e965..e19861b533 100644
--- a/configure.pri
+++ b/configure.pri
@@ -91,11 +91,14 @@ defineReplace(qtConfFunc_licenseCheck) {
val = $$lower($$prompt("Which edition of Qt do you want to use? ", false))
equals(val, c) {
commercial = yes
+ QMAKE_SAVED_ARGS += -commercial
} else: equals(val, o) {
commercial = no
+ QMAKE_SAVED_ARGS += -opensource
} else {
next()
}
+ export(QMAKE_SAVED_ARGS)
break()
}
} else {
@@ -206,6 +209,8 @@ defineReplace(qtConfFunc_licenseCheck) {
val = $$lower($$prompt("Do you accept the terms of $$affix license? ", false))
equals(val, y)|equals(val, yes) {
logn()
+ QMAKE_SAVED_ARGS += -confirm-license
+ export(QMAKE_SAVED_ARGS)
return(true)
} else: equals(val, n)|equals(val, no) {
return(false)
@@ -722,3 +727,22 @@ discard_from($$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)
QMAKE_POST_CONFIGURE += \
"include(\$\$[QT_HOST_DATA/get]/mkspecs/qconfig.pri)" \
"include(\$\$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)"
+
+defineTest(createConfigStatus) {
+ $$QMAKE_REDO_CONFIG: return()
+ cfg = $$relative_path($$_PRO_FILE_PWD_/configure, $$OUT_PWD)
+ ext =
+ equals(QMAKE_HOST.os, Windows) {
+ ext = .bat
+ cont = \
+ "$$system_quote($$system_path($$cfg)$$ext) -redo %*"
+ } else {
+ cont = \
+ "$${LITERAL_HASH}!/bin/sh" \
+ "exec $$system_quote($$cfg) -redo \"$@\""
+ }
+ write_file($$OUT_PWD/config.status$$ext, cont, exe)|error()
+}
+
+QMAKE_POST_CONFIGURE += \
+ "createConfigStatus()"