From 3ecfeb3629ab9628a6a52bb7a86e9e53af8595c2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 Sep 2019 12:04:54 +0200 Subject: [PATCH] Fix top-level builds with qmake The separation of functionality into functions in commit 37756ede09402931758efc51072147a3ea73d961 accidentally broke top-level builds as the function to detect -top-level was operating on local parameters (shift) or they were not available ($1). Inlining these few lines fixes it. Change-Id: Icf609dc5e7b361997847f3ef3a1b10635c122d5d Reviewed-by: Ville Voutilainen --- configure | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/configure b/configure index d82455f880..5ba76726d5 100755 --- a/configure +++ b/configure @@ -96,21 +96,6 @@ fi # do this early so we don't store it in config.status CFG_TOPLEVEL= outpathPrefix= -checkTopLevelBuild() -{ -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 -} CMAKE_CMDLINE= getCMakeCmdLine() @@ -982,7 +967,20 @@ else findAwk findMake checkQMakeEnv - checkTopLevelBuild + + 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 + getOptAndQMakeCmdLines $@ detectOperatingSystem maybeVerifyXcode