Sync configure with Unix version (-make/-nomake)
Move previous -make <exe> feature to -make-tool <exe> Change-Id: I1cbc87e60e2588fd8b2a11c11178988003cac7c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
d24873c4f2
commit
b9a498bf51
@ -176,6 +176,7 @@ Configure::Configure(int& argc, char** argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultBuildParts << QStringLiteral("libs") << QStringLiteral("examples") << QStringLiteral("tests");
|
||||||
dictionary[ "QT_SOURCE_TREE" ] = fixSeparators(sourcePath);
|
dictionary[ "QT_SOURCE_TREE" ] = fixSeparators(sourcePath);
|
||||||
dictionary[ "QT_BUILD_TREE" ] = fixSeparators(buildPath);
|
dictionary[ "QT_BUILD_TREE" ] = fixSeparators(buildPath);
|
||||||
dictionary[ "QT_INSTALL_PREFIX" ] = fixSeparators(installPath);
|
dictionary[ "QT_INSTALL_PREFIX" ] = fixSeparators(installPath);
|
||||||
@ -948,11 +949,16 @@ void Configure::parseCmdLine()
|
|||||||
dictionary["LICENSE_CONFIRMED"] = "yes";
|
dictionary["LICENSE_CONFIRMED"] = "yes";
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (configCmdLine.at(i) == "-nomake") {
|
else if (configCmdLine.at(i) == "-make") {
|
||||||
++i;
|
++i;
|
||||||
if (i == argCount)
|
if (i == argCount)
|
||||||
break;
|
break;
|
||||||
disabledBuildParts += configCmdLine.at(i);
|
buildParts += configCmdLine.at(i);
|
||||||
|
} else if (configCmdLine.at(i) == "-nomake") {
|
||||||
|
++i;
|
||||||
|
if (i == argCount)
|
||||||
|
break;
|
||||||
|
nobuildParts.removeAll(configCmdLine.at(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Directories ----------------------------------------------
|
// Directories ----------------------------------------------
|
||||||
@ -1061,7 +1067,7 @@ void Configure::parseCmdLine()
|
|||||||
dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
|
dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (configCmdLine.at(i) == "-make") {
|
else if (configCmdLine.at(i) == "-make-tool") {
|
||||||
++i;
|
++i;
|
||||||
if (i == argCount)
|
if (i == argCount)
|
||||||
break;
|
break;
|
||||||
@ -1507,6 +1513,11 @@ bool Configure::displayHelp()
|
|||||||
"subdirectory targets. All other Makefiles are created as wrappers "
|
"subdirectory targets. All other Makefiles are created as wrappers "
|
||||||
"which will in turn run qmake\n");
|
"which will in turn run qmake\n");
|
||||||
|
|
||||||
|
desc( "-make <part>", "Add part to the list of parts to be built at make time.");
|
||||||
|
for (int i=0; i<defaultBuildParts.size(); ++i)
|
||||||
|
desc( "", qPrintable(QString(" %1").arg(defaultBuildParts.at(i))), false, ' ');
|
||||||
|
desc( "-nomake <part>", "Exclude part from the list of parts to be built.\n");
|
||||||
|
|
||||||
desc("EXCEPTIONS", "no", "-no-exceptions", "Disable exceptions on platforms that support it.");
|
desc("EXCEPTIONS", "no", "-no-exceptions", "Disable exceptions on platforms that support it.");
|
||||||
desc("EXCEPTIONS", "yes","-exceptions", "Enable exceptions on platforms that support it.\n");
|
desc("EXCEPTIONS", "yes","-exceptions", "Enable exceptions on platforms that support it.\n");
|
||||||
|
|
||||||
@ -2249,6 +2260,14 @@ void Configure::generateOutputVars()
|
|||||||
qmakeConfig += dictionary[ "BUILD" ];
|
qmakeConfig += dictionary[ "BUILD" ];
|
||||||
dictionary[ "QMAKE_OUTDIR" ] = dictionary[ "BUILD" ];
|
dictionary[ "QMAKE_OUTDIR" ] = dictionary[ "BUILD" ];
|
||||||
|
|
||||||
|
if (buildParts.isEmpty())
|
||||||
|
buildParts = defaultBuildParts;
|
||||||
|
while (!nobuildParts.isEmpty())
|
||||||
|
buildParts.removeAll(nobuildParts.takeFirst());
|
||||||
|
if (!buildParts.contains("libs"))
|
||||||
|
buildParts += "libs";
|
||||||
|
buildParts.removeDuplicates();
|
||||||
|
|
||||||
if (dictionary["MSVC_MP"] == "yes")
|
if (dictionary["MSVC_MP"] == "yes")
|
||||||
qmakeConfig += "msvc_mp";
|
qmakeConfig += "msvc_mp";
|
||||||
|
|
||||||
@ -2483,11 +2502,6 @@ void Configure::generateCachefile()
|
|||||||
moduleStream << "#paths" << endl;
|
moduleStream << "#paths" << endl;
|
||||||
moduleStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl;
|
moduleStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl;
|
||||||
moduleStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl;
|
moduleStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl;
|
||||||
QStringList buildParts;
|
|
||||||
buildParts << QStringLiteral("libs") << QStringLiteral("examples") << QStringLiteral("tests");
|
|
||||||
foreach (const QString &item, disabledBuildParts) {
|
|
||||||
buildParts.removeAll(item);
|
|
||||||
}
|
|
||||||
moduleStream << "QT_BUILD_PARTS = " << buildParts.join(" ") << endl << endl;
|
moduleStream << "QT_BUILD_PARTS = " << buildParts.join(" ") << endl << endl;
|
||||||
|
|
||||||
//so that we can build without an install first (which would be impossible)
|
//so that we can build without an install first (which would be impossible)
|
||||||
|
@ -107,13 +107,15 @@ public:
|
|||||||
private:
|
private:
|
||||||
// Our variable dictionaries
|
// Our variable dictionaries
|
||||||
QMap<QString,QString> dictionary;
|
QMap<QString,QString> dictionary;
|
||||||
|
QStringList defaultBuildParts;
|
||||||
|
QStringList buildParts;
|
||||||
|
QStringList nobuildParts;
|
||||||
QStringList licensedModules;
|
QStringList licensedModules;
|
||||||
QStringList allSqlDrivers;
|
QStringList allSqlDrivers;
|
||||||
QStringList allConfigs;
|
QStringList allConfigs;
|
||||||
QStringList disabledModules;
|
QStringList disabledModules;
|
||||||
QStringList enabledModules;
|
QStringList enabledModules;
|
||||||
QStringList modules;
|
QStringList modules;
|
||||||
QStringList disabledBuildParts;
|
|
||||||
// QStringList sqlDrivers;
|
// QStringList sqlDrivers;
|
||||||
QStringList configCmdLine;
|
QStringList configCmdLine;
|
||||||
QStringList qmakeConfig;
|
QStringList qmakeConfig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user