summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-06-22 09:52:41 +0200
committerLars Knoll <lars.knoll@qt.io>2016-07-02 06:18:55 +0000
commit98526119c6940e9923655242c181283081efb694 (patch)
tree0ce16bd9d0c8243194de6ef9a5b8ed53d65700d3
parente9ba9609f1c3797baf8a54ba7213b56dcbe7e1ec (diff)
Handle the -[no]make command line arguments in qmake
Change-Id: I979f648b4301152e4a13ffe90aa05d9ded8556c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rwxr-xr-xconfigure52
-rw-r--r--configure.json9
-rw-r--r--configure.pri24
3 files changed, 30 insertions, 55 deletions
diff --git a/configure b/configure
index 15b3f6947e..32eb0b8e2f 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/configure.json b/configure.json
index c2f1fd1623..1cb30c989e 100644
--- a/configure.json
+++ b/configure.json
@@ -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",
diff --git a/configure.pri b/configure.pri
index 073a109ac0..1ff9003429 100644
--- a/configure.pri
+++ b/configure.pri
@@ -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) {