<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168709] releases/WebKitGTK/webkit-2.4</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168709">168709</a></dd>
<dt>Author</dt> <dd>gns@gnome.org</dd>
<dt>Date</dt> <dd>2014-05-13 12:29:03 -0700 (Tue, 13 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge 164632 - [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
https://bugs.webkit.org/show_bug.cgi?id=128417
Reviewed by Carlos Garcia Campos.
.:
* Source/cmake/OptionsGTK.cmake: Define the paths to the pkgconfig files here, so that they
may one day be used in the webkitdom config file generation.
Source/WebCore:
* bindings/gobject/GNUmakefile.am: Generate a config file for webkitdom documentation generation.
Source/WebKit:
* PlatformGTK.cmake: Correct the definition of WebKitGTK_ENUM_GENERATION_HEADERS and generate
a gtkdoc-webkitgtk.cfg file to be used by generate-gtkdoc.
Source/WebKit/gtk:
* GNUmakefile.am: Generate a config file for generate-gtkdoc.
Source/WebKit2:
* GNUmakefile.am: Generate a config file for generate-gtkdoc.
* PlatformGTK.cmake: Ditto.
Tools:
* gtk/GNUmakefile.am: Make the documentation process depend on the configuration files.
* gtk/generate-gtkdoc: Switch from using hard-coded configurations to reading them from
a makefile. This allows accepting a header list from the build system, which can be used
to dynamically build a list of ignored files. We can ignore any source file that doesn't
have a corresponding header file on the header list.
* gtk/gtkdoc.py: Now accept a headers parameter, which can be used instead of passing just
source directories to gtkdoc-scan.
Conflicts:
        ChangeLog
        Source/WebCore/ChangeLog
        Source/WebKit/ChangeLog
        Source/WebKit/gtk/ChangeLog
        Source/WebKit2/ChangeLog
        Tools/ChangeLog</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24GNUmakefileam">releases/WebKitGTK/webkit-2.4/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCorebindingsgobjectGNUmakefileam">releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/gobject/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKitPlatformGTKcmake">releases/WebKitGTK/webkit-2.4/Source/WebKit/PlatformGTK.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKitgtkGNUmakefileam">releases/WebKitGTK/webkit-2.4/Source/WebKit/gtk/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKit2GNUmakefileam">releases/WebKitGTK/webkit-2.4/Source/WebKit2/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebKit2PlatformGTKcmake">releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourcecmakeOptionsGTKcmake">releases/WebKitGTK/webkit-2.4/Source/cmake/OptionsGTK.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit24ToolsgtkGNUmakefileam">releases/WebKitGTK/webkit-2.4/Tools/gtk/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit24Toolsgtkgenerategtkdoc">releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc</a></li>
<li><a href="#releasesWebKitGTKwebkit24Toolsgtkgtkdocpy">releases/WebKitGTK/webkit-2.4/Tools/gtk/gtkdoc.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit24GNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/GNUmakefile.am (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/GNUmakefile.am        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/GNUmakefile.am        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -132,6 +132,15 @@
</span><span class="cx"> typelibsdir := $(libdir)/girepository-1.0
</span><span class="cx"> endif
</span><span class="cx">
</span><ins>+webkit1_pkg_config_file = Source/WebKit/gtk/webkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.pc
+webkit2_pkg_config_file = Source/WebKit2/webkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.pc
+
+if ENABLE_WEBKIT2
+webkitdom_pkgconfig_file = $(webkit2_pkg_config_file)
+else
+webkitdom_pkgconfig_file = $(webkit1_pkg_config_file)
+endif
+
</ins><span class="cx"> # We do not care at all about this implicit built-in make rules,
</span><span class="cx"> # disable them to save some build time
</span><span class="cx"> %: %.c
</span><span class="lines">@@ -290,4 +299,4 @@
</span><span class="cx">         @mkdir -p $(distdir)/Documentation/webkitdomgtk/html
</span><span class="cx">         @mkdir -p $(distdir)/Documentation/webkitdomgtk/tmpl
</span><span class="cx">         @-cp ./Documentation/webkitdomgtk/tmpl/*.sgml $(distdir)/Documentation/webkitdomgtk/tmpl
</span><del>-        @cp ./Documentation/webkitdomgtk/html/* $(distdir)/Documentation/webkitdomgtk/html
</del><span class="cx">\ No newline at end of file
</span><ins>+        @cp ./Documentation/webkitdomgtk/html/* $(distdir)/Documentation/webkitdomgtk/html
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCorebindingsgobjectGNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/gobject/GNUmakefile.am (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/gobject/GNUmakefile.am        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/gobject/GNUmakefile.am        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -578,12 +578,15 @@
</span><span class="cx">         -fvisibility=hidden \
</span><span class="cx">         $(global_cflags)
</span><span class="cx">
</span><ins>+webkitgtk_gdom_include_dirs = \
+        -I$(WebCore)/bindings \
+        -I$(WebCore)/bindings/gobject \
+        -I$(GENSOURCES_WEBKITDOM)
+
</ins><span class="cx"> libGObjectDOMBindings_la_CPPFLAGS = \
</span><span class="cx">         -DBUILDING_WebCore \
</span><span class="cx">         -DBUILDING_WEBKIT \
</span><del>-        -I$(WebCore)/bindings \
-        -I$(WebCore)/bindings/gobject \
-        -I$(GENSOURCES_WEBKITDOM) \
</del><ins>+        $(webkitgtk_gdom_include_dirs) \
</ins><span class="cx">         $(global_cppflags) \
</span><span class="cx">         $(platform_cppflags) \
</span><span class="cx">         $(platformgtk_cppflags) \
</span><span class="lines">@@ -594,3 +597,13 @@
</span><span class="cx">         $(FREETYPE_CFLAGS) \
</span><span class="cx">         $(GLIB_CFLAGS) \
</span><span class="cx">         $(LIBSOUP_CFLAGS)
</span><ins>+
+gtkdoc-webkitdom.cfg: $(WebCore)/bindings/gobject/GNUmakefile.am $(srcdir)/Tools/gtk/GNUmakefile.am
+        $(AM_V_GEN)echo "[webkitdomgtk]" > $@ && \
+        echo "pkgconfig_file=$(webkitdom_pkgconfig_file)" >> $@ && \
+        echo "namespace=webkit_dom" >> $@ && \
+        echo "doc_dir=DerivedSources/webkitdom/docs" >> $@ && \
+        echo -e "cflags=-I$(srcdir)/Source $(webkitgtk_gdom_include_dirs)" >> $@ && \
+        echo "source_dirs=$(top_builddir)/DerivedSources/webkitdom $(srcdir)/Source/WebCore/bindings/gobject" >> $@ && \
+        echo "headers=$(webkitgtk_gdom_built_h_api) DerivedSources/webkitdom/WebKitDOMDeprecated.h" >> $@
+BUILT_SOURCES += gtkdoc-webkitdom.cfg
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebKitPlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit/PlatformGTK.cmake (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebKit/PlatformGTK.cmake        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit/PlatformGTK.cmake        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKITGTK_DIR})
</span><span class="cx"> file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKITGTK_API_DIR})
</span><span class="cx"> configure_file(gtk/webkit/webkitversion.h.in ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitversion.h)
</span><del>-configure_file(gtk/webkit.pc.in ${CMAKE_BINARY_DIR}/Source/WebKit/gtk/webkitgtk-${WEBKITGTK_API_VERSION}.pc @ONLY)
</del><ins>+configure_file(gtk/webkit.pc.in ${WebKit_PKGCONFIG_FILE} @ONLY)
</ins><span class="cx">
</span><span class="cx"> add_definitions(-DPACKAGE_LOCALE_DIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
</span><span class="cx">
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">
</span><span class="cx"> # To generate webkitenumtypes.h we want to use all installed headers, except webkitenumtypes.h itself.
</span><span class="cx"> set(WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_INSTALLED_HEADERS})
</span><del>-list(REMOVE_ITEM WebKitGTK_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/webkitenumtypes.h)
</del><ins>+list(REMOVE_ITEM WebKitGTK_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.h)
</ins><span class="cx"> add_custom_command(
</span><span class="cx"> OUTPUT ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.h
</span><span class="cx"> ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.cpp
</span><span class="lines">@@ -229,3 +229,17 @@
</span><span class="cx"> install(FILES ${CMAKE_BINARY_DIR}/WebKit-${WEBKITGTK_API_VERSION}.typelib
</span><span class="cx"> DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
</span><span class="cx"> )
</span><ins>+
+file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitgtk.cfg
+ "[webkitgtk]\n"
+ "pkgconfig_file=${WebKit_PKGCONFIG_FILE}\n"
+ "namespace=webkit\n"
+ "cflags=-I${DERIVED_SOURCES_DIR}\n"
+ " -I${CMAKE_SOURCE_DIR}\n"
+ " -I${CMAKE_SOURCE_DIR}/Source\n"
+ " -I${CMAKE_SOURCE_DIR}/JavaScriptCore/ForwardingHeaders\n"
+ "doc_dir=${WEBKIT_DIR}/gtk/docs\n"
+ "source_dirs=${WEBKIT_DIR}/gtk/webkit\n"
+ " ${DERIVED_SOURCES_WEBKITGTK_API_DIR}\n"
+ "headers=${WebKitGTK_ENUM_GENERATION_HEADERS}\n"
+)
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebKitgtkGNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit/gtk/GNUmakefile.am (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebKit/gtk/GNUmakefile.am        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit/gtk/GNUmakefile.am        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -379,6 +379,17 @@
</span><span class="cx">         && cp xgen-gtc $@ \
</span><span class="cx">         && rm -f xgen-gtc
</span><span class="cx">
</span><ins>+gtkdoc-webkitgtk.cfg: $(WebKit)/GNUmakefile.am $(srcdir)/Tools/gtk/GNUmakefile.am
+        $(AM_V_GEN)echo "[webkitgtk]" > $@ && \
+        echo "pkgconfig_file=$(webkit1_pkg_config_file)" >> $@ && \
+        echo "namespace=webkit" >> $@ && \
+        echo -e "cflags=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS)" >> $@ && \
+        echo "doc_dir=$(srcdir)/Source/WebKit/gtk/docs" >> $@ && \
+        echo -e "source_dirs=$(srcdir)/Source/WebKit/gtk/webkit\n \
+ Source/WebKit/gtk/webkit" >> $@ && \
+        echo -e "headers=$(webkitgtk_static_h_api) Source/WebKit/gtk/webkit/webkitversion.h" >> $@
+BUILT_SOURCES += gtkdoc-webkitgtk.cfg
+
</ins><span class="cx"> EXTRA_DIST += \
</span><span class="cx">         $(WebKit)/ChangeLog \
</span><span class="cx">         $(WebKit)/NEWS \
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebKit2GNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/GNUmakefile.am (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/GNUmakefile.am        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/GNUmakefile.am        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -809,6 +809,25 @@
</span><span class="cx">         -fvisibility-inlines-hidden \
</span><span class="cx">         $(global_cxxflags)
</span><span class="cx">
</span><ins>+# It would be nice to use the CPPFLAGS from the WebKit2 library here, but the prefix
+# header doesn't seem to play nicely with the gtkdoc tools.
+gtkdoc-webkit2gtk.cfg: $(WebKit2)/GNUmakefile.am $(WebKit2)/GNUmakefile.list.am
+        $(AM_V_GEN)echo "[webkit2gtk]" > $@ && \
+        echo "pkgconfig_file=$(webkit2_pkg_config_file)" >> $@ && \
+        echo "namespace=webkit" >> $@ && \
+        echo -e "cflags=-I$(srcdir)/Source\n \
+ -I$(WebKit2)/UIProcess/API/gtk\n \
+ -IDerivedSources/webkit2gtk/include\n \
+ -IDerivedSources/WebKit2/webkit2gtk\n" >> $@ && \
+        echo "doc_dir=$(WebKit2)/UIProcess/API/gtk/docs" >> $@ && \
+        echo -e "source_dirs=$(WebKit2)/UIProcess/API/gtk\n \
+ $(WebKit2)/WebProcess/InjectedBundle/API/gtk\n \
+ DerivedSources/WebKit2/webkit2gtk/webkit2\n" >> $@ && \
+        echo -e "headers=$(webkit2gtk_ui_h_api)\n \
+ $(webkit2gtk_web_extension_h_api)\n \
+ DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitVersion.h" >> $@
+BUILT_SOURCES += gtkdoc-webkit2gtk.cfg
+
</ins><span class="cx"> EXTRA_DIST += \
</span><span class="cx">         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
</span><span class="cx">         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-sections.txt \
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR})
</span><span class="cx">
</span><span class="cx"> configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h)
</span><del>-configure_file(webkit2gtk.pc.in ${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc @ONLY)
</del><ins>+configure_file(webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE} @ONLY)
</ins><span class="cx">
</span><span class="cx"> add_definitions(-DWEBKIT2_COMPILATION)
</span><span class="cx"> add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}")
</span><span class="lines">@@ -788,3 +788,18 @@
</span><span class="cx"> ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib
</span><span class="cx"> DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
</span><span class="cx"> )
</span><ins>+
+file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkit2gtk.cfg
+ "[webkit2gtk]\n"
+ "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
+ "namespace=webkit\n"
+ "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
+ " -I${WEBKIT2_DIR}/UIProcess/API/gtk\n"
+ " -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}\n"
+ " -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}\n"
+ "doc_dir=${WEBKIT2_DIR}/UIProcess/API/gtk/docs\n"
+ "source_dirs=${WEBKIT2_DIR}/UIProcess/API/gtk\n"
+ " ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk\n"
+ " ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}\n"
+ "headers=${WebKit2GTK_ENUM_GENERATION_HEADERS} ${WebKit2WebExtension_INSTALLED_HEADERS}\n"
+)
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourcecmakeOptionsGTKcmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/cmake/OptionsGTK.cmake (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/cmake/OptionsGTK.cmake        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Source/cmake/OptionsGTK.cmake        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -274,6 +274,10 @@
</span><span class="cx"> set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders)
</span><span class="cx"> set(FORWARDING_HEADERS_WEBKIT2GTK_DIR ${FORWARDING_HEADERS_DIR}/webkit2gtk)
</span><span class="cx"> set(FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR ${FORWARDING_HEADERS_DIR}/webkit2gtk-webextension)
</span><ins>+
+set(WebKit_PKGCONFIG_FILE ${CMAKE_BINARY_DIR}/Source/WebKit/gtk/webkitgtk-${WEBKITGTK_API_VERSION}.pc)
+set(WebKit2_PKGCONFIG_FILE ${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc)
+
</ins><span class="cx"> set(SHOULD_INSTALL_JS_SHELL ON)
</span><span class="cx">
</span><span class="cx"> # Push of rbp is needed after JSC JIT uses CStack. See http://wkbug.com/127777.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24ToolsgtkGNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/GNUmakefile.am (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Tools/gtk/GNUmakefile.am        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/GNUmakefile.am        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -10,21 +10,23 @@
</span><span class="cx"> .PHONY : docs
</span><span class="cx"> DISTCLEANFILES += docs-build.stamp
</span><span class="cx">
</span><del>-docs_build_stamp_list = \
</del><ins>+docs_build_dependencies = \
</ins><span class="cx">         Source/WebKit/gtk/docs/webkitenvironment.xml
</span><span class="cx">
</span><span class="cx"> if ENABLE_WEBKIT1
</span><del>-docs_build_stamp_list += \
</del><ins>+docs_build_dependencies += \
</ins><span class="cx">         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
</span><span class="cx">         Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
</span><del>-        Source/WebKit/gtk/docs/webkitgtk-sections.txt
</del><ins>+        Source/WebKit/gtk/docs/webkitgtk-sections.txt \
+        gtkdoc-webkitgtk.cfg
</ins><span class="cx"> endif
</span><span class="cx">
</span><span class="cx"> if ENABLE_WEBKIT2
</span><del>-docs_build_stamp_list += \
</del><ins>+docs_build_dependencies += \
</ins><span class="cx">         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
</span><span class="cx">         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
</span><del>-        Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
</del><ins>+        Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt \
+        gtkdoc-webkit2gtk.cfg
</ins><span class="cx"> endif
</span><span class="cx">
</span><span class="cx"> $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-docs.sgml: $(gdom_symbol_files) $(srcdir)/Tools/gtk/generate-webkitdom-doc-files
</span><span class="lines">@@ -39,12 +41,13 @@
</span><span class="cx">         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-docs.sgml \
</span><span class="cx">         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt
</span><span class="cx">
</span><del>-docs_build_stamp_list += \
</del><ins>+docs_build_dependencies += \
</ins><span class="cx">         libGObjectDOMBindings.la \
</span><span class="cx">         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-docs.sgml \
</span><del>-        $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt
</del><ins>+        $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt \
+        gtkdoc-webkitdom.cfg
</ins><span class="cx">
</span><del>-docs-build.stamp: $(docs_build_stamp_list)
</del><ins>+docs-build.stamp: $(docs_build_dependencies)
</ins><span class="cx">         CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc
</span><span class="cx">         @touch docs-build.stamp
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24Toolsgtkgenerategtkdoc"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -15,6 +15,9 @@
</span><span class="cx"> # License along with this library; if not, write to the Free Software
</span><span class="cx"> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</span><span class="cx">
</span><ins>+from __future__ import print_function
+from ConfigParser import SafeConfigParser
+
</ins><span class="cx"> import argparse
</span><span class="cx"> import common
</span><span class="cx"> import glob
</span><span class="lines">@@ -23,9 +26,6 @@
</span><span class="cx"> import os.path
</span><span class="cx"> import sys
</span><span class="cx">
</span><del>-sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
-import jhbuildrc_common
-
</del><span class="cx"> def configure_logging(verbose):
</span><span class="cx"> level = logging.DEBUG if verbose else logging.INFO
</span><span class="cx"> logger = logging.getLogger('gtkdoc')
</span><span class="lines">@@ -38,183 +38,119 @@
</span><span class="cx"> else:
</span><span class="cx"> handler.setFormatter(logging.Formatter('%(message)s'))
</span><span class="cx">
</span><del>-
-def get_gtkdoc_module_paths(xref_dep_packages):
- deps = []
- html_dir = os.path.join('share', 'gtk-doc', 'html')
-
- for package in xref_dep_packages:
- prefix = common.prefix_of_pkg_config_file(package)
- if prefix is None:
- continue
- for module in xref_dep_packages[package]:
- deps.append(os.path.join(prefix, html_dir, module))
-
- return deps
-
-
-def get_common_xref_deps():
- return {
</del><ins>+def get_gtkdoc_module_paths(gtk_version):
+ dependent_packages = {
</ins><span class="cx"> 'glib-2.0' : ['glib', 'gobject', 'gio'],
</span><span class="cx"> 'libsoup-2.4' : ['libsoup-2.4'],
</span><span class="cx"> 'gdk-pixbuf-2.0': ['gdk-pixbuf']
</span><span class="cx"> }
</span><del>-
-def webkitdom_docs_html_path():
- return common.build_path('Documentation', 'webkitdomgtk', 'html')
-
-def get_webkit2_options(virtual_root):
- api_path = jhbuildrc_common.top_level_path('Source', 'WebKit2', 'UIProcess', 'API', 'gtk')
- injected_bundle_api_path = jhbuildrc_common.top_level_path('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk')
-
- if common.is_cmake_build():
- generated_api_path = common.build_path('DerivedSources', 'webkit2gtk', 'webkit2')
</del><ins>+ if gtk_version == 3:
+ dependent_packages.update({'gtk+-3.0' : ['gtk3', 'gdk3']})
</ins><span class="cx"> else:
</span><del>- generated_api_path = common.build_path('DerivedSources', 'WebKit2', 'webkit2gtk', 'webkit2')
</del><ins>+ dependent_packages.update({'gtk+-2.0' : ['gtk', 'gdk']})
</ins><span class="cx">
</span><del>- xref_deps = get_common_xref_deps().copy()
- xref_deps.update({
- 'gtk+-3.0' : ['gtk3', 'gdk3']
- })
</del><ins>+ paths = []
+ html_dir = os.path.join('share', 'gtk-doc', 'html')
+ for package, modules in dependent_packages.iteritems():
+ prefix = common.prefix_of_pkg_config_file(package)
+ if prefix is None:
+ continue
+ for module in modules:
+ paths.append(os.path.join(prefix, html_dir, module))
+ # This technically is not needed for the GObject DOM bindings documentation itself,
+ # but adding it doesn't hurt and allows us to avoid a check here.
+ paths.append(common.build_path('Documentation', 'webkitdomgtk', 'html'))
+ return paths
</ins><span class="cx">
</span><del>- def src_path(*args):
- return os.path.join(api_path, *args)
</del><ins>+def print_missing_api(generator):
+ missing_api = generator.api_missing_documentation()
+ if not missing_api:
+ return
+ print("\nThe following API are missing documentation:")
+ for api in missing_api:
+ print("\t{0}".format(api))
</ins><span class="cx">
</span><del>- options = {
- 'decorator': 'WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\(.+\)',
- 'deprecation_guard': 'WEBKIT_DISABLE_DEPRECATED',
- 'library_path' : common.library_build_path(),
- 'virtual_root' : virtual_root,
- 'module_name' : 'webkit2gtk',
- 'namespace' : 'webkit',
- 'doc_dir' : src_path('docs'),
- 'output_dir' : common.build_path('Documentation', 'webkit2gtk'),
- 'source_dirs' : [src_path(), generated_api_path, injected_bundle_api_path],
- 'cflags' :
- # Common paths
- ' -I' + jhbuildrc_common.top_level_path('Source') + \
- ' -I' + api_path + \
- # Autotools paths
- ' -I' + common.build_path('DerivedSources', 'webkit2gtk', 'include') + \
- ' -I' + common.build_path('DerivedSources', 'WebKit2', 'webkit2gtk') + \
- # CMake paths
- ' -I' + common.build_path('DerivedSources', 'ForwardingHeaders', 'webkit2gtk') + \
- ' -I' + common.build_path('DerivedSources', 'webkit2gtk'),
- 'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps) + [webkitdom_docs_html_path()],
- 'ignored_files': glob.glob(src_path('*Private.h')) + \
- glob.glob(os.path.join(injected_bundle_api_path, '*Private.h')) + \
- glob.glob(src_path('*Client*')) + \
- glob.glob(src_path('WebKitAuthenticationDialog.*')) + \
- glob.glob(src_path('WebKitBatteryProvider.*')) + \
- glob.glob(src_path('WebKitGeolocationProvider.*')) + \
- glob.glob(src_path('WebKitTextChecker.*')) + \
- glob.glob(src_path('WebKitWebViewBaseAccessible.*')) + \
- glob.glob(src_path('WebViewBaseInputMethodFilter.*')) + \
- glob.glob(os.path.join(generated_api_path, 'WebKitMarshal.*')) + \
- glob.glob(os.path.join(generated_api_path, 'WebKitEnumTypes.*')) + \
- glob.glob(src_path('tests/*.h'))
- }
- return options
</del><ins>+def files_to_ignore(source_dirs, headers_with_gtkdoc):
+ """
+ Find files to ignore during documentation generation. We assume that if an
+ implementation file exists for a header with gtkdoc (say webkitfoo.cpp for
+ webkitfoo.h) we shouldn't ignore that file. Currently this holds true for all
+ of the WebKit project.
+ """
+ implementation_files = list(headers_with_gtkdoc)
+ for header in headers_with_gtkdoc:
+ def add_file_if_exists(file):
+ if os.path.isfile(file):
+ implementation_files.append(os.path.abspath(file))
+ header_name_without_extension = os.path.splitext(header)[0]
+ add_file_if_exists(header_name_without_extension + ".cpp")
+ add_file_if_exists(header_name_without_extension + ".c")
</ins><span class="cx">
</span><del>-def get_webkit1_options(gtk_version, virtual_root):
- def src_path(*args):
- return jhbuildrc_common.top_level_path(*(('Source', 'WebKit', 'gtk') + args))
</del><ins>+ def file_should_be_ignored(file):
+ if os.path.splitext(file)[1] not in ['.h', '.c', '.cpp', '.cc']:
+ return False # These files are ignored anyway.
+ if not os.path.isfile(file):
+ return False
+ return os.path.abspath(file) not in implementation_files
</ins><span class="cx">
</span><del>- def webkitversionh_path():
- if common.is_cmake_build():
- return common.build_path('DerivedSources', 'webkitgtk')
- else:
- return common.build_path('Source', 'WebKit', 'gtk', 'webkit')
</del><ins>+ all_files = sum([[os.path.join(dir, file) for file in os.listdir(dir)] for dir in source_dirs], [])
+ return filter(file_should_be_ignored, all_files)
</ins><span class="cx">
</span><del>- xref_deps = get_common_xref_deps().copy()
- if gtk_version == 3:
- xref_deps.update({
- 'gtk+-3.0' : ['gtk3', 'gdk3']
- })
- else:
- xref_deps.update({
- 'gtk+-2.0' : ['gtk', 'gdk']
- })
</del><ins>+def get_generator_for_config(config_file, virtual_root):
+ if not os.path.isfile(config_file):
+ return None
</ins><span class="cx">
</span><del>- options = {
- 'decorator': 'WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\(.+\)',
- 'deprecation_guard': 'WEBKIT_DISABLE_DEPRECATED',
- 'library_path' : common.library_build_path(),
- 'virtual_root' : virtual_root,
- 'module_name' : 'webkitgtk',
- 'namespace' : 'webkit',
- 'doc_dir' : src_path('docs'),
- 'output_dir' : common.build_path('Documentation', 'webkitgtk'),
- 'source_dirs' : [src_path('webkit'), webkitversionh_path()],
- 'cflags' : ' -I' + common.build_path('WebKit', 'gtk') + \
- ' -I' + common.build_path('DerivedSources') + \
- ' -I' + src_path() + \
- ' -I' + jhbuildrc_common.top_level_path('Source') + \
- ' -I' + jhbuildrc_common.top_level_path('Source', 'JavaScriptCore', 'ForwardingHeaders'),
- 'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps) + [webkitdom_docs_html_path()],
- 'ignored_files': glob.glob(src_path('webkit', '*private.*')) + \
- glob.glob(src_path('webkit', 'webkitauthenticationdialog.*')) + \
- glob.glob(src_path('webkit', 'webkitspellcheckerenchant.*'))
- }
- return options
</del><ins>+ config = SafeConfigParser()
+ config.read(config_file)
+ module_name = config.sections()[0]
+ pkgconfig_file = config.get(module_name, 'pkgconfig_file')
+ gtk_version = common.gtk_version_of_pkg_config_file(pkgconfig_file)
</ins><span class="cx">
</span><del>-def get_webkitdom_options(virtual_root):
- def derived_sources_path(*args):
- return common.build_path(*(('DerivedSources', 'webkitdom') + args))
- def src_path(*args):
- return jhbuildrc_common.top_level_path(*(('Source', 'WebCore', 'bindings', 'gobject') + args))
-
- xref_deps = { 'glib-2.0' : ['glib', 'gobject', 'gio'] }
-
- options = {
</del><ins>+ source_dirs = config.get(module_name, 'source_dirs').replace(';', ' ').split()
+ headers = [os.path.abspath(f) for f in config.get(module_name, 'headers').replace(';', ' ').split()]
+ return gtkdoc.PkgConfigGTKDoc(pkgconfig_file, {
</ins><span class="cx"> 'decorator': 'WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\(.+\)',
</span><span class="cx"> 'deprecation_guard': 'WEBKIT_DISABLE_DEPRECATED',
</span><del>- 'library_path' : common.library_build_path(),
- 'virtual_root' : virtual_root,
- 'module_name' : 'webkitdomgtk',
- 'namespace' : 'webkit_dom',
- 'doc_dir' : derived_sources_path('docs'),
- 'output_dir' : common.build_path('Documentation', 'webkitdomgtk'),
- 'source_dirs' : [derived_sources_path()],
- 'cflags' : ' -I' + derived_sources_path() + \
- ' -I' + src_path() + \
- ' -I' + jhbuildrc_common.top_level_path('Source'),
- 'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps),
- 'ignored_files': glob.glob(derived_sources_path('*Private.h'))
- }
- return options
</del><ins>+ 'library_path': common.library_build_path(),
+ 'virtual_root': virtual_root,
+ 'module_name': module_name,
+ 'namespace': config.get(module_name, 'namespace'),
+ 'doc_dir': config.get(module_name, 'doc_dir'),
+ 'output_dir': common.build_path('Documentation', module_name),
+ 'source_dirs': source_dirs,
+ 'headers': headers,
+ 'cflags': " ".join(config.get(module_name, 'cflags').split()),
+ 'cross_reference_deps': get_gtkdoc_module_paths(gtk_version),
+ 'ignored_files': files_to_ignore(source_dirs, headers),
+ })
</ins><span class="cx">
</span><del>-def print_missing_api(generator):
- missing_api = generator.api_missing_documentation()
- if not missing_api:
- return
- print("\nThe following API are missing documentation:")
- for api in missing_api:
- print("\t%s" % api)
-
</del><span class="cx"> def generate_doc(generator, skip_html):
</span><ins>+ print("\nGenerating {0} documentation...".format(generator.module_name))
</ins><span class="cx"> generator.generate(not skip_html)
</span><span class="cx"> if generator.saw_warnings:
</span><span class="cx"> print_missing_api(generator)
</span><span class="cx"> return generator.saw_warnings
</span><span class="cx">
</span><del>-if __name__ == "__main__":
- parser = argparse.ArgumentParser(description='Generate gtkdoc for WebKit.')
- parser.add_argument('-v', '--verbose', action='store_true',
- help='Whether or not to run in verbose mode.')
- parser.add_argument('--rebase', action='store_true',
- help='When specified, run the tool in rebase mode.')
- parser.add_argument('--skip-html', action='store_true',
- help='Whether or not to skip HTML generation, which can be slow.')
- parser.add_argument('--virtual-root', type=str, default='',
- help='A temporary installation directory which is used as the root ' + \
- 'where the actual installation prefix lives; this is mostly ' + \
- 'useful for packagers, and should be set to what is given to ' + \
- 'make install as DESTDIR.')
</del><ins>+def rebase_doc(generator):
+ print("\nRebasing {0} documentation...".format(generator.module_name))
+ try:
+ generator.rebase_installed_docs()
+ except Exception:
+ print("Rebase did not happen, likely no documentation is present.")
</ins><span class="cx">
</span><del>- arguments = parser.parse_args()
- configure_logging(arguments.verbose)
</del><ins>+def generate_documentation_for_config(config_file):
+ generator = get_generator_for_config(config_file, arguments.virtual_root)
+ if not generator:
+ print("{0} does not exist! Skipping that documentation.".format(os.path.basename(config_file)))
+ return
</ins><span class="cx">
</span><ins>+ if not arguments.rebase:
+ generate_doc(generator, arguments.skip_html)
+ else:
+ rebase_doc(generator)
+ return generator.saw_warnings
+
+def prepare_environment_for_gtkdoc_generation():
</ins><span class="cx"> # We need to add the JavaScriptCore build directory to the PKG_CONFIG_PATH
</span><span class="cx"> # so that pkgconfig can properly resolve the libjavascriptcore dependency.
</span><span class="cx"> pkg_config_path = os.environ.get("PKG_CONFIG_PATH")
</span><span class="lines">@@ -233,59 +169,31 @@
</span><span class="cx"> if os.environ.get('CC') == "clang":
</span><span class="cx"> os.environ['CFLAGS'] += ' -Qunused-arguments'
</span><span class="cx">
</span><del>- saw_webkit1_warnings = saw_webkit2_warnings = False
- wk2_pkg_config_path = common.build_path('Source', 'WebKit2', 'webkit2gtk-3.0.pc')
- wk1_pkg_config_path = common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc')
- if not os.path.exists(wk1_pkg_config_path):
- wk1_pkg_config_path = common.build_path('Source', 'WebKit', 'gtk', 'webkit-1.0.pc')
</del><ins>+ # Paths from the GNUmakefile generated configuration files are relative to the build directory.
+ os.chdir(common.build_path())
</ins><span class="cx">
</span><del>- if os.path.exists(wk2_pkg_config_path):
- pkg_config_path = wk2_pkg_config_path
- elif os.path.exists(wk1_pkg_config_path):
- pkg_config_path = wk1_pkg_config_path
</del><ins>+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='Generate gtkdoc for WebKit.')
+ parser.add_argument('-v', '--verbose', action='store_true',
+ help='Whether or not to run in verbose mode.')
+ parser.add_argument('--rebase', action='store_true',
+ help='When specified, run the tool in rebase mode.')
+ parser.add_argument('--skip-html', action='store_true',
+ help='Whether or not to skip HTML generation, which can be slow.')
+ parser.add_argument('--virtual-root', type=str, default='',
+ help='A temporary installation directory which is used as the root ' + \
+ 'where the actual installation prefix lives; this is mostly ' + \
+ 'useful for packagers, and should be set to what is given to ' + \
+ 'make install as DESTDIR.')
</ins><span class="cx">
</span><del>- webkitdom_docs_path = common.build_path('DerivedSources', 'webkitdom', 'docs')
- if not common.is_cmake_build():
- generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, get_webkitdom_options(arguments.virtual_root))
- if not arguments.rebase:
- print("\nGenerating WebKitDOM documentation...")
- saw_webkitdom_warnings = generate_doc(generator, arguments.skip_html)
- else:
- print("\nRebasing WebKitDOM documentation...")
- try:
- generator.rebase_installed_docs()
- except Exception:
- print("Rebase did not happen, likely no documentation is present.")
</del><ins>+ arguments = parser.parse_args()
+ configure_logging(arguments.verbose)
</ins><span class="cx">
</span><del>- pkg_config_path = wk1_pkg_config_path
- if os.path.exists(pkg_config_path):
- options = get_webkit1_options(common.gtk_version_of_pkg_config_file(pkg_config_path), arguments.virtual_root)
- generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, options)
- if not arguments.rebase:
- print("Generating WebKit1 documentation...")
- saw_webkit1_warnings = generate_doc(generator, arguments.skip_html)
- else:
- print("Rebasing WebKit1 documentation...")
- try:
- generator.rebase_installed_docs()
- except Exception:
- print("Rebase did not happen, likely no documentation is present.")
</del><ins>+ prepare_environment_for_gtkdoc_generation()
</ins><span class="cx">
</span><del>- # WebKit2 might not be enabled, so check for the pkg-config file before building documentation.
- pkg_config_path = wk2_pkg_config_path
- if os.path.exists(pkg_config_path):
- generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, get_webkit2_options(arguments.virtual_root))
- if not arguments.rebase:
- print("\nGenerating WebKit2 documentation...")
- saw_webkit2_warnings = generate_doc(generator, arguments.skip_html)
- else:
- print("\nRebasing WebKit2 documentation...")
- try:
- generator.rebase_installed_docs()
- except Exception:
- print("Rebase did not happen, likely no documentation is present.")
-
- # For CMake we are still generating warnings because we lack DOM bindings docs,
- # so do not cause the build to fail for now.
</del><ins>+ saw_webkit1_warnings = generate_documentation_for_config(common.build_path('gtkdoc-webkitgtk.cfg'))
+ saw_webkit2_warnings = generate_documentation_for_config(common.build_path('gtkdoc-webkit2gtk.cfg'))
</ins><span class="cx"> if not common.is_cmake_build():
</span><del>- sys.exit(saw_webkit1_warnings or saw_webkit2_warnings)
</del><ins>+ generate_documentation_for_config(common.build_path('gtkdoc-webkitdom.cfg'))
+
+ sys.exit(saw_webkit1_warnings or saw_webkit2_warnings)
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24Toolsgtkgtkdocpy"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/gtkdoc.py (168708 => 168709)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Tools/gtk/gtkdoc.py        2014-05-13 19:28:38 UTC (rev 168708)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/gtkdoc.py        2014-05-13 19:29:03 UTC (rev 168709)
</span><span class="lines">@@ -38,11 +38,14 @@
</span><span class="cx"> module_name -- The name of the documentation module. For libraries this
</span><span class="cx"> is typically the library name. Required if not library path
</span><span class="cx"> is given.
</span><del>- source_dirs -- A list of paths to the source code to be scanned. Required.
</del><ins>+ source_dirs -- A list of paths to directories of source code to be scanned.
+ Required if headers is not specified.
</ins><span class="cx"> ignored_files -- A list of filenames to ignore in the source directory. It is
</span><span class="cx"> only necessary to provide the basenames of these files.
</span><span class="cx"> Typically it is important to provide an updated list of
</span><span class="cx"> ignored files to prevent warnings about undocumented symbols.
</span><ins>+ headers -- A list of paths to headers to be scanned. Required if source_dirs
+ is not specified.
</ins><span class="cx"> namespace -- The library namespace.
</span><span class="cx"> decorator -- If a decorator is used to unhide certain symbols in header
</span><span class="cx"> files this parameter is required for successful scanning.
</span><span class="lines">@@ -87,6 +90,7 @@
</span><span class="cx"> # Parameters specific to scanning.
</span><span class="cx"> self.module_name = ''
</span><span class="cx"> self.source_dirs = []
</span><ins>+ self.headers = []
</ins><span class="cx"> self.ignored_files = []
</span><span class="cx"> self.namespace = ''
</span><span class="cx"> self.decorator = ''
</span><span class="lines">@@ -112,18 +116,18 @@
</span><span class="cx"> for key, value in iter(args.items()):
</span><span class="cx"> setattr(self, key, value)
</span><span class="cx">
</span><del>- def raise_error_if_not_specified(key):
- if not getattr(self, key):
- raise Exception('%s not specified.' % key)
</del><ins>+ if not getattr(self, 'output_dir'):
+ raise Exception('output_dir not specified.')
+ if not getattr(self, 'module_name'):
+ raise Exception('module_name not specified.')
+ if not getattr(self, 'source_dirs') and not getattr(self, 'headers'):
+ raise Exception('Neither source_dirs nor headers specified.' % key)
</ins><span class="cx">
</span><del>- raise_error_if_not_specified('output_dir')
- raise_error_if_not_specified('source_dirs')
- raise_error_if_not_specified('module_name')
-
</del><span class="cx"> # Make all paths absolute in case we were passed relative paths, since
</span><span class="cx"> # we change the current working directory when executing subcommands.
</span><span class="cx"> self.output_dir = os.path.abspath(self.output_dir)
</span><span class="cx"> self.source_dirs = [os.path.abspath(x) for x in self.source_dirs]
</span><ins>+ self.headers = [os.path.abspath(x) for x in self.headers]
</ins><span class="cx"> if self.library_path:
</span><span class="cx"> self.library_path = os.path.abspath(self.library_path)
</span><span class="cx">
</span><span class="lines">@@ -274,8 +278,9 @@
</span><span class="cx"> '--module=%s' % self.module_name,
</span><span class="cx"> '--rebuild-types']
</span><span class="cx">
</span><del>- # Each source directory should be have its own "--source-dir=" prefix.
- args.extend(['--source-dir=%s' % path for path in self.source_dirs])
</del><ins>+ if not self.headers:
+ # Each source directory should be have its own "--source-dir=" prefix.
+ args.extend(['--source-dir=%s' % path for path in self.source_dirs])
</ins><span class="cx">
</span><span class="cx"> if self.decorator:
</span><span class="cx"> args.append('--ignore-decorators=%s' % self.decorator)
</span><span class="lines">@@ -284,13 +289,18 @@
</span><span class="cx"> if self.output_dir:
</span><span class="cx"> args.append('--output-dir=%s' % self.output_dir)
</span><span class="cx">
</span><del>- # gtkdoc-scan wants the basenames of ignored headers, so strip the
- # dirname. Different from "--source-dir", the headers should be
- # specified as one long string.
- ignored_files_basenames = self._ignored_files_basenames()
- if ignored_files_basenames:
- args.append('--ignore-headers=%s' % ignored_files_basenames)
</del><ins>+ # We only need to pass the list of ignored files if the we are not using an explicit list of headers.
+ if not self.headers:
+ # gtkdoc-scan wants the basenames of ignored headers, so strip the
+ # dirname. Different from "--source-dir", the headers should be
+ # specified as one long string.
+ ignored_files_basenames = self._ignored_files_basenames()
+ if ignored_files_basenames:
+ args.append('--ignore-headers=%s' % ignored_files_basenames)
</ins><span class="cx">
</span><ins>+ if self.headers:
+ args.extend(self.headers)
+
</ins><span class="cx"> self._run_command(args)
</span><span class="cx">
</span><span class="cx"> def _run_gtkdoc_scangobj(self):
</span></span></pre>
</div>
</div>
</body>
</html>