Modified: trunk/Tools/ChangeLog (106473 => 106474)
--- trunk/Tools/ChangeLog 2012-02-01 18:01:35 UTC (rev 106473)
+++ trunk/Tools/ChangeLog 2012-02-01 18:04:57 UTC (rev 106474)
@@ -1,5 +1,25 @@
2012-02-01 Carlos Garcia Campos <cgar...@igalia.com>
+ [GTK] WebKit1 API documentation is not generated when building with gtk-2.0
+ https://bugs.webkit.org/show_bug.cgi?id=77542
+
+ Reviewed by Martin Robinson.
+
+ * gtk/generate-gtkdoc: Check first whether there's
+ webkitgtk-3.0.pc and if it doesn't exist use webkitgtk-1.0.pc
+ instead.
+ (get_webkit2_options): Return just the options since the
+ pkg_config_path doesn't depend on options
+ (get_webkit1_options): Ditto.
+ (generate_doc): Helper function to create a generator and generate
+ documentation for the given pkg-config file with the given options.
+ * gtk/gtkdoc.py:
+ (GTKDoc.__init__): Don't use ** for args parameter, since it's
+ used as a dict and never expanded.
+ (PkgConfigGTKDoc.__init__): Ditto.
+
+2012-02-01 Carlos Garcia Campos <cgar...@igalia.com>
+
[GTK] API documentation is not installed even when building with --enable-gtk-doc
https://bugs.webkit.org/show_bug.cgi?id=77094
Modified: trunk/Tools/gtk/generate-gtkdoc (106473 => 106474)
--- trunk/Tools/gtk/generate-gtkdoc 2012-02-01 18:01:35 UTC (rev 106473)
+++ trunk/Tools/gtk/generate-gtkdoc 2012-02-01 18:04:57 UTC (rev 106474)
@@ -63,7 +63,7 @@
glob.glob(src_path('WebKitWebViewBaseAccessible.*')) + \
glob.glob(src_path('tests/*.h'))
})
- return (common.build_path('Source', 'WebKit2', 'webkit2gtk-3.0.pc'), options)
+ return options
def get_webkit1_options():
def src_path(*args):
@@ -82,8 +82,13 @@
' -I' + common.top_level_path('Source', '_javascript_Core', 'ForwardingHeaders'),
'ignored_files': glob.glob(src_path('webkit', '*private.*'))
})
- return (common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc'), options)
+ return options
+def generate_doc(pkg_config_path, options):
+ generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, options)
+ generator.generate(html='--skip-html' not in sys.argv)
+ return generator.saw_warnings
+
configure_logging()
# We need to add the _javascript_Core build directory to the PKG_CONFIG_PATH
@@ -93,17 +98,19 @@
if pkg_config_path:
os.environ['PKG_CONFIG_PATH'] += ':' + pkg_config_path
-print "Generating WebKit1 documentation..."
-pkg_config_path, options = get_webkit1_options()
-generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, **options)
-generator.generate(html='--skip-html' not in sys.argv)
-saw_webkit1_warnings = generator.saw_warnings
+saw_webkit1_warnings = saw_webkit2_warnings = False
+pkg_config_path = common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc')
+if not os.path.exists(pkg_config_path):
+ pkg_config_path = common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-1.0.pc')
+if os.path.exists(pkg_config_path):
+ print "Generating WebKit1 documentation..."
+ saw_webkit1_warnings = generate_doc(pkg_config_path, get_webkit1_options())
+
# WebKit2 might not be enabled, so check for the pkg-config file before building documentation.
-if os.path.exists(common.build_path('Source', 'WebKit2', 'webkit2gtk-3.0.pc')):
+pkg_config_path = common.build_path('Source', 'WebKit2', 'webkit2gtk-3.0.pc')
+if os.path.exists(pkg_config_path):
print "\nGenerating WebKit2 documentation..."
- pkg_config_path, options = get_webkit2_options()
- generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, **options)
- generator.generate(html='--skip-html' not in sys.argv)
+ saw_webkit2_warnings = generate_doc(pkg_config_path, get_webkit2_options())
-sys.exit(generator.saw_warnings or saw_webkit1_warnings)
+sys.exit(saw_webkit1_warnings or saw_webkit2_warnings)
Modified: trunk/Tools/gtk/gtkdoc.py (106473 => 106474)
--- trunk/Tools/gtk/gtkdoc.py 2012-02-01 18:01:35 UTC (rev 106473)
+++ trunk/Tools/gtk/gtkdoc.py 2012-02-01 18:04:57 UTC (rev 106474)
@@ -76,7 +76,7 @@
will continue despite warnings. (default False)
"""
- def __init__(self, **args):
+ def __init__(self, args):
# Parameters specific to scanning.
self.module_name = ''
@@ -360,8 +360,8 @@
pkg_config_path -- Path to the pkgconfig file for the library. Required.
"""
- def __init__(self, pkg_config_path, **args):
- super(PkgConfigGTKDoc, self).__init__(**args)
+ def __init__(self, pkg_config_path, args):
+ super(PkgConfigGTKDoc, self).__init__(args)
if not os.path.exists(pkg_config_path):
raise Exception('Could not find pkg-config file at: %s'