2016-06-23 11:23:57 +00:00
|
|
|
equals(QMAKE_HOST.os, Windows) {
|
|
|
|
SETENV_PFX = "set "
|
|
|
|
SETENV_SFX = "&"
|
|
|
|
} else {
|
|
|
|
SETENV_PFX =
|
|
|
|
SETENV_SFX =
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
QMAKE_MAKE = $$(MAKE)
|
|
|
|
!isEmpty(QMAKE_MAKE) {
|
2016-06-23 11:23:57 +00:00
|
|
|
# We were called recursively. Use the same make.
|
2016-06-11 20:49:01 +00:00
|
|
|
} 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.")
|
|
|
|
}
|
2017-01-03 15:59:36 +00:00
|
|
|
QMAKE_MAKE_NAME = $$basename(QMAKE_MAKE)
|
2016-06-23 11:23:57 +00:00
|
|
|
# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
|
|
|
|
QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
defineTest(qtLog) {
|
2016-08-01 07:42:14 +00:00
|
|
|
write_file($$QMAKE_CONFIG_LOG, 1, append)
|
2016-08-01 11:04:24 +00:00
|
|
|
$$QMAKE_CONFIG_VERBOSE: for (l, 1): log("$$l$$escape_expand(\\n)")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtRunLoggedCommand) {
|
2016-08-01 07:42:14 +00:00
|
|
|
qtLog("+ $$1")
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-05-26 10:17:37 +00:00
|
|
|
!equals(3, false): \
|
|
|
|
1 = "( $$1 ) 2>&1"
|
|
|
|
output = $$system("$$1", lines, result)
|
2016-11-11 17:02:56 +00:00
|
|
|
lg =
|
|
|
|
for (l, output): \
|
|
|
|
lg += "> $$l"
|
|
|
|
qtLog($$lg)
|
2016-08-01 11:04:24 +00:00
|
|
|
!isEmpty(2) {
|
|
|
|
$$2 = $$output
|
|
|
|
export($$2)
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-07-15 16:09:24 +00:00
|
|
|
!equals(result, 0): return(false)
|
|
|
|
return(true)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|