From 7022cf9d71a0995e2ada9e7daa53e31808f41443 Mon Sep 17 00:00:00 2001 From: "vestbo@webkit.org" Date: Wed, 18 Jan 2012 11:32:33 +0000 Subject: [PATCH] [Qt] Allow building only a subset of the WebKit sub-projects Fixes build-jsc, broken in r104825. We no longer need the intermediate buildQMakeQtProject(), as we're the only port using qmake, and buildQMakeProject is now highly Qt specific. Reviewed by Simon Hausmann. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105258 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Tools/ChangeLog | 18 ++++++++++++++++++ Tools/Scripts/build-jsc | 3 ++- Tools/Scripts/build-webkit | 13 ++++++++----- Tools/Scripts/webkitdirs.pm | 19 +++---------------- 4 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index fd870acd..a2c578a 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,21 @@ +2012-01-18 Tor Arne Vestbø + + [Qt] Allow building only a subset of the WebKit sub-projects + + Fixes build-jsc, broken in r104825. + + We no longer need the intermediate buildQMakeQtProject(), as we're the + only port using qmake, and buildQMakeProject is now highly Qt specific. + + + + Reviewed by Simon Hausmann. + + * Scripts/build-jsc: + * Scripts/build-webkit: + * Scripts/webkitdirs.pm: + (buildQMakeProjects): + 2012-01-18 Ryosuke Niwa run-perf-tests should generate a json file that summaries the result diff --git a/Tools/Scripts/build-jsc b/Tools/Scripts/build-jsc index 9192f85..2da9ee9 100755 --- a/Tools/Scripts/build-jsc +++ b/Tools/Scripts/build-jsc @@ -73,7 +73,8 @@ if (isAppleMacWebKit()) { } elsif (isQt()) { # Remove duplicated --qt options to avoid passing them to qmake checkForArgumentAndRemoveFromARGV("--qt"); - $result = buildQMakeProject("JavaScriptCore", 0, @ARGV); + my @projects = ("WTF", "JavaScriptCore"); + $result = buildQMakeProjects(\@projects, 0, @ARGV); } elsif (isWx()) { # Builds everything in one-shot. No need to build anything here. $result = 0; diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit index 2dee580..2d961ae 100755 --- a/Tools/Scripts/build-webkit +++ b/Tools/Scripts/build-webkit @@ -655,13 +655,19 @@ if (isBlackBerry()) { buildCMakeProjectOrExit($clean, "BlackBerry", $prefixPath, $makeArgs, (cmakeBasedPortArguments(), cMakeArgsFromFeatures())); } +if (isQt()) { + @projects = (); # An empty projects list will build the default projects + my $result = buildQMakeProjects(\@projects, $clean, @options); + exit exitStatus($result) if exitStatus($result); +} + # Build, and abort if the build fails. for my $dir (@projects) { chdir $dir or die; my $result = 0; - # For Gtk and Qt the WebKit project builds all others - if ((isGtk() || isQt()) && $dir ne "Source/WebKit") { + # For Gtk the WebKit project builds all others + if (isGtk() && $dir ne "Source/WebKit") { chdirWebKit(); next; } @@ -672,9 +678,6 @@ for my $dir (@projects) { unshift(@options, "--enable-webkit2"); } $result = buildGtkProject($project, $clean, @options); - } elsif (isQt()) { - #FIXME: $dir should probably be $project. - $result = buildQMakeQtProject($dir, $clean, @options); } elsif (isAppleMacWebKit()) { my @local_options = @options; push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $project ne "ANGLE"; diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm index ecf85ee..b2cabd4 100755 --- a/Tools/Scripts/webkitdirs.pm +++ b/Tools/Scripts/webkitdirs.pm @@ -2012,9 +2012,9 @@ sub promptUser return $input ? $input : $default; } -sub buildQMakeProject($@) +sub buildQMakeProjects { - my ($project, $clean, @buildParams) = @_; + my ($projects, $clean, @buildParams) = @_; my @buildArgs = (); @@ -2134,9 +2134,7 @@ sub buildQMakeProject($@) my $makefile = File::Spec->catfile($dir, "Makefile"); if (! -e $makefile) { - if ($project) { - push @buildArgs, "-after OVERRIDE_SUBDIRS=" . $project; - } + push @buildArgs, "-after OVERRIDE_SUBDIRS=\"@{$projects}\"" if @{$projects}; push @buildArgs, File::Spec->catfile(sourceDir(), "WebKit.pro"); my $command = "$qmakecommand @buildArgs"; @@ -2148,10 +2146,6 @@ sub buildQMakeProject($@) if ($result ne 0) { die "Failed to setup build environment using $qmakebin!\n"; } - } elsif ($project) { - $dir = File::Spec->catfile($dir, "Source", $project); - chdir $dir or die "Failed to cd into " . $dir . "\n"; - $make = "$make -f Makefile.$project"; } my $command = "$make $makeargs"; @@ -2170,13 +2164,6 @@ sub buildQMakeProject($@) return $result; } -sub buildQMakeQtProject($$@) -{ - my ($project, $clean, @buildArgs) = @_; - - return buildQMakeProject("", $clean, @buildArgs); -} - sub buildGtkProject { my ($project, $clean, @buildArgs) = @_; -- 2.7.4