7ac15ab0ff
it is counterproductive to clear the log when cached test results are used, as that makes it hard to determine how they came to be. -recheck isn't as clear-cut as -recheck-all, as only part of the results is discarded, and we can't reasonably discard only part of the log. i opted for clearing the log entirely, as having both the old and new results in the log would be probably quite confusing. Change-Id: Ibb391f2ba2ea86d73c23365d46cc66ed8a2158d6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
equals(QMAKE_HOST.os, Windows) {
|
|
SETENV_PFX = "set "
|
|
SETENV_SFX = "&"
|
|
} else {
|
|
SETENV_PFX =
|
|
SETENV_SFX =
|
|
}
|
|
|
|
QMAKE_MAKE = $$(MAKE)
|
|
!isEmpty(QMAKE_MAKE) {
|
|
# We were called recursively. Use the same make.
|
|
} else: if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) {
|
|
!equals(QMAKE_HOST.os, Windows): \
|
|
QMAKE_MAKE = make
|
|
else: \
|
|
QMAKE_MAKE = mingw32-make
|
|
} else: if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
|
|
QMAKE_MAKE = nmake
|
|
} else {
|
|
error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
|
|
}
|
|
# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
|
|
QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
|
|
|
|
isEmpty(QMAKE_CONFIG_VERBOSE): QMAKE_CONFIG_VERBOSE = false
|
|
|
|
defineTest(qtLog) {
|
|
write_file($$QMAKE_CONFIG_LOG, 1, append)
|
|
$$QMAKE_CONFIG_VERBOSE: for (l, 1): log("$$l$$escape_expand(\\n)")
|
|
}
|
|
|
|
defineTest(qtRunLoggedCommand) {
|
|
qtLog("+ $$1")
|
|
|
|
output = $$system("( $$1 ) 2>&1", lines, result)
|
|
qtLog($$output)
|
|
!isEmpty(2) {
|
|
$$2 = $$output
|
|
export($$2)
|
|
}
|
|
|
|
!equals(result, 0): return(false)
|
|
return(true)
|
|
}
|
|
|
|
QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
|