summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure9
-rw-r--r--tools/configure/configureapp.cpp16
-rw-r--r--tools/configure/configureapp.h1
3 files changed, 24 insertions, 2 deletions
diff --git a/configure b/configure
index 43d52a896b..de2b3483d9 100755
--- a/configure
+++ b/configure
@@ -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)
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 50e491f20c..0ac3730b4e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -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") {
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index 3014e409f9..8f95e1fb95 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -104,6 +104,7 @@ private:
// Our variable dictionaries
QMap<QString,QString> dictionary;
+ QStringList allBuildParts;
QStringList defaultBuildParts;
QStringList buildParts;
QStringList nobuildParts;