diff options
Diffstat (limited to 'WebKitTools/Scripts/build-webkit')
| -rwxr-xr-x | WebKitTools/Scripts/build-webkit | 124 |
1 files changed, 98 insertions, 26 deletions
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit index 5ae1aae..acd7736 100755 --- a/WebKitTools/Scripts/build-webkit +++ b/WebKitTools/Scripts/build-webkit @@ -31,6 +31,7 @@ use strict; use File::Basename; +use File::Find; use File::Spec; use FindBin; use Getopt::Long qw(:config pass_through); @@ -48,23 +49,33 @@ chdirWebKit(); my $showHelp = 0; my $clean = 0; my $minimal = 0; +my $installHeaders; +my $installLibs; +my $prefixPath; my $makeArgs; my $startTime = time(); -my ($threeDCanvasSupport, $threeDRenderingSupport, $channelMessagingSupport, $clientBasedGeolocationSupport, $databaseSupport, $datagridSupport, $datalistSupport, - $domStorageSupport, $eventsourceSupport, $filtersSupport, $geolocationSupport, $iconDatabaseSupport, $indexedDatabaseSupport, - $javaScriptDebuggerSupport, $mathmlSupport, $offlineWebApplicationSupport, $rubySupport, $sharedWorkersSupport, +my ($linkPrefetchSupport, $threeDCanvasSupport, $threeDRenderingSupport, $channelMessagingSupport, $clientBasedGeolocationSupport, $databaseSupport, $datagridSupport, $datalistSupport, + $domStorageSupport, $eventsourceSupport, $filtersSupport, $geolocationSupport, $iconDatabaseSupport, $imageResizerSupport, $indexedDatabaseSupport, $inputSpeechSupport, + $javaScriptDebuggerSupport, $mathmlSupport, $offlineWebApplicationSupport, $rubySupport, $systemMallocSupport, $sandboxSupport, $sharedWorkersSupport, $svgSupport, $svgAnimationSupport, $svgAsImageSupport, $svgDOMObjCBindingsSupport, $svgFontsSupport, - $svgForeignObjectSupport, $svgUseSupport, $videoSupport, $webSocketsSupport, $wmlSupport, $wcssSupport, $xhtmlmpSupport, $workersSupport, - $xpathSupport, $xsltSupport, $coverageSupport, $notificationsSupport); + $svgForeignObjectSupport, $svgUseSupport, $videoSupport, $webSocketsSupport, $webTimingSupport, $wmlSupport, $wcssSupport, $xhtmlmpSupport, $workersSupport, + $xpathSupport, $xsltSupport, $coverageSupport, $notificationsSupport, $blobSupport, $tiledBackingStoreSupport, + $fileWriterSupport, $fileSystemSupport, $directoryUploadSupport, $deviceOrientationSupport); my @features = ( + { option => "link-prefetch", desc => "Toggle pre fetching support", + define => "ENABLE_LINK_PREFETCH", default => 0, value => \$linkPrefetchSupport }, + { option => "3d-canvas", desc => "Toggle 3D canvas support", - define => "ENABLE_3D_CANVAS", default => (isAppleMacWebKit() && !isTiger()), value => \$threeDCanvasSupport }, + define => "ENABLE_3D_CANVAS", default => (isAppleMacWebKit() && !isTiger() && !isLeopard()), value => \$threeDCanvasSupport }, { option => "3d-rendering", desc => "Toggle 3D rendering support", define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() && !isTiger()), value => \$threeDRenderingSupport }, + { option => "blob", desc => "Toggle Blob support", + define => "ENABLE_BLOB", default => (isAppleMacWebKit()), value => \$blobSupport }, + { option => "channel-messaging", desc => "Toggle MessageChannel and MessagePort support", define => "ENABLE_CHANNEL_MESSAGING", default => 1, value => \$channelMessagingSupport }, @@ -83,6 +94,9 @@ my @features = ( { option => "datalist", desc => "Toggle HTML5 datalist support", define => "ENABLE_DATALIST", default => 1, value => \$datalistSupport }, + { option => "directory-upload", desc => "Toogle Directory upload support", + define => "ENABLE_DIRECTORY_UPLOAD", default => 0, value => \$directoryUploadSupport }, + { option => "dom-storage", desc => "Toggle DOM Storage Support", define => "ENABLE_DOM_STORAGE", default => 1, value => \$domStorageSupport }, @@ -97,15 +111,21 @@ my @features = ( { option => "icon-database", desc => "Toggle Icon database support", define => "ENABLE_ICONDATABASE", default => 1, value => \$iconDatabaseSupport }, + + { option => "image-resizer", desc => "Toggle Image Resizer API support", + define => "ENABLE_IMAGE_RESIZER", default => 0, value => \$imageResizerSupport }, { option => "indexed-database", desc => "Toggle Indexed Database API support", define => "ENABLE_INDEXED_DATABASE", default => 0, value => \$indexedDatabaseSupport }, + { option => "input-speech", desc => "Speech Input API support", + define => "ENABLE_INPUT_SPEECH", default => 0, value => \$inputSpeechSupport }, + { option => "javascript-debugger", desc => "Toggle JavaScript Debugger/Profiler support", define => "ENABLE_JAVASCRIPT_DEBUGGER", default => 1, value => \$javaScriptDebuggerSupport }, { option => "mathml", desc => "Toggle MathML support", - define => "ENABLE_MATHML", default => 0, value => \$mathmlSupport }, + define => "ENABLE_MATHML", default => 1, value => \$mathmlSupport }, { option => "notifications", desc => "Toggle Desktop Notifications Support", define => "ENABLE_NOTIFICATIONS", default => 0, value => \$notificationsSupport }, @@ -116,6 +136,12 @@ my @features = ( { option => "ruby", desc => "Toggle HTML5 Ruby support", define => "ENABLE_RUBY", default => 1, value => \$rubySupport }, + { option => "system-malloc", desc => "Toggle system allocator instead of TCmalloc", + define => "USE_SYSTEM_MALLOC", default => 0, value => \$systemMallocSupport }, + + { option => "sandbox", desc => "Toggle HTML5 Sandboxed iframe support", + define => "ENABLE_SANDBOX", default => 1, value => \$sandboxSupport }, + { option => "shared-workers", desc => "Toggle SharedWorkers support", define => "ENABLE_SHARED_WORKERS", default => (isAppleWebKit() || isGtk()), value => \$sharedWorkersSupport }, @@ -140,12 +166,18 @@ my @features = ( { option => "svg-use", desc => "Toggle SVG use element support (implies SVG support)", define => "ENABLE_SVG_USE", default => 1, value => \$svgUseSupport }, + { option => "tiled-backing-store", desc => "Toggle Tiled Backing Store support", + define => "ENABLE_TILED_BACKING_STORE", default => isQt(), value => \$tiledBackingStoreSupport }, + { option => "video", desc => "Toggle Video support", define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk()), value => \$videoSupport }, { option => "web-sockets", desc => "Toggle Web Sockets support", define => "ENABLE_WEB_SOCKETS", default => 1, value=> \$webSocketsSupport }, + { option => "web-timing", desc => "Toggle Web Timing support", + define => "ENABLE_WEB_TIMING", default => 0, value=> \$webTimingSupport }, + { option => "wml", desc => "Toggle WML support", define => "ENABLE_WML", default => 0, value => \$wmlSupport }, @@ -163,6 +195,15 @@ my @features = ( { option => "xslt", desc => "Toggle XSLT support", define => "ENABLE_XSLT", default => 1, value => \$xsltSupport }, + + { option => "file-writer", desc => "Toggle FileWriter support", + define => "ENABLE_FILE_WRITER", default => 0, value => \$fileWriterSupport }, + + { option => "file-system", desc => "Toggle FileSystem support", + define => "ENABLE_FILE_SYSTEM", default => 0, value => \$fileSystemSupport }, + + { option => "device-orientation", desc => "Toggle DeviceOrientation support", + define => "ENABLE_DEVICE_ORIENTATION", default => 0, value => \$deviceOrientationSupport }, ); # Update defaults from Qt's project file @@ -206,6 +247,10 @@ Usage: $programName [options] [options to pass to build system] --qt Build the Qt port --inspector-frontend Copy changes to the inspector front-end files to the build directory + --install-headers=<path> Set installation path for the headers (Qt only) + --install-libs=<path> Set installation path for the libraries (Qt only) + + --prefix=<path> Set installation prefix to the given path (Gtk only) --makeargs=<arguments> Optional Makefile flags --minimal No optional features, unless explicitly enabled. @@ -215,6 +260,9 @@ EOF my %options = ( 'help' => \$showHelp, 'clean' => \$clean, + 'install-headers=s' => \$installHeaders, + 'install-libs=s' => \$installLibs, + 'prefix=s' => \$prefixPath, 'makeargs=s' => \$makeArgs, 'minimal' => \$minimal, ); @@ -238,10 +286,20 @@ setConfiguration(); my $productDir = productDir(); +# Remove 0 byte sized files from productDir after slave lost for Qt buildbots. +File::Find::find(\&unlinkZeroFiles, $productDir) if isQt(); + +sub unlinkZeroFiles () +{ + my $file = $File::Find::name; + if (! -s $file) { + unlink $file; + print "0 byte sized file removed from build directory: $file\n"; + } +} + # Check that all the project directories are there. my @projects = ("JavaScriptCore", "WebCore", "WebKit"); -# Only Apple builds JavaScriptGlue, and only on the Mac -splice @projects, 1, 0, "JavaScriptGlue" if isAppleMacWebKit(); my @otherDirs = ("WebKitLibraries"); for my $dir (@projects, @otherDirs) { @@ -254,17 +312,20 @@ my @options = (); # enable autotool options accordingly if (isGtk()) { + @options = @ARGV; foreach (@features) { push @options, autotoolsFlag(${$_->{value}}, $_->{option}); } + push @options, "--prefix=" . $prefixPath if defined($prefixPath); push @options, "--makeargs=" . $makeArgs if defined($makeArgs); } elsif (isAppleMacWebKit()) { push @options, XcodeOptions(); - sub option($$) + sub option($$$) { - my ($feature, $isEnabled) = @_; + my ($feature, $isEnabled, $defaultValue) = @_; + return "" if $defaultValue == $isEnabled; return $feature . "=" . ($isEnabled ? $feature : " "); } @@ -272,12 +333,21 @@ if (isGtk()) { if ($_->{option} eq "coverage") { push @options, XcodeCoverageSupportOptions() if $coverageSupport; } else { - push @options, option($_->{define}, ${$_->{value}}); + my $option = option($_->{define}, ${$_->{value}}, $_->{default}); + push @options, $option unless $option eq ""; } } - # Copy library and header from WebKitLibraries to a findable place in the product directory. + # Apple builds JavaScriptGlue, and only on the Mac. + splice @projects, 1, 0, "JavaScriptGlue"; + # ANGLE must come before WebCore + splice @projects, 0, 0, "ANGLE"; + + # WebKit2 is only supported in SnowLeopard and later at present. + push @projects, ("WebKit2", "WebKitTools/MiniBrowser") if osXVersion()->{"minor"} >= 6; + + # Copy library and header from WebKitLibraries to a findable place in the product directory. my @librariesToCopy = ( "libWebKitSystemInterfaceTiger.a", "libWebKitSystemInterfaceLeopard.a", @@ -315,11 +385,17 @@ if (isGtk()) { (system("perl WebKitTools/Scripts/update-webkit-support-libs") == 0) or die; } elsif (isQt()) { @options = @ARGV; + push @options, "--install-headers=" . $installHeaders if defined($installHeaders); + push @options, "--install-libs=" . $installLibs if defined($installLibs); push @options, "--makeargs=" . $makeArgs if defined($makeArgs); foreach (@features) { push @options, "DEFINES+=$_->{define}=${$_->{value}}" if ${$_->{value}} != $_->{default}; } + + if ($minimal) { + push @options, "CONFIG+=minimal"; + } } # Force re-link of existing libraries if different than expected @@ -331,12 +407,17 @@ if (isInspectorFrontend()) { if (isWx()) { downloadWafIfNeeded(); - push @projects, 'WebKitTools/DumpRenderTree'; - push @projects, 'WebKitTools/wx/browser'; - push @projects, 'WebKit/wx/bindings/python'; + @options = (); + if (defined($makeArgs)) { + @options = split(/ /, $makeArgs); + } + @projects = (); + my $result = buildWafProject('.', $clean, @options); + exit exitStatus($result) if exitStatus($result); } if (isChromium()) { + @options = @ARGV; # Chromium doesn't build by project directories. @projects = (); my $result = buildChromium($clean, @options); @@ -359,21 +440,12 @@ for my $dir (@projects) { } elsif (isQt()) { $result = buildQMakeQtProject($dir, $clean, @options); } elsif (isAppleMacWebKit()) { + $dir = "MiniBrowser" if $dir eq "WebKitTools/MiniBrowser"; $result = buildXCodeProject($dir, $clean, @options, @ARGV); } elsif (isAppleWinWebKit()) { if ($dir eq "WebKit") { $result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean); } - } elsif (isWx()) { - @options = (); - if (defined($makeArgs)) { - @options = split(/ /, $makeArgs); - } - if ($dir eq "WebKit" && isWx()) { - chdir 'wx' or die; - } - - $result = buildWafProject($dir, $clean, @options); } if (exitStatus($result)) { |
