From a6b9729d1c8b0d347329fba56401023e6ccaf084 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 13 Nov 2013 15:44:48 +0100 Subject: [PATCH] don't initialize build dir earlier than necessary this way, platform detection (and later license checking) become (mostly) read-only operations. Change-Id: I4c5ffcf80feadfeee2c6e927cf0285f46fa6ea43 Reviewed-by: Thiago Macieira --- configure | 84 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/configure b/configure index 17b8b51778..40657c1f95 100755 --- a/configure +++ b/configure @@ -2802,48 +2802,6 @@ EOF exit 0 fi # Help -#------------------------------------------------------------------------------- -# build tree initialization -#------------------------------------------------------------------------------- - -# is this a shadow build? -if [ "$OPT_SHADOW" = "maybe" ]; then - OPT_SHADOW=no - if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then - if [ -h "$outpath" ]; then - [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes - else - OPT_SHADOW=yes - fi - fi -fi -if [ "$OPT_SHADOW" = "yes" ]; then - if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then - echo >&2 "You cannot make a shadow build from a source tree containing a previous build." - echo >&2 "Cannot proceed." - exit 1 - fi - [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." -fi - -# if the source tree is different from the build tree, -# symlink or copy part of the sources -if [ "$OPT_SHADOW" = "yes" ]; then - echo "Preparing build tree..." - - [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" - - mkdir -p "$outpath/mkspecs" -fi - -# symlink fonts to be able to run application from build directory -if [ ! -d "${outpath}/lib/fonts" ]; then - if [ "$PLATFORM" = "$XPLATFORM" ]; then - mkdir -p "${outpath}/lib" - ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" - fi -fi - #------------------------------------------------------------------------------- # platform detection #------------------------------------------------------------------------------- @@ -3209,6 +3167,48 @@ if [ "$CFG_RTOS_ENABLED" = "no" ]; then esac fi +#------------------------------------------------------------------------------- +# build tree initialization +#------------------------------------------------------------------------------- + +# is this a shadow build? +if [ "$OPT_SHADOW" = "maybe" ]; then + OPT_SHADOW=no + if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then + if [ -h "$outpath" ]; then + [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes + else + OPT_SHADOW=yes + fi + fi +fi +if [ "$OPT_SHADOW" = "yes" ]; then + if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then + echo >&2 "You cannot make a shadow build from a source tree containing a previous build." + echo >&2 "Cannot proceed." + exit 1 + fi + [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." +fi + +# if the source tree is different from the build tree, +# symlink or copy part of the sources +if [ "$OPT_SHADOW" = "yes" ]; then + echo "Preparing build tree..." + + [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" + + mkdir -p "$outpath/mkspecs" +fi + +# symlink fonts to be able to run application from build directory +if [ ! -d "${outpath}/lib/fonts" ]; then + if [ "$PLATFORM" = "$XPLATFORM" ]; then + mkdir -p "${outpath}/lib" + ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" + fi +fi + #------------------------------------------------------------------------------- # tests that don't need qmake (must be run before displaying help) #-------------------------------------------------------------------------------