From 1569c6d85e72558c6fbc0a6f90eedfab14139dd2 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Mon, 30 Sep 2019 11:40:35 +0300 Subject: [PATCH] Restore top-level build with a separate function We have other helper functions like this, and the way they are made to work is to pass the script's arguments down to them. Change-Id: I3b80e82a2fb3d6e6a65b2deca3b60e4e0dd8de07 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann --- configure | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 5ba76726d50..417137da6b6 100755 --- a/configure +++ b/configure @@ -97,6 +97,21 @@ fi CFG_TOPLEVEL= outpathPrefix= +checkTopLevelBuild() +{ + relpathMangled=$relpath + if [ x"$1" = x"-top-level" ]; then + CFG_TOPLEVEL=yes + relpathMangled=`dirname "$relpath"` + outpathPrefix=../ + else + if [ -f ../.qmake.super ]; then + echo >&2 "ERROR: You cannot configure qtbase separately within a top-level build." + exit 1 + fi + fi +} + CMAKE_CMDLINE= getCMakeCmdLine() { @@ -157,6 +172,9 @@ SAVED_IFS=$IFS IFS=' ' for i in "$@"; do + if [ x"$i" = x"-top-level" ]; then + continue + fi case $i in -redo|--redo) optfile=${outpathPrefix}config.opt @@ -967,20 +985,7 @@ else findAwk findMake checkQMakeEnv - - relpathMangled=$relpath - if [ x"$1" = x"-top-level" ]; then - CFG_TOPLEVEL=yes - 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 - + checkTopLevelBuild $@ getOptAndQMakeCmdLines $@ detectOperatingSystem maybeVerifyXcode