summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure10
-rw-r--r--tools/configure/configureapp.cpp10
2 files changed, 11 insertions, 9 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
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3226e52279..adab4b7a9a 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -4387,12 +4387,8 @@ void Configure::reloadCmdLine()
QFile inFile(buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache");
if (inFile.open(QFile::ReadOnly)) {
QTextStream inStream(&inFile);
- QString buffer;
- inStream >> buffer;
- while (buffer.length()) {
- configCmdLine += buffer;
- inStream >> buffer;
- }
+ while (!inStream.atEnd())
+ configCmdLine += inStream.readLine().trimmed();
inFile.close();
}
}
@@ -4405,7 +4401,7 @@ void Configure::saveCmdLine()
if (outFile.open(QFile::WriteOnly | QFile::Text)) {
QTextStream outStream(&outFile);
for (QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) {
- outStream << (*it) << " " << endl;
+ outStream << (*it) << endl;
}
outStream.flush();
outFile.close();