<!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>[161017] trunk</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/161017">161017</a></dd>
<dt>Author</dt> <dd>gns@gnome.org</dd>
<dt>Date</dt> <dd>2013-12-23 14:01:12 -0800 (Mon, 23 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] [CMake] Add support for generating gtkdoc
https://bugs.webkit.org/show_bug.cgi?id=116376
Reviewed by Martin Robinson.
.:
* Source/PlatformGTK.cmake: Added. New custom target that depends on a custom command
which calls our generate-gtkdoc script. It uses a docs-build.stamp for simplicity,
like the autotools build.
Source/WebKit2:
* PlatformGTK.cmake: make generated API files go to DerivedSources/WebKit2, to
match the autotools build and gtkdoc.py's expectation.
Tools:
* gtk/common.py: look for files in the directories used by the cmake build as well.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourcePlatformGTKcmake">trunk/Source/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsgtkcommonpy">trunk/Tools/gtk/common.py</a></li>
<li><a href="#trunkToolsgtkgenerategtkdoc">trunk/Tools/gtk/generate-gtkdoc</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/ChangeLog        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2013-12-23 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] [CMake] Add support for generating gtkdoc
+ https://bugs.webkit.org/show_bug.cgi?id=116376
+
+ Reviewed by Martin Robinson.
+
+ * Source/PlatformGTK.cmake: Added. New custom target that depends on a custom command
+ which calls our generate-gtkdoc script. It uses a docs-build.stamp for simplicity,
+ like the autotools build.
+
</ins><span class="cx"> 2013-12-23 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] [CMake] Build the WebKit2 GObject API tests
</span></span></pre></div>
<a id="trunkSourcePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/PlatformGTK.cmake (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/PlatformGTK.cmake        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/Source/PlatformGTK.cmake        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -1,7 +1,40 @@
</span><ins>+set(DocumentationDependencies
+ "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml"
+)
+
</ins><span class="cx"> if (ENABLE_WEBKIT)
</span><del>- add_subdirectory(${WEBKIT_DIR}/gtk/tests)
</del><ins>+ list(APPEND DocumentationDependencies
+ WebKit
+ "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-docs.sgml"
+ "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-sections.txt"
+ )
</ins><span class="cx"> endif ()
</span><span class="cx">
</span><span class="cx"> if (ENABLE_WEBKIT2)
</span><del>- add_subdirectory(${WEBKIT2_DIR}/UIProcess/API/gtk/tests)
</del><ins>+ list(APPEND DocumentationDependencies
+ WebKit2
+ "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
+ "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
+ )
</ins><span class="cx"> endif ()
</span><ins>+
+add_custom_command(
+ OUTPUT docs-build.stamp
+ DEPENDS ${DocumentationDependencies}
+ COMMAND CC="${CMAKE_C_COMPILER}" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc
+ COMMAND touch docs-build.stamp
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+)
+
+add_custom_target(fake-docs-target ALL
+ DEPENDS docs-build.stamp
+)
+
+if (ENABLE_WEBKIT)
+ add_dependencies(fake-docs-target WebKit)
+endif ()
+
+if (ENABLE_WEBKIT2)
+ add_dependencies(fake-docs-target WebKit2)
+endif ()
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/Source/WebKit2/ChangeLog        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2013-12-23 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] [CMake] Add support for generating gtkdoc
+ https://bugs.webkit.org/show_bug.cgi?id=116376
+
+ Reviewed by Martin Robinson.
+
+ * PlatformGTK.cmake: make generated API files go to DerivedSources/WebKit2, to
+ match the autotools build and gtkdoc.py's expectation.
+
</ins><span class="cx"> 2013-12-23 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] [CMake] Build the WebKit2 GObject API tests
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
</span><del>-set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/webkit2gtk)
</del><ins>+set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/WebKit2/webkit2gtk)
</ins><span class="cx"> set(WEBKIT2_BUILT_API_DIR ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/webkit2)
</span><span class="cx"> set(WEBKIT2_FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/Tools/ChangeLog        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2013-12-23 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] [CMake] Add support for generating gtkdoc
+ https://bugs.webkit.org/show_bug.cgi?id=116376
+
+ Reviewed by Martin Robinson.
+
+ * gtk/common.py: look for files in the directories used by the cmake build as well.
+
</ins><span class="cx"> 2013-12-23 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Build with network process unconditionally
</span></span></pre></div>
<a id="trunkToolsgtkcommonpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/common.py (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/common.py        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/Tools/gtk/common.py        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -23,8 +23,32 @@
</span><span class="cx">
</span><span class="cx"> script_dir = None
</span><span class="cx"> build_dir = None
</span><ins>+library_build_dir = None
+is_cmake = None
</ins><span class="cx">
</span><span class="cx">
</span><ins>+def is_cmake_build():
+ global is_cmake
+
+ if is_cmake is None:
+ if build_path('CMakeCache.txt'):
+ is_cmake = True
+ else:
+ is_cmake = False
+
+ return is_cmake
+
+
+def library_build_path(*args):
+ global library_build_dir
+ if not library_build_dir:
+ if is_cmake_build():
+ library_build_dir = build_path('lib', *args)
+ else:
+ library_build_dir = build_path('.libs', *args)
+ return library_build_dir
+
+
</ins><span class="cx"> def script_path(*args):
</span><span class="cx"> global script_dir
</span><span class="cx"> if not script_dir:
</span><span class="lines">@@ -43,7 +67,11 @@
</span><span class="cx">
</span><span class="cx"> def is_valid_build_directory(path):
</span><span class="cx"> return os.path.exists(os.path.join(path, 'GNUmakefile')) or \
</span><del>- os.path.exists(os.path.join(path, 'Programs', 'DumpRenderTree'))
</del><ins>+ os.path.exists(os.path.join(path, 'Programs', 'GtkLauncher')) or \
+ os.path.exists(os.path.join(path, 'Programs', 'MiniBrowser')) or \
+ os.path.exists(os.path.join(path, 'CMakeCache.txt')) or \
+ os.path.exists(os.path.join(path, 'bin/GtkLauncher')) or \
+ os.path.exists(os.path.join(path, 'bin/MiniBrowser'))
</ins><span class="cx">
</span><span class="cx"> if len(sys.argv[1:]) > 1 and os.path.exists(sys.argv[-1]) and is_valid_build_directory(sys.argv[-1]):
</span><span class="cx"> return sys.argv[-1]
</span></span></pre></div>
<a id="trunkToolsgtkgenerategtkdoc"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/generate-gtkdoc (161016 => 161017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/generate-gtkdoc        2013-12-23 21:49:43 UTC (rev 161016)
+++ trunk/Tools/gtk/generate-gtkdoc        2013-12-23 22:01:12 UTC (rev 161017)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> return {
</span><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.build_path('.libs'),
</del><ins>+ 'library_path' : common.library_build_path(),
</ins><span class="cx"> 'virtual_root' : virtual_root,
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -120,6 +120,12 @@
</span><span class="cx"> def src_path(*args):
</span><span class="cx"> return common.top_level_path(*(('Source', 'WebKit', 'gtk') + args))
</span><span class="cx">
</span><ins>+ def webkitversionh_path():
+ if common.is_cmake_build():
+ return common.build_path('DerivedSources', 'webkit')
+ else:
+ return common.build_path('Source', 'WebKit', 'gtk', 'webkit')
+
</ins><span class="cx"> xref_deps = get_common_xref_deps().copy()
</span><span class="cx"> if gtk_version == 3:
</span><span class="cx"> xref_deps.update({
</span><span class="lines">@@ -136,7 +142,7 @@
</span><span class="cx"> 'namespace' : 'webkit',
</span><span class="cx"> 'doc_dir' : src_path('docs'),
</span><span class="cx"> 'output_dir' : common.build_path('Documentation', 'webkitgtk'),
</span><del>- 'source_dirs' : [src_path('webkit'), common.build_path('Source', 'WebKit', 'gtk', 'webkit')],
</del><ins>+ 'source_dirs' : [src_path('webkit'), webkitversionh_path()],
</ins><span class="cx"> 'cflags' : ' -I' + common.build_path('WebKit', 'gtk') + \
</span><span class="cx"> ' -I' + common.build_path('DerivedSources') + \
</span><span class="cx"> ' -I' + src_path() + \
</span><span class="lines">@@ -216,17 +222,20 @@
</span><span class="cx"> pkg_config_path = wk2_pkg_config_path
</span><span class="cx"> elif os.path.exists(wk1_pkg_config_path):
</span><span class="cx"> pkg_config_path = wk1_pkg_config_path
</span><del>-generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, get_webkitdom_options())
-if '--rebase' not in sys.argv:
- print("\nGenerating WebKitDOM documentation...")
- saw_webkitdom_warnings = generate_doc(generator)
-else:
- print("\nRebasing WebKitDOM documentation...")
- try:
- generator.rebase_installed_docs()
- except Exception:
- print("Rebase did not happen, likely no documentation is present.")
</del><span class="cx">
</span><ins>+webkitdom_docs_path = common.build_path('DerivedSources', 'webkitdom', 'docs')
+if not common.is_cmake_build():
+ generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, get_webkitdom_options())
+ if '--rebase' not in sys.argv:
+ print("\nGenerating WebKitDOM documentation...")
+ saw_webkitdom_warnings = generate_doc(generator)
+ else:
+ print("\nRebasing WebKitDOM documentation...")
+ try:
+ generator.rebase_installed_docs()
+ except Exception:
+ print("Rebase did not happen, likely no documentation is present.")
+
</ins><span class="cx"> pkg_config_path = wk1_pkg_config_path
</span><span class="cx"> if os.path.exists(pkg_config_path):
</span><span class="cx"> options = get_webkit1_options(common.gtk_version_of_pkg_config_file(pkg_config_path))
</span><span class="lines">@@ -255,4 +264,7 @@
</span><span class="cx"> except Exception:
</span><span class="cx"> print("Rebase did not happen, likely no documentation is present.")
</span><span class="cx">
</span><del>-sys.exit(saw_webkit1_warnings or saw_webkit2_warnings)
</del><ins>+# For CMake we are still generating warnings because we lack DOM bindings docs,
+# so do not cause the build to fail for now.
+if not common.is_cmake_build():
+ sys.exit(saw_webkit1_warnings or saw_webkit2_warnings)
</ins></span></pre>
</div>
</div>
</body>
</html>