Title: [111797] trunk/Tools
Revision
111797
Author
fpi...@apple.com
Date
2012-03-22 17:51:06 -0700 (Thu, 22 Mar 2012)

Log Message

Tools/Scripts/build-jsc doesn't work after WTF move
https://bugs.webkit.org/show_bug.cgi?id=81999

Reviewed by Eric Seidel.
        
For ports that require WTF and JSC to be built as two projects and where
the machinery to build both does not already exist, teach the tool to do
so for us.

* Scripts/build-jsc:
(buildMyProject):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (111796 => 111797)


--- trunk/Tools/ChangeLog	2012-03-23 00:43:53 UTC (rev 111796)
+++ trunk/Tools/ChangeLog	2012-03-23 00:51:06 UTC (rev 111797)
@@ -1,3 +1,17 @@
+2012-03-22  Filip Pizlo  <fpi...@apple.com>
+
+        Tools/Scripts/build-jsc doesn't work after WTF move
+        https://bugs.webkit.org/show_bug.cgi?id=81999
+
+        Reviewed by Eric Seidel.
+        
+        For ports that require WTF and JSC to be built as two projects and where
+        the machinery to build both does not already exist, teach the tool to do
+        so for us.
+
+        * Scripts/build-jsc:
+        (buildMyProject):
+
 2012-03-22  Ojan Vafai  <o...@chromium.org>
 
         Fix accidental missing line in r111793.

Modified: trunk/Tools/Scripts/build-jsc (111796 => 111797)


--- trunk/Tools/Scripts/build-jsc	2012-03-23 00:43:53 UTC (rev 111796)
+++ trunk/Tools/Scripts/build-jsc	2012-03-23 00:51:06 UTC (rev 111797)
@@ -61,26 +61,36 @@
 my @options = XcodeOptions();
 my @coverageSupportOptions = ($coverageSupport) ? XcodeCoverageSupportOptions() : ();
 
-chdir "Source/_javascript_Core" or die "Can't find _javascript_Core directory to build from";
-my $result;
-if (isAppleMacWebKit()) {
-    $result = system "sh", "-c", 'xcodebuild -project _javascript_Core.xcodeproj "$@" | grep -v setenv && exit ${PIPESTATUS[0]}', "xcodebuild",  @options, @ARGV, @coverageSupportOptions;
-} elsif (isAppleWinWebKit()) {
-    $result = buildVisualStudioProject("_javascript_Core.vcproj/_javascript_Core.sln");
-} elsif (isGtk()) {
-    checkForArgumentAndRemoveFromARGV("--gtk");
-    $result = buildGtkProject("_javascript_Core", 0, @ARGV);
-} elsif (isQt()) {
-    # Remove duplicated --qt options to avoid passing them to qmake
+if (isQt()) {
     checkForArgumentAndRemoveFromARGV("--qt");
     my @projects = ("WTF", "_javascript_Core");
-    $result = buildQMakeProjects(\@projects, 0, @ARGV);
-} elsif (isWx()) {
-    # Builds everything in one-shot. No need to build anything here.
-    $result = 0;
+    my $result = buildQMakeProjects(\@projects, 0, @ARGV);
+    exit exitStatus($result);
 } elsif (cmakeBasedPortName()) {
     buildCMakeProjectOrExit(0, cmakeBasedPortName(), undef, undef, ("-DONLY_BUILD_JAVASCRIPTCORE=1", cmakeBasedPortArguments())); # This call never returns.
-} else {
-    die "Building not defined for this platform!\n";
 }
-exit exitStatus($result);
+
+sub buildMyProject
+{
+    my ($projectDirectory, $projectName) = @_;
+    my $result;
+    chdir $projectDirectory or die "Can't find $projectName directory to build from";
+    if (isAppleMacWebKit()) {
+        $result = system "sh", "-c", ('xcodebuild -project ' . $projectName . '.xcodeproj "$@" | grep -v setenv && exit ${PIPESTATUS[0]}'), "xcodebuild",  @options, @ARGV, @coverageSupportOptions;
+    } elsif (isAppleWinWebKit()) {
+        $result = buildVisualStudioProject("$projectName.vcproj/$projectName.sln");
+    } elsif (isGtk()) {
+        checkForArgumentAndRemoveFromARGV("--gtk");
+        $result = buildGtkProject($projectName, 0, @ARGV);
+    } elsif (isWx()) {
+        # Builds everything in one-shot. No need to build anything here.
+        $result = 0;
+    } else {
+        die "Building not defined for this platform!\n";
+    }
+    exit exitStatus($result) if exitStatus($result);
+    chdirWebKit();
+}
+
+buildMyProject("Source/WTF", "WTF");
+buildMyProject("Source/_javascript_Core", "_javascript_Core");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to