diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-02-18 17:37:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-20 15:22:55 +0100 |
commit | 3fdfde294ff0cfc09501e2d944043187e7e530c9 (patch) | |
tree | 37a3c004d0f64e0cea350ea8c1246cce9b2d2e94 /tools/configure/configureapp.cpp | |
parent | 23762682c1e685fb93182031cf71f96d24d0f3f4 (diff) |
add -skip option to the configures
this makes it possible to exclude modules from the build without moving
their sources out of the way. substitutes the much-requested -no-webkit.
not adding a symmetrical option, as it is relatively pointless:
to build only specific "leaf" modules, you only need to run
"make module-qt<module> ..." once you configured. and removing
particular "intermediate" modules is achieved with this very option.
Task-number: QTBUG-26697
Change-Id: I25cebdbd029885a2c653c4cde696f9bb78691768
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d9e3340c70..af470939e9 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1011,6 +1011,20 @@ void Configure::parseCmdLine() nobuildParts.append(configCmdLine.at(i)); } + else if (configCmdLine.at(i) == "-skip") { + ++i; + if (i == argCount) + break; + QString mod = configCmdLine.at(i); + if (!mod.startsWith(QStringLiteral("qt"))) + mod.insert(0, QStringLiteral("qt")); + if (!QFileInfo(sourcePath + "/../" + mod).isDir()) { + cout << "Attempting to skip non-existent module " << mod << "." << endl; + dictionary["DONE"] = "error"; + } + skipModules += mod; + } + // Directories ---------------------------------------------- else if (configCmdLine.at(i) == "-prefix") { ++i; @@ -1647,6 +1661,8 @@ bool Configure::displayHelp() desc( "", qPrintable(QString(" %1").arg(defaultBuildParts.at(i))), false, ' '); desc( "-nomake <part>", "Exclude part from the list of parts to be built.\n"); + desc( "-skip <module>", "Exclude an entire module from the build.\n"); + desc("WIDGETS", "no", "-no-widgets", "Disable Qt Widgets module.\n"); desc("ACCESSIBILITY", "no", "-no-accessibility", "Disable accessibility support.\n"); @@ -2778,7 +2794,10 @@ void Configure::generateCachefile() if (moduleFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file. QTextStream moduleStream(&moduleFile); - moduleStream << "QT_BUILD_PARTS += " << buildParts.join(' ') << endl << endl; + moduleStream << "QT_BUILD_PARTS += " << buildParts.join(' ') << endl; + if (!skipModules.isEmpty()) + moduleStream << "QT_SKIP_MODULES += " << skipModules.join(' ') << endl; + moduleStream << endl; if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE") moduleStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl; |