summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-10-25 20:08:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-30 23:26:58 +0100
commit54c8c7a96a9303e7a56ca3cef8dcb1e91f23f2ac (patch)
tree3a3994541da8446b61ca184d0902095f56fb6994 /configure
parentfe41442575b64956aec5c67f909f1eab7da1015b (diff)
duplicate less work while handling -qconfig
Change-Id: I8ba6b866f98c9fe7609af71c168023097e32828c Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 12 insertions, 11 deletions
diff --git a/configure b/configure
index d74d811546..f8dcebe9f6 100755
--- a/configure
+++ b/configure
@@ -2389,6 +2389,7 @@ while [ "$#" -gt 0 ]; do
done
# update QT_CONFIG to show our current predefined configuration
+CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h
case "$CFG_QCONFIG" in
minimal|small|medium|large|full)
# these are a sequence of increasing functionality
@@ -2396,15 +2397,19 @@ minimal|small|medium|large|full)
QT_CONFIG="$QT_CONFIG $c-config"
[ "$CFG_QCONFIG" = $c ] && break
done
+ [ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH=
;;
*)
# not known to be sufficient for anything
- if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
- echo >&2 "Error: configuration file not found:"
- echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
- echo >&2 " or"
- echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
- OPT_HELP=yes
+ if [ ! -f "$CFG_QCONFIG_PATH" ]; then
+ CFG_QCONFIG_PATH=`"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`
+ if [ ! -f "$CFG_QCONFIG_PATH" ]; then
+ echo >&2 "Error: configuration file not found:"
+ echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
+ echo >&2 " or"
+ echo >&2 " $CFG_QCONFIG_PATH"
+ OPT_HELP=yes
+ fi
fi
esac
@@ -6319,11 +6324,7 @@ full)
*)
tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
- if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
- cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
- elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
- cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
- fi
+ cat "$CFG_QCONFIG_PATH" >>"$tmpconfig"
echo "#endif" >>"$tmpconfig"
;;
esac