Title: [97737] trunk/Tools
Revision
97737
Author
[email protected]
Date
2011-10-18 04:41:18 -0700 (Tue, 18 Oct 2011)

Log Message

Unreviewed, rolling out r97735.
http://trac.webkit.org/changeset/97735
https://bugs.webkit.org/show_bug.cgi?id=70317

some people apparently use build-jsc with the qt port without
building webkit first (Requested by torarne on #webkit).

Patch by Sheriff Bot <[email protected]> on 2011-10-18

* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(buildQMakeProject):
(buildQMakeQtProject):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (97736 => 97737)


--- trunk/Tools/ChangeLog	2011-10-18 10:56:23 UTC (rev 97736)
+++ trunk/Tools/ChangeLog	2011-10-18 11:41:18 UTC (rev 97737)
@@ -1,3 +1,17 @@
+2011-10-18  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r97735.
+        http://trac.webkit.org/changeset/97735
+        https://bugs.webkit.org/show_bug.cgi?id=70317
+
+        some people apparently use build-jsc with the qt port without
+        building webkit first (Requested by torarne on #webkit).
+
+        * Scripts/build-webkit:
+        * Scripts/webkitdirs.pm:
+        (buildQMakeProject):
+        (buildQMakeQtProject):
+
 2011-10-18  Tor Arne Vestbø  <[email protected]>
 
         [Qt] Remove dead code in build-webkit

Modified: trunk/Tools/Scripts/build-webkit (97736 => 97737)


--- trunk/Tools/Scripts/build-webkit	2011-10-18 10:56:23 UTC (rev 97736)
+++ trunk/Tools/Scripts/build-webkit	2011-10-18 11:41:18 UTC (rev 97737)
@@ -594,13 +594,6 @@
     exit exitStatus($result) if exitStatus($result);
 }
 
-if (isQt()) {
-    # Qt doesn't build by project directories.
-    @projects = ();
-    my $result = buildQt($clean, @options);
-    exit exitStatus($result) if exitStatus($result);
-}
-
 if (isEfl()) {
     # By default we build using all of the available CPUs.
     $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
@@ -616,8 +609,8 @@
     chdir $dir or die;
     my $result = 0;
 
-    # For Gtk the WebKit project builds all others
-    if ((isGtk()) && $dir ne "Source/WebKit") {
+    # For Gtk and Qt the WebKit project builds all others
+    if ((isGtk() || isQt()) && $dir ne "Source/WebKit") {
         chdirWebKit();
         next;
     }
@@ -625,6 +618,9 @@
     my $project = basename($dir);
     if (isGtk()) {
         $result = buildGtkProject($project, $clean, !$noWebKit2, @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";

Modified: trunk/Tools/Scripts/webkitdirs.pm (97736 => 97737)


--- trunk/Tools/Scripts/webkitdirs.pm	2011-10-18 10:56:23 UTC (rev 97736)
+++ trunk/Tools/Scripts/webkitdirs.pm	2011-10-18 11:41:18 UTC (rev 97737)
@@ -1643,11 +1643,17 @@
     exit($returnCode) if $returnCode;
 }
 
-sub buildQt($@)
+sub buildQMakeProject($@)
 {
-    my ($clean, @buildParams) = @_;
+    my ($project, $clean, @buildParams) = @_;
 
     my @subdirs = ("_javascript_Core", "WebCore", "WebKit/qt/Api");
+    if (grep { $_ eq $project } @subdirs) {
+        @subdirs = ($project);
+    } else {
+        $project = 0;
+    }
+
     my @buildArgs = ("-r");
 
     my $makeargs = "";
@@ -1677,8 +1683,14 @@
     my $dir = File::Spec->canonpath(productDir());
 
     my $originalCwd = getcwd();
-    chdir File::Spec->catfile(sourceDir(), "Source", "WebCore");
-    my $defaults = `$qmakebin CONFIG+=compute_defaults 2>&1`;
+    my $configArgs = "CONFIG+=compute_defaults";
+    if (isWK2()) {
+        chdir File::Spec->catfile(sourceDir(), "Source", "WebKit2");
+        $configArgs = "CONFIG+=webkit2 $configArgs";
+    } else {
+        chdir File::Spec->catfile(sourceDir(), "Source", "WebCore");
+    }
+    my $defaults = `$qmakebin $configArgs 2>&1`;
     chdir $originalCwd;
 
     File::Path::mkpath($dir);
@@ -1711,6 +1723,9 @@
     my @dsQmakeArgs = @buildArgs;
     push @dsQmakeArgs, "-r";
     push @dsQmakeArgs, sourceDir() . "/Source/DerivedSources.pro";
+    if ($project) {
+        push @dsQmakeArgs, "-after SUBDIRS=" . $project. "/DerivedSources.pro";
+    }
     push @dsQmakeArgs, "-o Makefile.DerivedSources";
     print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
     my $result = system "$qmakebin @dsQmakeArgs";
@@ -1718,21 +1733,23 @@
         die "Failed while running $qmakebin to generate derived sources!\n";
     }
 
-    # FIXME: Iterate over different source directories manually to workaround a problem with qmake+extraTargets+s60
-    # To avoid overwriting of Makefile.DerivedSources in the root dir use Makefile.DerivedSources.Tools for Tools
-    if (grep { $_ eq "CONFIG+=webkit2"} @buildArgs) {
-        push @subdirs, "WebKit2";
-        if ( -e sourceDir() ."/Tools/DerivedSources.pro" ) {
-            @dsQmakeArgs = @buildArgs;
-            push @dsQmakeArgs, "-r";
-            push @dsQmakeArgs, sourceDir() . "/Tools/DerivedSources.pro";
-            push @dsQmakeArgs, "-o Makefile.DerivedSources.Tools";
-            print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
-            my $result = system "$qmakebin @dsQmakeArgs";
-            if ($result ne 0) {
-                die "Failed while running $qmakebin to generate derived sources for Tools!\n";
+    if ($project ne "_javascript_Core") {
+        # FIXME: Iterate over different source directories manually to workaround a problem with qmake+extraTargets+s60
+        # To avoid overwriting of Makefile.DerivedSources in the root dir use Makefile.DerivedSources.Tools for Tools
+        if (grep { $_ eq "CONFIG+=webkit2"} @buildArgs) {
+            push @subdirs, "WebKit2";
+            if ( -e sourceDir() ."/Tools/DerivedSources.pro" ) {
+                @dsQmakeArgs = @buildArgs;
+                push @dsQmakeArgs, "-r";
+                push @dsQmakeArgs, sourceDir() . "/Tools/DerivedSources.pro";
+                push @dsQmakeArgs, "-o Makefile.DerivedSources.Tools";
+                print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
+                my $result = system "$qmakebin @dsQmakeArgs";
+                if ($result ne 0) {
+                    die "Failed while running $qmakebin to generate derived sources for Tools!\n";
+                }
+                push @subdirs, "WebKitTestRunner";
             }
-            push @subdirs, "WebKitTestRunner";
         }
     }
 
@@ -1765,6 +1782,12 @@
         }
     }
 
+    if ($project) {
+        push @buildArgs, "-after SUBDIRS=" . $project . "/" . $project . ".pro ";
+        if ($project eq "_javascript_Core") {
+            push @buildArgs, "-after SUBDIRS+=" . $project . "/jsc.pro ";
+        }
+    }
     push @buildArgs, sourceDir() . "/Source/WebKit.pro";
     print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n";
     print "Installation headers directory: $installHeaders\n" if(defined($installHeaders));
@@ -1776,30 +1799,36 @@
     }
 
     my $makefile = "";
-    $buildArgs[-1] = sourceDir() . "/Tools/Tools.pro";
-    $makefile = "Makefile.Tools";
+    if (!$project) {
+        $buildArgs[-1] = sourceDir() . "/Tools/Tools.pro";
+        $makefile = "Makefile.Tools";
 
-    print "Calling '$qmakebin @buildArgs -o $makefile' in " . $dir . "\n\n";
-    $result = system "$qmakebin @buildArgs -o $makefile";
-    if ($result ne 0) {
-        die "Failed to setup build environment using $qmakebin!\n";
+        print "Calling '$qmakebin @buildArgs -o $makefile' in " . $dir . "\n\n";
+        $result = system "$qmakebin @buildArgs -o $makefile";
+        if ($result ne 0) {
+            die "Failed to setup build environment using $qmakebin!\n";
+        }
     }
 
-    # Manually create makefiles for the examples so we don't build by default
-    my $examplesDir = $dir . "/WebKit/qt/examples";
-    File::Path::mkpath($examplesDir);
-    $buildArgs[-1] = sourceDir() . "/Source/WebKit/qt/examples/examples.pro";
-    chdir $examplesDir or die;
-    print "Calling '$qmakebin @buildArgs' in " . $examplesDir . "\n\n";
-    $result = system "$qmakebin @buildArgs";
-    die "Failed to create makefiles for the examples!\n" if $result ne 0;
-    chdir $dir or die;
+    if (!$project) {
+        # Manually create makefiles for the examples so we don't build by default
+        my $examplesDir = $dir . "/WebKit/qt/examples";
+        File::Path::mkpath($examplesDir);
+        $buildArgs[-1] = sourceDir() . "/Source/WebKit/qt/examples/examples.pro";
+        chdir $examplesDir or die;
+        print "Calling '$qmakebin @buildArgs' in " . $examplesDir . "\n\n";
+        $result = system "$qmakebin @buildArgs";
+        die "Failed to create makefiles for the examples!\n" if $result ne 0;
+        chdir $dir or die;
+    }
 
     my $makeTools = "echo";
-    $makeTools = "echo No Makefile for Tools. Skipping make";
+    if (!$project) {
+        $makeTools = "echo No Makefile for Tools. Skipping make";
 
-    if (-e "$dir/$makefile") {
-        $makeTools = "$make $makeargs -f $makefile";
+        if (-e "$dir/$makefile") {
+            $makeTools = "$make $makeargs -f $makefile";
+        }
     }
 
     if ($clean) {
@@ -1816,6 +1845,13 @@
     return $result;
 }
 
+sub buildQMakeQtProject($$@)
+{
+    my ($project, $clean, @buildArgs) = @_;
+
+    return buildQMakeProject("", $clean, @buildArgs);
+}
+
 sub buildGtkProject
 {
     my ($project, $clean, $enableWebKit2, @buildArgs) = @_;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to