Bug 77542 - [GTK] WebKit1 API documentation is not generated when building with gtk-2.0
Summary: [GTK] WebKit1 API documentation is not generated when building with gtk-2.0
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Carlos Garcia Campos
Keywords: Gtk
Depends on:
Blocks: 77551
  Show dependency treegraph
Reported: 2012-02-01 04:14 PST by Carlos Garcia Campos
Modified: 2014-04-08 17:46 PDT (History)
5 users (show)

See Also:

Patch (4.59 KB, patch)
2012-02-01 04:19 PST, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-02-01 04:14:01 PST
Tools/gtk/generate-gtkdoc assumes gtk3 is always used and creates a generator for webkit2gtk-3.0.pc
Comment 1 Carlos Garcia Campos 2012-02-01 04:19:28 PST
Created attachment 124926 [details]
Comment 2 Gustavo Noronha (kov) 2012-02-01 06:12:52 PST
Comment on attachment 124926 [details]

That reminds me I had to fix the doc build for the debian package but hadn't taken the time yet to upload the patch. Here's what I have fwiw. The common.py part is required because the debian package builds in a directory called build-x.y (where x.y is 2.0 for the gtk2-based library and 3.0 for gtk3-based one).

diff --git a/Tools/gtk/common.py b/Tools/gtk/common.py
index 7941e13..59f1aec 100644
--- a/Tools/gtk/common.py
+++ b/Tools/gtk/common.py
@@ -64,6 +64,10 @@ def get_build_path():
     if is_valid_build_directory(build_dir):
         return build_dir
+    build_dir = os.getcwd()
+    if is_valid_build_directory(build_dir):
+        return build_dir
     print 'Could not determine build directory.'
diff --git a/Tools/gtk/generate-gtkdoc b/Tools/gtk/generate-gtkdoc
index db5f83a..6b48f46 100755
--- a/Tools/gtk/generate-gtkdoc
+++ b/Tools/gtk/generate-gtkdoc
@@ -83,7 +83,11 @@ def get_webkit1_options():
                    ' -I' + common.top_level_path('Source', 'JavaScriptCore', 'ForwardingHeaders'),
         'ignored_files': glob.glob(src_path('webkit', '*private.*'))
-    return (common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc'), options)
+    if os.path.exists(common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc')):
+        return (common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc'), options)
+    return (common.build_path('Source', 'WebKit', 'gtk', 'webkit-1.0.pc'), options)
Comment 3 Carlos Garcia Campos 2012-02-01 10:05:16 PST
Committed r106474: <http://trac.webkit.org/changeset/106474>
Comment 4 Gustavo Noronha (kov) 2012-02-08 08:45:49 PST
Looks like this hasn't fixed the issue, seb128 reported on IRC that the package build for 1.7.5 failed because of no documentation built for the gtk2-based library. The second part of the alternative patch I posted in comment 2 was working for us in 1.7.4. Here's the log:

Comment 5 Gustavo Noronha (kov) 2012-02-08 08:46:24 PST
I posted the first patch of my patch to a separate bug, btw: https://bugs.webkit.org/show_bug.cgi?id=78118
Comment 6 Eric Seidel (no email) 2012-03-27 12:38:54 PDT
Attachment 124926 [details] was posted by a committer and has review+, assigning to Carlos Garcia Campos for commit.
Comment 7 Martin Robinson 2014-04-08 17:46:41 PDT
WebKit1GTK+ has been removed.