Handle the -[no]make command line arguments in qmake
Change-Id: I979f648b4301152e4a13ffe90aa05d9ded8556c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
e9ba9609f1
commit
98526119c6
52
configure
vendored
52
configure
vendored
@ -479,10 +479,6 @@ unset QTDIR
|
||||
|
||||
# initalize internal variables
|
||||
CFG_RELEASE_TOOLS=no
|
||||
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
||||
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
||||
CFG_BUILD_PARTS=""
|
||||
CFG_NOBUILD_PARTS=""
|
||||
CFG_ANDROID_STYLE_ASSETS=yes
|
||||
|
||||
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
|
||||
@ -723,24 +719,6 @@ while [ "$#" -gt 0 ]; do
|
||||
libexecdir)
|
||||
QT_INSTALL_LIBEXECS="$VAL"
|
||||
;;
|
||||
nomake)
|
||||
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
||||
echo "Unknown part $VAL passed to -nomake." >&2
|
||||
exit 1
|
||||
fi
|
||||
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
|
||||
;;
|
||||
make)
|
||||
if [ "$VAL" = "no" ]; then
|
||||
UNKNOWN_OPT=yes
|
||||
else
|
||||
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
||||
echo "Unknown part $VAL passed to -make." >&2
|
||||
exit 1
|
||||
fi
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
||||
fi
|
||||
;;
|
||||
sdk)
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
|
||||
@ -1358,11 +1336,6 @@ if [ "$OPT_SHADOW" = "yes" ]; then
|
||||
mkdir -p "$outpath/mkspecs"
|
||||
fi
|
||||
|
||||
if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then
|
||||
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$XPLATFORM_ANDROID" != "yes" ]; then
|
||||
TEST_COMPILER=`getXQMakeConf QMAKE_CXX`
|
||||
GCC_MACHINE_DUMP=
|
||||
@ -1372,30 +1345,6 @@ if [ "$XPLATFORM_ANDROID" != "yes" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
#setup the build parts
|
||||
if [ -z "$CFG_BUILD_PARTS" ]; then
|
||||
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
|
||||
|
||||
# build tests by default, if a developer build
|
||||
if [ "$CFG_DEV" = "yes" ]; then
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
|
||||
fi
|
||||
|
||||
# don't build tools by default when cross-compiling
|
||||
if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
||||
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed 's, tools,,g'`
|
||||
fi
|
||||
fi
|
||||
for nobuild in $CFG_NOBUILD_PARTS; do
|
||||
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
|
||||
done
|
||||
if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
|
||||
# echo
|
||||
# echo "WARNING: libs is a required part of the build."
|
||||
# echo
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# postprocess installation and deployment paths
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -1954,7 +1903,6 @@ fi
|
||||
|
||||
cat > "$outpath/config.tests/configure.cfg" <<EOF
|
||||
# Feature defaults set by configure command line
|
||||
config.input.qt_build_parts = $CFG_BUILD_PARTS
|
||||
config.input.extra_features = $CFG_FEATURES
|
||||
config.input.qt_edition = $Edition
|
||||
config.input.qt_licheck = $Licheck
|
||||
|
@ -278,6 +278,11 @@
|
||||
"type": "skipModules",
|
||||
"log": "value"
|
||||
},
|
||||
"build_parts": {
|
||||
"description": "parts of Qt to build",
|
||||
"type": "buildParts",
|
||||
"log": "value"
|
||||
},
|
||||
"dlopen": {
|
||||
"description": "dlopen() in libc",
|
||||
"type": "compile",
|
||||
@ -1782,9 +1787,9 @@
|
||||
"skip_modules": {
|
||||
"output": [ { "type": "varAssign", "name": "QT_SKIP_MODULES", "value": "tests.skip_modules.value" } ]
|
||||
},
|
||||
"qt_build_parts": {
|
||||
"build_parts": {
|
||||
"description": "Qt build parts",
|
||||
"output": [ { "type": "varAppend", "name": "QT_BUILD_PARTS", "value": "input.qt_build_parts" } ]
|
||||
"output": [ { "type": "varAppend", "name": "QT_BUILD_PARTS", "value": "tests.build_parts.value" } ]
|
||||
},
|
||||
"qreal": {
|
||||
"description": "Type for qreal",
|
||||
|
@ -207,6 +207,28 @@ defineTest(qtConfTest_skipModules) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
defineTest(qtConfTest_buildParts) {
|
||||
parts = $$config.input.make
|
||||
isEmpty(parts) {
|
||||
parts = libs examples
|
||||
|
||||
$$qtConfEvaluate("features.developer-build"): \
|
||||
parts += tests
|
||||
!$$qtConfEvaluate("features.cross_compile"): \
|
||||
parts += tools
|
||||
}
|
||||
|
||||
ios|tvos: parts -= examples
|
||||
parts -= $$config.input.nomake
|
||||
|
||||
# always add libs, as it's required to build Qt
|
||||
parts *= libs
|
||||
|
||||
$${1}.value = $$parts
|
||||
export($${1}.value)
|
||||
return(true)
|
||||
}
|
||||
|
||||
defineTest(qtConfTest_openssl) {
|
||||
libs = $$getenv("OPENSSL_LIBS")
|
||||
|
||||
@ -652,7 +674,7 @@ defineTest(qtConfOutputPostProcess_publicHeader) {
|
||||
# custom reporting
|
||||
|
||||
defineTest(qtConfReport_buildParts) {
|
||||
qtConfReportPadded($${1}, $$config.input.qt_build_parts)
|
||||
qtConfReportPadded($${1}, $$qtConfEvaluate("tests.build_parts.value"))
|
||||
}
|
||||
|
||||
defineTest(qtConfReport_buildTypeAndConfig) {
|
||||
|
Loading…
Reference in New Issue
Block a user