diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-01-03 20:23:19 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-01-06 20:10:10 +0000 |
commit | 696c3f9af852537897aa754dc269833ead9fcf41 (patch) | |
tree | f636225eda6237f33bd5c51315ec0e8c35a6f871 | |
parent | 44a68aff6626d8e7beb040fe0d6dc52740e2a210 (diff) |
complain about various invalid configuration attempts
Task-number: QTBUG-56049
Change-Id: Id5eeb014c2b88195d2d14566a62dcb9185206b37
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rwxr-xr-x | configure | 5 | ||||
-rw-r--r-- | configure.bat | 5 | ||||
-rw-r--r-- | mkspecs/features/qt_configure.prf | 13 |
3 files changed, 22 insertions, 1 deletions
@@ -82,6 +82,11 @@ if [ x"$1" = x"-top-level" ]; then relpathMangled=`dirname "$relpath"` outpathPrefix=../ shift +else + if [ -f ../.qmake.super ]; then + echo >&2 "ERROR: You cannot configure qtbase separately within a top-level build." + exit 1 + fi fi OPT_CMDLINE= # expanded version for the script diff --git a/configure.bat b/configure.bat index c5daabfa65..47f1889277 100644 --- a/configure.bat +++ b/configure.bat @@ -46,7 +46,12 @@ for %%P in ("%TOPQTSRC%") do set TOPQTSRC=%%~dpP set TOPQTSRC=%TOPQTSRC:~0,-1% for %%P in ("%QTDIR%") do set TOPQTDIR=%%~dpP set TOPQTDIR=%TOPQTDIR:~0,-1% +goto wastoplevel :notoplevel +if not exist ..\.qmake.super goto wastoplevel +echo ERROR: You cannot configure qtbase separately within a top-level build. >&2 +exit /b 1 +:wastoplevel set SYNCQT= set PLATFORM= diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index f517e69496..3adefb743e 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1700,6 +1700,14 @@ defineTest(qtConfProcessOutput) { !isEmpty(_QMAKE_SUPER_CACHE_):!equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) { # sub-repo within a top-level build; no need to configure anything. + !isEmpty(QMAKE_EXTRA_ARGS) { + # sub-projects don't get the extra args passed down automatically, + # so we can use their presence to detect misguided attempts to + # configure the repositories separately. + # caveat: a plain qmake call is indistinguishable from a recursion + # (by design), so we cannot detect this case. + error("You cannot configure $$TARGET separately within a top-level build.") + } return() } @@ -1717,8 +1725,11 @@ for (c, cfgs) { exists($$s/configure.json): \ configsToProcess += $$c } -isEmpty(configsToProcess): \ +isEmpty(configsToProcess) { + !isEmpty(QMAKE_EXTRA_ARGS): \ + error("This module does not accept configure command line arguments.") return() +} load(configure_base) |