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