make configure -redo and config.status able to handle spaces in arguments
Change-Id: If6ffe381b03595885570ae431a9937c6fdce164b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
9c877bf6ed
commit
36160e8980
10
configure
vendored
10
configure
vendored
@ -87,7 +87,13 @@ if [ x"$1" = x"-top-level" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# later cache the command line in config.status
|
# 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
|
# initialize global variables
|
||||||
QMAKE_SWITCHES=
|
QMAKE_SWITCHES=
|
||||||
@ -7040,7 +7046,7 @@ fi
|
|||||||
# finally save the executed command to another script
|
# finally save the executed command to another script
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
if [ `basename $0` != "config.status" ]; then
|
if [ `basename $0` != "config.status" ]; then
|
||||||
CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
|
CONFIG_STATUS="$relpath/$relconf$OPT_CMDLINE"
|
||||||
|
|
||||||
# add the system variables
|
# add the system variables
|
||||||
for varname in $SYSTEM_VARIABLES; do
|
for varname in $SYSTEM_VARIABLES; do
|
||||||
|
@ -4387,12 +4387,8 @@ void Configure::reloadCmdLine()
|
|||||||
QFile inFile(buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache");
|
QFile inFile(buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache");
|
||||||
if (inFile.open(QFile::ReadOnly)) {
|
if (inFile.open(QFile::ReadOnly)) {
|
||||||
QTextStream inStream(&inFile);
|
QTextStream inStream(&inFile);
|
||||||
QString buffer;
|
while (!inStream.atEnd())
|
||||||
inStream >> buffer;
|
configCmdLine += inStream.readLine().trimmed();
|
||||||
while (buffer.length()) {
|
|
||||||
configCmdLine += buffer;
|
|
||||||
inStream >> buffer;
|
|
||||||
}
|
|
||||||
inFile.close();
|
inFile.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4405,7 +4401,7 @@ void Configure::saveCmdLine()
|
|||||||
if (outFile.open(QFile::WriteOnly | QFile::Text)) {
|
if (outFile.open(QFile::WriteOnly | QFile::Text)) {
|
||||||
QTextStream outStream(&outFile);
|
QTextStream outStream(&outFile);
|
||||||
for (QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) {
|
for (QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) {
|
||||||
outStream << (*it) << " " << endl;
|
outStream << (*it) << endl;
|
||||||
}
|
}
|
||||||
outStream.flush();
|
outStream.flush();
|
||||||
outFile.close();
|
outFile.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user