summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-02-18 17:37:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-20 15:22:55 +0100
commit3fdfde294ff0cfc09501e2d944043187e7e530c9 (patch)
tree37a3c004d0f64e0cea350ea8c1246cce9b2d2e94
parent23762682c1e685fb93182031cf71f96d24d0f3f4 (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>
-rwxr-xr-xconfigure16
-rw-r--r--dist/changes-5.0.23
-rw-r--r--tools/configure/configureapp.cpp21
-rw-r--r--tools/configure/configureapp.h1
-rw-r--r--tools/configure/main.cpp2
5 files changed, 41 insertions, 2 deletions
diff --git a/configure b/configure
index 4a1836e5b0..360e58dc2d 100755
--- a/configure
+++ b/configure
@@ -777,6 +777,7 @@ CFG_SQL_AVAILABLE=
QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS=""
+CFG_SKIP_MODULES=""
CFG_RELEASE_QMAKE=no
CFG_AUDIO_BACKEND=auto
CFG_V8SNAPSHOT=auto
@@ -995,7 +996,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style options that pass an argument
- -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@@ -1288,6 +1289,14 @@ while [ "$#" -gt 0 ]; do
make)
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
;;
+ skip)
+ VAL=qt${VAL#qt}
+ if ! [ -d $relpath/../$VAL ]; then
+ echo "Attempting to skip non-existent module $VAL." >&2
+ exit 1
+ fi
+ CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL"
+ ;;
sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then
CFG_SDK="$VAL"
@@ -3193,6 +3202,8 @@ Additional options:
($QT_DEFAULT_BUILD_PARTS)
-nomake <part> ..... Exclude part from the list of parts to be built.
+ -skip <module> ..... Exclude an entire module from the build.
+
-no-gui ............ Don't build the Qt GUI module and dependencies.
+ -gui ............... Build the Qt GUI module and dependencies.
@@ -6084,6 +6095,9 @@ QTMODULE="$outpath/mkspecs/qmodule.pri"
echo "CONFIG += $QMAKE_CONFIG" >> "$QTMODULE.tmp"
echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp"
+if [ -n "$CFG_SKIP_MODULES" ]; then
+ echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp"
+fi
if [ -n "$QT_CFLAGS_PSQL" ]; then
echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2
index 5e170a35be..108512a98a 100644
--- a/dist/changes-5.0.2
+++ b/dist/changes-5.0.2
@@ -22,6 +22,9 @@ information about a particular change.
General Improvements
--------------------
+ - [QTBUG-26697] The -skip option was added to configure, which enables not
+ building particular modules. Typical use case: -skip webkit.
+
Third party components
----------------------
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;
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index 271a384be7..3cb5de8520 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -116,6 +116,7 @@ private:
QStringList defaultBuildParts;
QStringList buildParts;
QStringList nobuildParts;
+ QStringList skipModules;
QStringList licensedModules;
QStringList allSqlDrivers;
QStringList allConfigs;
diff --git a/tools/configure/main.cpp b/tools/configure/main.cpp
index 1b402b1a59..c4154c8f38 100644
--- a/tools/configure/main.cpp
+++ b/tools/configure/main.cpp
@@ -58,6 +58,8 @@ int runConfigure( int argc, char** argv )
#if !defined(EVAL)
app.validateArgs();
#endif
+ if (!app.isOk())
+ return 3;
if( app.displayHelp() )
return 1;