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 <thiago.macieira@intel.com>
This commit is contained in:
parent
078ad536c8
commit
a6b9729d1c
84
configure
vendored
84
configure
vendored
@ -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)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user