summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-09-06 09:25:23 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-09-07 06:29:43 (GMT)
commit7d82bbb0d6b16356458eead0418e307ed92c79fa (patch)
treea00eb8dc61162207a57ab13c0c98d944cfe8a5d5 /configure
parentb6d1a35d6cb464f643d7905ec731069e729d4ad4 (diff)
downloadQt-7d82bbb0d6b16356458eead0418e307ed92c79fa.zip
Qt-7d82bbb0d6b16356458eead0418e307ed92c79fa.tar.gz
Qt-7d82bbb0d6b16356458eead0418e307ed92c79fa.tar.bz2
Minimal backport of --device-option support in configure
This parial backport only adds the --device-option so it becomes possible to set and cache additional qmake variables. Partial cherry pick from qtbase/84e98fd9d2594637e928096c8fcb19d52e5e2676 Change-Id: I96636766aec7e12bfb1d377c8a607301a325a46c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure40
1 files changed, 39 insertions, 1 deletions
diff --git a/configure b/configure
index 88d03ca..7f618dd 100755
--- a/configure
+++ b/configure
@@ -71,8 +71,10 @@ QTCONFIG_CONFIG=
QT_CONFIG=
SUPPORTED=
QMAKE_VARS_FILE=.qmake.vars
+DEVICE_VARS_FILE=.device.vars
:> "$QMAKE_VARS_FILE"
+:> "$DEVICE_VARS_FILE"
#-------------------------------------------------------------------------------
# utility functions
@@ -224,6 +226,23 @@ linkerSupportsFlag()
}
#-------------------------------------------------------------------------------
+# device options
+#-------------------------------------------------------------------------------
+DeviceVar()
+{
+ case "$1" in
+ set)
+ eq="="
+ ;;
+ *)
+ echo >&2 "BUG: wrong command to QMakeVar: $1"
+ ;;
+ esac
+
+ echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
+}
+
+#-------------------------------------------------------------------------------
# operating system detection
#-------------------------------------------------------------------------------
@@ -1122,7 +1141,7 @@ while [ "$#" -gt 0 ]; do
shift
VAL=$1
;;
- -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@@ -1667,6 +1686,11 @@ while [ "$#" -gt 0 ]; do
case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
;;
+ device-option)
+ DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
+ DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
+ DeviceVar set $DEV_VAR $DEV_VAL
+ ;;
debug-and-release)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_DEBUG_RELEASE="$VAL"
@@ -3297,6 +3321,17 @@ if [ "$OPT_VERBOSE" = "yes" ]; then
fi
#-------------------------------------------------------------------------------
+# write out device config before we run the test.
+#-------------------------------------------------------------------------------
+DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
+if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
+ rm -f "$DEVICE_VARS_FILE"
+else
+ mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
+ DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
+fi
+
+#-------------------------------------------------------------------------------
# tests that don't need qmake (must be run before displaying help)
#-------------------------------------------------------------------------------
@@ -4384,6 +4419,9 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
-xplatform target ... The target platform when cross-compiling.
+ -device-option <key=value> ... Add device specific options for the device mkspec
+ (experimental)
+
-no-feature-<feature> Do not compile in <feature>.
-feature-<feature> .. Compile in <feature>. The available features
are described in src/corelib/global/qfeatures.txt