summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-07-06 13:58:53 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-18 17:10:25 +0000
commitfd3e12e7a6c71a244650415a86e98d910a011ebe (patch)
tree4b060b69d7cf683d477c731a01dd27fc4cb4ef46 /configure
parent9172143f52757c29fbcf1a5f30d5ca25c52efb81 (diff)
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without modifying (or wrapping) the spec itself. linux distributors do this on a regular basis. so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat autoconf-like fashion. however, over time, this approach proved problematic: the concept doesn't mix particularly well with mkspecs to start with, is unexpected (and therefore causes frustration), and doesn't mix well with cross-building (at least the way it was realized). ironically, it was implemented this way (quite a while ago) upon my explicit request ... the new mechanism uses explicit variable manipulations on the configure command line, just like qmake itself understands. as it happens, this is again quite similar to autoconf-generated configure scripts. however, this time around we don't pretend to be actually autoconf-like, so we also don't try to map any variable names (some of which have different semantics anyway). this commit also eliminates the last use of the QMakeVar() function, so delete it and the underlying infrastructure. Task-number: QTBUG-32530 Task-number: QTBUG-42962 Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure66
1 files changed, 1 insertions, 65 deletions
diff --git a/configure b/configure
index a51a377c0c..6a425232e5 100755
--- a/configure
+++ b/configure
@@ -92,11 +92,9 @@ $i"
done
# initialize global variables
-QMAKE_VARS_FILE=.qmake.vars
DEVICE_VARS_FILE=.device.vars
HOST_VARS_FILE=.host.vars
-:> "$QMAKE_VARS_FILE"
:> "$DEVICE_VARS_FILE"
:> "$HOST_VARS_FILE"
@@ -124,29 +122,6 @@ makeabs()
echo "$RES" | sed 's,//,/,g; s,/$,,'
}
-# Adds a new qmake variable to the cache
-# Usage: QMakeVar mode varname contents
-# where mode is one of: set, add, del
-QMakeVar()
-{
- case "$1" in
- set)
- eq="="
- ;;
- add)
- eq="+="
- ;;
- del)
- eq="-="
- ;;
- *)
- echo >&2 "BUG: wrong command to QMakeVar: $1"
- ;;
- esac
-
- echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
-}
-
# Helper function for getQMakeConf. It parses include statements in
# qmake.conf and prints out the expanded file
expandQMakeConf()
@@ -445,32 +420,10 @@ fi
# initalize variables
#-------------------------------------------------------------------------------
-SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
-for varname in $SYSTEM_VARIABLES; do
- qmakevarname="${varname}"
- qmakecmdargs=""
- # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
- if [ "${varname}" = "LDFLAGS" ]; then
- qmakevarname="LFLAGS"
- elif [ "${varname}" = "LD" ]; then
- qmakevarname="LINK"
- elif [ "${varname}" = "AR" ]; then
- # QMAKE_AR needs to be set to "/path/to/ar cqs" but the
- # environment variable will be set to the command only so we
- # need to append " cqs" for autoconf compatibility
- qmakecmdargs=" cqs"
- fi
- cmd=`echo \
-'if [ -n "\$'${varname}'" ]; then
- QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'"
-fi'`
- eval "$cmd"
-done
-
# Use CC/CXX to run config.tests
mkdir -p "$outpath/config.tests"
rm -f "$outpath/config.tests/.qmake.cache"
-cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
+: > "$outpath/config.tests/.qmake.cache"
# QTDIR may be set and point to an old or system-wide Qt installation
unset QTDIR
@@ -1956,14 +1909,6 @@ else
echo
fi
-if [ "$OPT_VERBOSE" = "yes" ]; then
- echo $ECHO_N "qmake vars .......... $ECHO_C"
- cat "$QMAKE_VARS_FILE" | tr '\n' ' '
- echo
-fi
-
-rm -f "$QMAKE_VARS_FILE" 2>/dev/null
-
#-------------------------------------------------------------------------------
# build makefiles based on the configuration
#-------------------------------------------------------------------------------
@@ -1986,15 +1931,6 @@ rm -f "$QMAKE_VARS_FILE" 2>/dev/null
if [ `basename $0` != "config.status" ]; then
CONFIG_STATUS="$relpath/$relconf$OPT_CMDLINE"
- # add the system variables
- for varname in $SYSTEM_VARIABLES; do
- cmd=`echo \
-'if [ -n "\$'${varname}'" ]; then
- CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
-fi'`
- eval "$cmd"
- done
-
echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
[ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"