Commit 10f0141b authored by darin's avatar darin

Reviewed by Maciej.

        - some build script enhancements

        * Scripts/build-dumprendertree: Changed to use webkitdirs.
        * Scripts/build-webkit: Changed to use webkitdirs, also only copy files from WebKitLibraries if
        they are newer.
        * Scripts/run-safari: Reduce number of log messages, change to respect "-d" flag and get Development
        before Deplyment in that case.
        * Scripts/run-webkit-tests: Changed to use webkitdirs.
        * Scripts/update-webkit: Changed to use webkitdirs.

        * Scripts/webkitdirs.pm: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bd8affb8
2005-06-08 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- some build script enhancements
* Scripts/build-dumprendertree: Changed to use webkitdirs.
* Scripts/build-webkit: Changed to use webkitdirs, also only copy files from WebKitLibraries if
they are newer.
* Scripts/run-safari: Reduce number of log messages, change to respect "-d" flag and get Development
before Deplyment in that case.
* Scripts/run-webkit-tests: Changed to use webkitdirs.
* Scripts/update-webkit: Changed to use webkitdirs.
* Scripts/webkitdirs.pm: Added.
2005-06-08 Maciej Stachowiak <mjs@apple.com>
Code change by Toby Peterson <toby@opendarwin.org>
......
......@@ -31,24 +31,10 @@
# Currently only works for the Deployment build style.
use strict;
use webkitdirs;
# Check that we're in the right directory.
if (! -d "WebKitTools") {
if (-d "../WebKitTools") {
chdir ".." or die;
}
if (! -d "WebKitTools") {
die "No WebKitTools directory found. Please run this script from the directory containing WebKitTools.\n";
}
}
# Check that an Xcode product directory is set.
open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
my $productDir = <PRODUCT>;
close PRODUCT;
if (!$productDir) {
die "No product directory set. Please set the 'Place Build Products' preference to 'Customized location' in XCode Building Preferences.\n";
}
chdirWebKit();
my $productDir = productDir();
# Build
chdir "WebKitTools/DumpRenderTree" or die;
......
......@@ -30,30 +30,15 @@
use strict;
use Getopt::Long;
use webkitdirs;
my $debug = 0;
GetOptions("debug!" => \$debug);
my $style = $debug ? "Development" : "Deployment";
# Check that we're in the right directory.
if (! -d "WebKitTools") {
if (-d "../WebKitTools") {
chdir ".." or die;
}
if (! -d "WebKitTools") {
die "No WebKitTools directory found. Please run this script from the directory containing WebKitTools.\n";
}
}
# Check that an Xcode product directory is set.
open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
my $productDir = <PRODUCT>;
chomp $productDir;
close PRODUCT;
if (!$productDir) {
die "No product directory set. Please set the 'Place Build Products' preference to 'Customized location' in XCode Building Preferences.\n";
}
chdirWebKit();
my $productDir = productDir();
# Check that all the project directories are there.
my @projects = ("JavaScriptCore", "WebCore", "WebKit");
......@@ -65,13 +50,20 @@ for my $dir (@projects, @otherDirs) {
}
# Copy library and header from WebKitLibraries to a findable place in the product directory.
chdir "WebKitLibraries" or die;
print "${productDir}/libWebKitSystemInterface.a\n";
`ditto libWebKitSystemInterface.a "${productDir}/libWebKitSystemInterface.a"`;
`ranlib "${productDir}/libWebKitSystemInterface.a"`;
`mkdir -p "${productDir}/usr/local/include"`;
`ditto WebKitSystemInterface.h "${productDir}/usr/local/include/WebKitSystemInterface.h"`;
chdir ".." or die;
my $srcLib = "WebKitLibraries/libWebKitSystemInterface.a";
my $lib = "${productDir}/libWebKitSystemInterface.a";
if (!-e $lib || -M $lib > -M $srcLib) {
print "Updating $lib\n";
system "ditto", $srcLib, $lib;
system "ranlib", $lib;
}
my $srcHeader = "WebKitLibraries/WebKitSystemInterface.h";
my $header = "${productDir}/usr/local/include/WebKitSystemInterface.h";
if (!-e $header || -M $header > -M $srcHeader) {
print "Updating $header\n";
system "mkdir", "-p", "${productDir}/usr/local/include";
system "ditto", $srcHeader, $header;
}
# Make symlinks so Xcode 2.1 can find the WebKitLibraries files.
`mkdir -p "${productDir}/${style}"`;
......
......@@ -26,24 +26,18 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Simplified build script for Web Kit Open Source Project.
# Simplified "run" script for Web Kit Open Source Project.
use strict;
use Getopt::Long;
use webkitdirs;
my $debug = 0;
GetOptions("debug!" => \$debug);
# Check that an Xcode product directory is set.
open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
my $productDir = <PRODUCT>;
chomp $productDir;
close PRODUCT;
if (!$productDir) {
die "No product directory set. Please set the 'Place Build Products' preference to 'Customized location' in XCode Building Preferences.\n";
}
my $productDir = productDir();
# Check to see that Safari is there.
# Check to see that Safari is in the usual place.
my $safariPath = "/Applications/Safari.app/Contents/MacOS/Safari";
if (! -x $safariPath) {
die "Can't find executable at $safariPath.\n";
......@@ -51,32 +45,23 @@ if (! -x $safariPath) {
# Search for build products; first test Xcode 2.0 location, then Xcode 2.1 locations.
# For Xcode 2.1, prefer Deployment if both directories are present.
my @testDirs = ( "$productDir", "$productDir/Deployment", "$productDir/Development" );
my @testDirs;
if ($debug) {
@testDirs = ("$productDir", "$productDir/Deployment", "$productDir/Development");
} else {
@testDirs = ("$productDir", "$productDir/Development", "$productDir/Deployment");
}
my $found = 0;
for my $testDir (@testDirs) {
# Check to see that frameworks are there.
print "Looking for frameworks in $testDir ...\n";
if (! -x "$testDir/JavaScriptCore.framework/Versions/A/JavaScriptCore") {
print "Can't find executable at $testDir/JavaScriptCore.framework/Versions/A/JavaScriptCore\n";
next;
}
if (! -x "$testDir/WebCore.framework/Versions/A/WebCore") {
print "Can't find executable at $testDir/WebCore.framework/Versions/A/WebCore\n";
next;
}
if (! -x "$testDir/WebKit.framework/Versions/A/WebKit") {
print "Can't find executable at $testDir/WebKit.framework/Versions/A/WebKit\n";
next;
}
print "Built frameworks found in $testDir\n";
$productDir = $testDir;
$found = 1;
last;
next if !-x "$testDir/JavaScriptCore.framework/Versions/A/JavaScriptCore";
next if !-x "$testDir/WebCore.framework/Versions/A/WebCore";
next if !-x "$testDir/WebKit.framework/Versions/A/WebKit";
$productDir = $testDir;
$found = 1;
last;
}
if (!$found) {
die "Could not locate frameworks.\n";
die "Could not locate frameworks.\n";
}
# Set up DYLD_FRAMEWORK_PATH to point to the product directory.
......
......@@ -30,6 +30,7 @@
use strict;
use IPC::Open2;
use webkitdirs;
# Run all the tests passed in on the command line.
# If no tests are passed, find all the .html, .xml, and .xhtml files in the test directory.
......@@ -44,24 +45,8 @@ use IPC::Open2;
# the number of tests that failed to run
# the number of tests that were run but had no expected results to compare against
# Check that we're in the right directory.
if (! -d "WebKitTools") {
if (-d "../WebKitTools") {
chdir ".." or die;
}
if (! -d "WebKitTools") {
die "No WebKitTools directory found. Please run this script from the directory containing WebKitTools.\n";
}
}
# Check that an Xcode product directory is set.
open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
my $productDir = <PRODUCT>;
chomp $productDir;
close PRODUCT;
if (!$productDir) {
die "No product directory set. Please set the 'Place Build Products' preference to 'Customized location' in XCode Building Preferences.\n";
}
chdirWebKit();
my $productDir = productDir();
my $result = system "WebKitTools/Scripts/build-dumprendertree";
exit $result if $result;
......
......@@ -29,16 +29,9 @@
# Update script for Web Kit Open Source Project.
use strict;
use webkitdirs;
# Check that we're in the right directory.
if (! -d "WebKitTools") {
if (-d "../WebKitTools") {
chdir ".." or die;
}
if (! -d "WebKitTools") {
die "No WebKitTools directory found. Please run this script from the directory containing WebKitTools.\n";
}
}
chdirWebKit();
# Read the CVS root out of one project that's guaranteed to already be checked out.
open ROOT, "WebKitTools/CVS/Root" or die;
......
# Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
# its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Module to share code to get to WebKit directories.
use strict;
use warnings;
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(&chdirWebKit &productDir);
%EXPORT_TAGS = ( );
@EXPORT_OK = ();
}
our @EXPORT_OK;
# Check that we're in the right directory.
sub chdirWebKit
{
if (! -d "WebKitTools") {
if (-d "../WebKitTools") {
chdir ".." or die;
}
if (-d "../../WebKitTools") {
chdir "../.." or die;
}
if (! -d "WebKitTools") {
die "No WebKitTools directory found. Please run this script from the directory containing WebKitTools.\n";
}
}
}
# Check that an Xcode product directory is set.
sub productDir
{
open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
my $productDir = <PRODUCT>;
chomp $productDir;
close PRODUCT;
$productDir = "~/WebKitBuilds" unless $productDir;
$productDir =~ s|^~/|$ENV{HOME}/|;
return $productDir;
}
1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment