complain about bad arguments to -make/-nomake
Task-number: QTBUG-5366 Change-Id: I461a6c85fcee4a0216571d294171652b05ee6a34 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
0343b92660
commit
1aaeb9538b
9
configure
vendored
9
configure
vendored
@ -876,6 +876,7 @@ CFG_SSE=auto
|
||||
CFG_FONTCONFIG=auto
|
||||
CFG_LIBFREETYPE=auto
|
||||
CFG_SQL_AVAILABLE=
|
||||
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
||||
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
||||
CFG_BUILD_PARTS=""
|
||||
CFG_NOBUILD_PARTS=""
|
||||
@ -1430,9 +1431,17 @@ while [ "$#" -gt 0 ]; do
|
||||
fi
|
||||
;;
|
||||
nomake)
|
||||
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
||||
echo "Unknown part $VAL passed to -nomake." >&2
|
||||
exit 1
|
||||
fi
|
||||
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
|
||||
;;
|
||||
make)
|
||||
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
||||
echo "Unknown part $VAL passed to -make." >&2
|
||||
exit 1
|
||||
fi
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
||||
;;
|
||||
skip)
|
||||
|
@ -171,6 +171,8 @@ Configure::Configure(int& argc, char** argv)
|
||||
}
|
||||
|
||||
defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples");
|
||||
allBuildParts = defaultBuildParts;
|
||||
allBuildParts << QStringLiteral("tests");
|
||||
dictionary[ "QT_SOURCE_TREE" ] = sourcePath;
|
||||
dictionary[ "QT_BUILD_TREE" ] = buildPath;
|
||||
dictionary[ "QT_INSTALL_PREFIX" ] = installPath;
|
||||
@ -1001,12 +1003,22 @@ void Configure::parseCmdLine()
|
||||
++i;
|
||||
if (i == argCount)
|
||||
break;
|
||||
buildParts += configCmdLine.at(i);
|
||||
QString part = configCmdLine.at(i);
|
||||
if (!allBuildParts.contains(part)) {
|
||||
cout << "Unknown part " << part << " passed to -make." << endl;
|
||||
dictionary["DONE"] = "error";
|
||||
}
|
||||
buildParts += part;
|
||||
} else if (configCmdLine.at(i) == "-nomake") {
|
||||
++i;
|
||||
if (i == argCount)
|
||||
break;
|
||||
nobuildParts.append(configCmdLine.at(i));
|
||||
QString part = configCmdLine.at(i);
|
||||
if (!allBuildParts.contains(part)) {
|
||||
cout << "Unknown part " << part << " passed to -nomake." << endl;
|
||||
dictionary["DONE"] = "error";
|
||||
}
|
||||
nobuildParts += part;
|
||||
}
|
||||
|
||||
else if (configCmdLine.at(i) == "-skip") {
|
||||
|
@ -104,6 +104,7 @@ private:
|
||||
|
||||
// Our variable dictionaries
|
||||
QMap<QString,QString> dictionary;
|
||||
QStringList allBuildParts;
|
||||
QStringList defaultBuildParts;
|
||||
QStringList buildParts;
|
||||
QStringList nobuildParts;
|
||||
|
Loading…
Reference in New Issue
Block a user