log configure command line to config.log

that makes the log file mostly self-contained.

for code re-use, the qtSystemQuote() function was factored out.

Change-Id: Ie3469518ba384131b69f5f15c577240e2674d507
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Oswald Buddenhagen 2017-01-09 15:38:24 +01:00
parent f2e39c4a15
commit 068fca3cec

View File

@ -183,7 +183,9 @@ defineTest(qtConfCommandline_redo) {
qtConfAddError("No config.opt present - cannot redo configuration.")
return()
}
QMAKE_EXTRA_ARGS = $$cat($$OUT_PWD/config.opt, lines) $$QMAKE_EXTRA_ARGS
QMAKE_EXTRA_REDO_ARGS = $$cat($$OUT_PWD/config.opt, lines)
export(QMAKE_EXTRA_REDO_ARGS) # just for config.log
QMAKE_EXTRA_ARGS = $$QMAKE_EXTRA_REDO_ARGS $$QMAKE_EXTRA_ARGS
export(QMAKE_EXTRA_ARGS)
QMAKE_REDO_CONFIG = true
export(QMAKE_REDO_CONFIG)
@ -387,14 +389,17 @@ defineTest(qtConfPkgConfigPackageExists) {
return(true)
}
defineReplace(qtConfPrepareArgs) {
arglist = $$split(1)
defineReplace(qtSystemQuote) {
args =
for (a, arglist): \
for (a, 1): \
args += $$system_quote($$a)
return($$args)
}
defineReplace(qtConfPrepareArgs) {
return($$qtSystemQuote($$split(1)))
}
defineTest(qtConfSetupLibraries) {
for (l, $${currentConfig}.libraries._KEYS_) {
lpfx = $${currentConfig}.libraries.$${l}
@ -1796,6 +1801,9 @@ isEmpty(QMAKE_CONFIG_VERBOSE): \
QMAKE_CONFIG_LOG = $$OUT_PWD/config.log
!equals(QMAKE_CONFIG_CACHE_USE, all): \
write_file($$QMAKE_CONFIG_LOG, "")
qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)")
$$QMAKE_REDO_CONFIG: \
qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)")
CONFIG += qt_conf_tests_allowed
logn()