From 3250ec0c8f9666cd3dbb724894cd529d5af51ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 31 Oct 2012 14:11:14 +0100 Subject: [PATCH] configure: Verify makespec before using it further MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chosen makespec may spit out errors for various reasons, which will influence steps such as detecting pkg-config or the architecture test. It's preferable to catch any issues with the makespec as early as possible and exit configure before the errors propagate to tests. Change-Id: Iecbf3217c36dea9f5e0677c58171b72cb6ce1e0b Reviewed-by: Oswald Buddenhagen Reviewed-by: Tor Arne Vestbø --- configure | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure b/configure index 2031396895..39e436d57c 100755 --- a/configure +++ b/configure @@ -3724,6 +3724,20 @@ else DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE" fi +#------------------------------------------------------------------------------- +# Verify makespec +#------------------------------------------------------------------------------- +QMAKE_OUTPUT=`$outpath/bin/qmake -E -nocache -spec "$XQMAKESPEC" "QT=" /dev/null 2>&1 >/dev/null` +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 + #------------------------------------------------------------------------------- # Detect pkg-config #-------------------------------------------------------------------------------