summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-03 12:32:48 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-18 17:10:52 +0000
commitd90db0f136d727f8e6b9a566eee3eae80cd7d81e (patch)
treeff60b68d6e6cb517fa712efc02cd3b266b3aa699
parent97b856b78859861f16304debad29889f691d9eb7 (diff)
rewrite makespec verification with qmake based system
cleaner, and covers windows as well. Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--config.tests/common/verifyspec/verifyspec.cpp1
-rw-r--r--config.tests/common/verifyspec/verifyspec.pro1
-rwxr-xr-xconfigure17
-rw-r--r--configure.json12
-rw-r--r--mkspecs/features/qt_configure.prf7
5 files changed, 20 insertions, 18 deletions
diff --git a/config.tests/common/verifyspec/verifyspec.cpp b/config.tests/common/verifyspec/verifyspec.cpp
new file mode 100644
index 0000000000..bd5560bf02
--- /dev/null
+++ b/config.tests/common/verifyspec/verifyspec.cpp
@@ -0,0 +1 @@
+int main(int, char **) {}
diff --git a/config.tests/common/verifyspec/verifyspec.pro b/config.tests/common/verifyspec/verifyspec.pro
new file mode 100644
index 0000000000..d78ed2985a
--- /dev/null
+++ b/config.tests/common/verifyspec/verifyspec.pro
@@ -0,0 +1 @@
+SOURCES = verifyspec.cpp
diff --git a/configure b/configure
index bd5a0fac8d..b031aae2f9 100755
--- a/configure
+++ b/configure
@@ -398,10 +398,7 @@ BUILD_ON_MAC=no
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
BUILD_ON_MAC=yes
fi
-DEV_NULL=/dev/null
if [ "$OSTYPE" = "msys" ]; then
- DEV_NULL=/tmp/empty-file
- echo "" > $DEV_NULL
relpath=`(cd "$relpath"; pwd -W)`
outpath=`pwd -W`
fi
@@ -1864,20 +1861,6 @@ else
fi
#-------------------------------------------------------------------------------
-# Verify makespec
-#-------------------------------------------------------------------------------
-QMAKE_OUTPUT=`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
-if [ $? != "0" ]; then
- echo "Failed to process makespec for platform '$XPLATFORM'"
- if [ "$OPT_VERBOSE" = "yes" ]; then
- echo "$QMAKE_OUTPUT"
- else
- echo "Turn on verbose messaging (-v) to see the final report."
- fi
- exit 101
-fi
-
-#-------------------------------------------------------------------------------
# run configure tests
#-------------------------------------------------------------------------------
diff --git a/configure.json b/configure.json
index 5874d8abaa..181fe8aa09 100644
--- a/configure.json
+++ b/configure.json
@@ -785,7 +785,8 @@
"testTypeDependencies": {
"linkerSupportsFlag": [ "use_gold_linker" ],
- "compile": [ "shared", "use_gold_linker", "compiler-flags", "gcc-sysroot", "qmakeargs" ],
+ "verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "gcc-sysroot", "qmakeargs" ],
+ "compile": [ "verifyspec" ],
"detectPkgConfig": [ "cross_compile" ],
"library": [ "pkg-config" ],
"getPkgConfigVariable": [ "pkg-config" ],
@@ -800,6 +801,11 @@
},
"tests": {
+ "verifyspec": {
+ "description": "valid makespec",
+ "type": "verifySpec",
+ "test": "common/verifyspec"
+ },
"architecture": {
"description": "target architecture",
"type": "architecture",
@@ -1301,6 +1307,10 @@
"pkgConfig"
]
},
+ "verifyspec": {
+ "description": "Have valid makespec",
+ "condition": "tests.verifyspec"
+ },
"developer-build": {
"description": "Developer build",
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 5a3f8410a2..880d71fab1 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -684,6 +684,13 @@ defineTest(qtConfTest_compile) {
return(false)
}
+defineTest(qtConfTest_verifySpec) {
+ qtConfTest_compile($$1): return(true)
+ qtConfAddError("Cannot compile a minimal program. The toolchain or QMakeSpec is broken.", log)
+ qtConfPrintReport()
+ error()
+}
+
defineTest(qtConfTest_files) {
for(i, $${1}.files._KEYS_) {
f = $$eval($${1}.files.$${i})