Title: [101820] trunk/Tools
Revision
101820
Author
[email protected]
Date
2011-12-02 10:17:17 -0800 (Fri, 02 Dec 2011)

Log Message

[GTK] generate-gtkdoc should respect build type
https://bugs.webkit.org/show_bug.cgi?id=73296

Reviewed by Philippe Normand.

* Scripts/webkitdirs.pm:
(buildAutotoolsProject): Pass the --debug to the generate-gtkdoc script.
* gtk/common.py: If --build is passed give preference to the Debug build directory.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (101819 => 101820)


--- trunk/Tools/ChangeLog	2011-12-02 18:11:45 UTC (rev 101819)
+++ trunk/Tools/ChangeLog	2011-12-02 18:17:17 UTC (rev 101820)
@@ -1,3 +1,14 @@
+2011-11-29  Martin Robinson  <[email protected]>
+
+        [GTK] generate-gtkdoc should respect build type
+        https://bugs.webkit.org/show_bug.cgi?id=73296
+
+        Reviewed by Philippe Normand.
+
+        * Scripts/webkitdirs.pm:
+        (buildAutotoolsProject): Pass the --debug to the generate-gtkdoc script.
+        * gtk/common.py: If --build is passed give preference to the Debug build directory.
+
 2011-12-02  Tony Chang  <[email protected]>
 
         [nrwt] fix wdiff output

Modified: trunk/Tools/Scripts/webkitdirs.pm (101819 => 101820)


--- trunk/Tools/Scripts/webkitdirs.pm	2011-12-02 18:11:45 UTC (rev 101819)
+++ trunk/Tools/Scripts/webkitdirs.pm	2011-12-02 18:17:17 UTC (rev 101820)
@@ -1700,8 +1700,9 @@
     $prefix = $ENV{"WebKitInstallationPrefix"} if !defined($prefix);
     push @buildArgs, "--prefix=" . $prefix if defined($prefix);
 
-    # check if configuration is Debug
-    if ($config =~ m/debug/i) {
+    # Check if configuration is Debug.
+    my $debug = $config =~ m/debug/i;
+    if ($debug) {
         push @buildArgs, "--enable-debug";
     } else {
         push @buildArgs, "--disable-debug";
@@ -1743,8 +1744,12 @@
     chdir ".." or die;
 
     if ($buildingWebKit) {
-        my $relativeScriptsPath = relativeScriptsDir();
-        if (system("$runWithJhbuild $gtkScriptsPath/generate-gtkdoc --skip-html")) {
+        my @docGenerationOptions = ($runWithJhbuild, "$gtkScriptsPath/generate-gtkdoc", "--skip-html");
+        if ($debug) {
+            push(@docGenerationOptions, "--debug");
+        }
+
+        if (system(@docGenerationOptions)) {
             die "\n gtkdoc did not build without warnings\n";
         }
     }

Modified: trunk/Tools/gtk/common.py (101819 => 101820)


--- trunk/Tools/gtk/common.py	2011-12-02 18:11:45 UTC (rev 101819)
+++ trunk/Tools/gtk/common.py	2011-12-02 18:17:17 UTC (rev 101820)
@@ -42,13 +42,14 @@
     def is_valid_build_directory(path):
         return os.path.exists(os.path.join(path, 'GNUmakefile'))
 
-    build_dir = top_level_path('WebKitBuild', 'Release')
-    if is_valid_build_directory(build_dir):
-        return build_dir
+    build_types = ['Release', 'Debug']
+    if '--debug' in sys.argv:
+        build_types.reverse()
 
-    build_dir = top_level_path('WebKitBuild', 'Debug')
-    if is_valid_build_directory(build_dir):
-        return build_dir
+    for build_type in build_types:
+        build_dir = top_level_path('WebKitBuild', build_type)
+        if is_valid_build_directory(build_dir):
+            return build_dir
 
     # distcheck builds in a directory named _build in the top-level path.
     build_dir = top_level_path("_build")
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to