summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2014-11-18 20:21:09 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-04 16:33:45 +0000
commit36160e898020249e65bbed168d805a2c44e7814a (patch)
treea82926787990dd9853b5c4487e3a2ea67e6c6a8a /configure
parent9c877bf6ed39237863b2801682a3532bfee3034d (diff)
make configure -redo and config.status able to handle spaces in arguments
Change-Id: If6ffe381b03595885570ae431a9937c6fdce164b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure b/configure
index a1861ca006..33ac6b5f89 100755
--- a/configure
+++ b/configure
@@ -87,7 +87,13 @@ if [ x"$1" = x"-top-level" ]; then
fi
# later cache the command line in config.status
-OPT_CMDLINE=`echo $@ | sed 's,-v ,,g; s,-v$,,g'`
+OPT_CMDLINE=
+for i in "$@"; do
+ if [ "x$i" != "x-v" ]; then
+ [ -z "${i##* *}" ] && i="'$i'"
+ OPT_CMDLINE="$OPT_CMDLINE $i"
+ fi
+done
# initialize global variables
QMAKE_SWITCHES=
@@ -7040,7 +7046,7 @@ fi
# finally save the executed command to another script
#-------------------------------------------------------------------------------
if [ `basename $0` != "config.status" ]; then
- CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
+ CONFIG_STATUS="$relpath/$relconf$OPT_CMDLINE"
# add the system variables
for varname in $SYSTEM_VARIABLES; do