summaryrefslogtreecommitdiffstats
path: root/bin/qt5_tool
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-17 09:05:57 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-24 12:08:07 +0000
commit854c5377227f1543ec55231811e02a073e6ae1a6 (patch)
tree7c7eff9faba596971ae4e8369372ae4f1059d193 /bin/qt5_tool
parent2cdbcc846c2d5ec233ea5189d1eb92c1d48b6c36 (diff)
qt5_tool: Introduce configuration file key for modules to be skipped.
Having to specify the modules in 'configureArguments' causes overlong configuration files lines as Qt grows (-skip qtquick1 ...) Introduce as eparate key 'skip' for this, in which only the module names are listed (qtquick1 ...). Change-Id: I00f72630e1fc69086c76d67985fea1601b9b3f3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'bin/qt5_tool')
-rwxr-xr-xbin/qt5_tool18
1 files changed, 15 insertions, 3 deletions
diff --git a/bin/qt5_tool b/bin/qt5_tool
index 26b4123..6abd2f4 100755
--- a/bin/qt5_tool
+++ b/bin/qt5_tool
@@ -88,6 +88,7 @@ initArguments: Arguments to init-repository for -q.
codeReviewUser: User name for code review (Gerrit)
branch: 'dev', 'stable', 'release' or other
configureArguments: Arguments to configure
+skip: List of Qt modules to exclude from building
shadowBuildPostfix: Postfix to use for shadow build directory.
Example:
@@ -566,9 +567,12 @@ if (($BOOTSTRAP + $BUILD != 0 || defined $optGerritModule) && ! -f $configFile)
$newCodeReviewUser = prompt('Enter CodeReview user name', $user) if ($newDeveloperBuild);
my $newInitArguments = prompt('Enter arguments to init-repository', $newInitArgumentsDefault);
my $newConfigureArguments = prompt('Enter arguments to configure', defaultConfigureArguments($newDeveloperBuild));
+ my $defaultkippedModules = 'qt3d qtcanvas3d qtconnectivity qtenginio qtfeedback qtgraphicaleffects qtlocation qtpim qtquick1 qtscript qtsensors qtserialport qtsystems qtwayland qtwebchannel qtwebengine qtwebsockets qtxmlpatterns';
+ my $newSkippedModules = prompt('Enter a list of modules to skip', $defaultkippedModules);
my $newBranch = prompt('Branch', 'dev');
my $configFileHandle = new IO::File('>' . $configFile) or die ('Unable to write to ' . $configFile . ':' . $!);
print $configFileHandle 'configureArguments=', $newConfigureArguments, "\n" if $newConfigureArguments ne '';
+ print $configFileHandle 'skip=',$newSkippedModules, "\n" if $newSkippedModules ne '';
print $configFileHandle 'initArguments=',$newInitArguments, "\n" if $newInitArguments ne '';
print $configFileHandle 'codeReviewUser=', $newCodeReviewUser,"\n" if $newCodeReviewUser ne '';
print $configFileHandle $branchConfigKey, '=', $newBranch,"\n";
@@ -837,9 +841,16 @@ if ( $BUILD != 0 ) {
my @configureArguments;
my $configureArgumentsFromConfig = readQt5ToolConfig('configureArguments');
push(@configureArguments, split(/ /, $configureArgumentsFromConfig)) unless $configureArgumentsFromConfig eq '';
- if (!$BUILD_WEBKIT) {
- push(@configureArguments, "-skip");
- push(@configureArguments, "qtwebkit");
+ my $skippedModules = readQt5ToolConfig('skip');
+ my @skipList;
+ push(@skipList, 'qtwebkit') if !$BUILD_WEBKIT;
+ push(@skipList, split(/ /, readQt5ToolConfig('skip')));
+ foreach my $skippedModule (@skipList) {
+ if (-d File::Spec->catfile($rootDir, $skippedModule)) {
+ push(@configureArguments, '-skip', $skippedModule);
+ } else {
+ warn('Module to be skipped does not exist : ' . $skippedModule);
+ }
}
$makeInstallRequired = grep(/^-prefix$/, @configureArguments);
my $developerBuildSpecified = grep(/-developer-build/, @configureArguments);
@@ -855,6 +866,7 @@ if ( $BUILD != 0 ) {
chdir($shadowBuildDir) or die ('Unable to chdir ' . $shadowBuildDir . ' :' . $!);
}
# ---- Configure and build
+ print 'Configure arguments: ', join(' ', @configureArguments), "\n";
my $brc = execute(File::Spec->catfile($rootDir, 'configure'), @configureArguments);
die 'Configure failed' if ($brc);
} # BUILD