Title: [97901] trunk
Revision
97901
Author
[email protected]
Date
2011-10-19 17:35:07 -0700 (Wed, 19 Oct 2011)

Log Message

[GTK] Streamline wk1 documentation build
https://bugs.webkit.org/show_bug.cgi?id=70447

Reviewed by Martin Robinson.

.:

* GNUmakefile.am: include the documentation's GNUmakefile.am;
* autogen.sh: we no longer call gtkdocize, since we now ship
  a modified gtk-doc.make;
* configure.ac: no longer generate a separate GNUmakefile for
  the documentation build.

Source/WebKit/gtk:

* GNUmakefile.am: move files pertaining to the docs build to the
  docs GNUmakefile.am;
* GNUmakefile.gtk-doc.make: incorporate the gtk-doc makefile, and customize it
  to our non-recursive build;
* docs/GNUmakefile.am: simplification and adaption to work with the
  rest of the build system.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (97900 => 97901)


--- trunk/ChangeLog	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/ChangeLog	2011-10-20 00:35:07 UTC (rev 97901)
@@ -1,3 +1,16 @@
+2011-10-19  Gustavo Noronha Silva  <[email protected]>
+
+        [GTK] Streamline wk1 documentation build
+        https://bugs.webkit.org/show_bug.cgi?id=70447
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: include the documentation's GNUmakefile.am;
+        * autogen.sh: we no longer call gtkdocize, since we now ship
+          a modified gtk-doc.make;
+        * configure.ac: no longer generate a separate GNUmakefile for
+          the documentation build.
+
 2011-10-18  Adam Barth  <[email protected]>
 
         Always enable ENABLE(XPATH)

Modified: trunk/GNUmakefile.am (97900 => 97901)


--- trunk/GNUmakefile.am	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/GNUmakefile.am	2011-10-20 00:35:07 UTC (rev 97901)
@@ -194,18 +194,19 @@
 
 EXTRA_DIST += \
 	$(srcdir)/Source/autotools/symbols.filter \
-	$(srcdir)/gtk-doc.make \
 	$(srcdir)/Source/WebKit/LICENSE
 
 # Include module makefiles
 if USE_JSC
 include Source/_javascript_Core/GNUmakefile.am
 endif
+
 include Source/WebCore/GNUmakefile.am
 include Source/WebKit/gtk/GNUmakefile.am
 include Source/WebCore/bindings/gobject/GNUmakefile.am
 include Tools/GNUmakefile.am
 include Source/WebKit/gtk/po/GNUmakefile.am
+include Source/WebKit/gtk/docs/GNUmakefile.am
 include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
 
 if ENABLE_WEBKIT2

Modified: trunk/Source/WebKit/gtk/ChangeLog (97900 => 97901)


--- trunk/Source/WebKit/gtk/ChangeLog	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/Source/WebKit/gtk/ChangeLog	2011-10-20 00:35:07 UTC (rev 97901)
@@ -1,3 +1,17 @@
+2011-10-19  Gustavo Noronha Silva  <[email protected]>
+
+        [GTK] Streamline wk1 documentation build
+        https://bugs.webkit.org/show_bug.cgi?id=70447
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: move files pertaining to the docs build to the
+          docs GNUmakefile.am;
+        * GNUmakefile.gtk-doc.make: incorporate the gtk-doc makefile, and customize it
+          to our non-recursive build;
+        * docs/GNUmakefile.am: simplification and adaption to work with the
+          rest of the build system.
+
 2011-10-19  Zan Dobersek  <[email protected]>
 
         [Gtk][Geolocation] Build guards missing in geolocation clients

Modified: trunk/Source/WebKit/gtk/GNUmakefile.am (97900 => 97901)


--- trunk/Source/WebKit/gtk/GNUmakefile.am	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/Source/WebKit/gtk/GNUmakefile.am	2011-10-20 00:35:07 UTC (rev 97901)
@@ -383,11 +383,7 @@
 	$(WebKit)/ChangeLog \
 	$(WebKit)/NEWS \
 	$(WebKit)/webkitmarshal.list \
-	$(WebKit)/docs/GNUmakefile.* \
-	$(WebKit)/docs/webkitenvironment.xml \
-	$(WebKit)/docs/webkitgtk-docs.sgml \
-	$(WebKit)/docs/webkitgtk-sections.txt \
-	$(WebKit)/docs/version.xml.in \
+	$(WebKit)/GNUmakefile.gtk-doc.am \
 	$(WebKit)/po/* \
 	$(WebKit)/resources/* \
 	$(WebKit)/tests/resources/* \
@@ -591,8 +587,6 @@
 	$(top_builddir)/Programs/GtkLauncher
 
 DISTCLEANFILES += \
-	$(top_builddir)/Source/WebKit/gtk/docs/version.xml \
-	$(top_builddir)/Source/WebKit/gtk/docs/GNUmakefile \
 	$(top_builddir)/Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@[email protected] \
 	$(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@[email protected] \
 	$(top_builddir)/Source/WebKit/gtk/webkit/webkitversion.h

Added: trunk/Source/WebKit/gtk/GNUmakefile.gtk-doc.am (0 => 97901)


--- trunk/Source/WebKit/gtk/GNUmakefile.gtk-doc.am	                        (rev 0)
+++ trunk/Source/WebKit/gtk/GNUmakefile.gtk-doc.am	2011-10-20 00:35:07 UTC (rev 97901)
@@ -0,0 +1,215 @@
+# -*- mode: makefile -*-
+
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+SETUP_FILES = \
+	$(DOC_MAIN_SGML_FILE)		\
+	webkitenvironment.xml		\
+	$(DOC_MODULE)-sections.txt	\
+	$(DOC_MODULE)-overrides.txt
+
+EXTRA_DIST += \
+	$(HTML_IMAGES)			\
+	$(SETUP_FILES)
+
+DOC_STAMPS=doc-setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \
+	html-build.stamp pdf-build.stamp \
+	tmpl.stamp sgml.stamp html.stamp pdf.stamp
+
+SCANOBJ_FILES = 		 \
+	$(DOC_MODULE).args 	 \
+	$(DOC_MODULE).hierarchy  \
+	$(DOC_MODULE).interfaces \
+	$(DOC_MODULE).prerequisites \
+	$(DOC_MODULE).signals
+
+REPORT_FILES = \
+	$(DOC_MODULE)-undocumented.txt \
+	$(DOC_MODULE)-undeclared.txt \
+	$(DOC_MODULE)-unused.txt
+
+CLEANFILES += $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+HTML_BUILD_STAMP=html-build.stamp
+endif
+
+doc_srcdir := $(abs_srcdir)/Source/WebKit/gtk/docs
+
+docs: $(HTML_BUILD_STAMP)
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### setup ####
+
+doc-setup-build.stamp: libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected]
+	-@mkdir -p Documentation
+	-@ln -fs ../doltlibtool Documentation/
+	-@ln -fs ../doltcompile Documentation/
+	-@ln -fs ../libtool Documentation/
+	-@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+	    echo '  DOC   Preparing build'; \
+	    files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
+	    if test "x$$files" != "x" ; then \
+	        for file in $$files ; do \
+	            test -f $(doc_srcdir)/$$file && \
+	                cp -pu $(doc_srcdir)/$$file $(abs_builddir)/Documentation/ || true; \
+	        done; \
+	    fi; \
+	    test -d $(doc_srcdir)/tmpl && \
+	        { cp -rp $(doc_srcdir)/tmpl $(abs_builddir)/Documentation/; \
+	        chmod -R u+w $(abs_builddir)/Documentation/tmpl; } \
+	fi
+	@touch doc-setup-build.stamp
+
+#### scan ####
+
+scan-build.stamp: doc-setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
+	@echo '  DOC   Scanning header files'
+	@cd Documentation; _source_dir='' ; \
+	for i in $(DOC_SOURCE_DIR) ; do \
+	    _source_dir="$${_source_dir} --source-dir=../$$i" ; \
+	done ; \
+	gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+	@cd Documentation; if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+	    echo "  DOC   Introspecting gobjects"; \
+	    scanobj_options=""; \
+	    gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+	    if test "$(?)" = "0"; then \
+	        if test "x$(V)" = "x1"; then \
+	            scanobj_options="--verbose"; \
+	        fi; \
+	    fi; \
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+	    gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
+	else \
+	    for i in $(SCANOBJ_FILES) ; do \
+	        test -f $$i || touch $$i ; \
+	    done \
+	fi
+	@touch scan-build.stamp
+
+Documentation/$(DOC_MODULE)-decl.txt Documentation/$(SCANOBJ_FILES) Documentation/$(DOC_MODULE)-sections.txt Documentation/$(DOC_MODULE)-overrides.txt: scan-build.stamp
+	@true
+
+#### templates ####
+
+tmpl-build.stamp: doc-setup-build.stamp Documentation/$(DOC_MODULE)-decl.txt Documentation/$(SCANOBJ_FILES) Documentation/$(DOC_MODULE)-sections.txt Documentation/$(DOC_MODULE)-overrides.txt
+	@echo '  DOC   Rebuilding template files'
+	@cd Documentation; gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+	@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+	  if test -w $(abs_srcdir) ; then \
+	    cp -rp $(abs_builddir)/Documentation/tmpl $(doc_srcdir); \
+	  fi \
+	fi
+	@touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+	@true
+
+$(srcdir)/tmpl/*.sgml:
+	@true
+
+#### xml ####
+
+sgml-build.stamp: doc-setup-build.stamp tmpl.stamp Documentation/$(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml
+	@echo '  DOC   Building XML'
+	@-chmod -R u+w $(srcdir)
+	@cd Documentation; _source_dir='' ; \
+	for i in $(DOC_SOURCE_DIR) ; do \
+	    _source_dir="$${_source_dir} --source-dir=../$$i" ; \
+	done ; \
+	gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
+	@touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+	@true
+
+#### html ####
+
+Documentation/$(DOC_MAIN_SGML_FILE): sgml.stamp
+Documentation/webkitenvironment.xml: doc-setup-build.stamp
+
+html-build.stamp: sgml.stamp Documentation/$(DOC_MAIN_SGML_FILE)
+	@echo '  DOC   Building HTML'
+	@rm -rf Documentation/html
+	@mkdir Documentation/html
+	@cd Documentation; mkhtml_options=""; \
+	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+	if test "$(?)" = "0"; then \
+	  if test "x$(V)" = "x1"; then \
+	    mkhtml_options="$$mkhtml_options --verbose"; \
+	  fi; \
+	fi; \
+	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+	if test "$(?)" = "0"; then \
+	  mkhtml_options="$$mkhtml_options --path=\"$(doc_srcdir)\""; \
+	fi; \
+	cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+	-@test "x$(HTML_IMAGES)" = "x" || \
+	for file in $(HTML_IMAGES) ; do \
+	  if test -f $(abs_srcdir)/$$file ; then \
+	    cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
+	  fi; \
+	  if test -f $(abs_builddir)/$$file ; then \
+	    cp $(abs_builddir)/$$file $(abs_builddir)/html; \
+	  fi; \
+	done;
+	@echo '  DOC   Fixing cross-references'
+	@cd Documentation; gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+	@touch html-build.stamp
+
+clean-local: doc-clean-local
+
+doc-clean-local:
+	@rm -f Documentation/*~ Documentation/*.bak
+	@rm -rf Documentation/.libs
+
+distclean-local: doc-distclean-local
+
+doc-distclean-local:
+	@rm -rf Documentation
+
+maintainer-clean-local: doc-maintainer-clean-local
+
+doc-maintainer-clean-local: clean
+	@rm -rf Documentation/xml Documentation/html
+	-@rmdir Documentation
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+
+all: docs
+else
+dist-check-gtkdoc:
+	@echo "*** gtk-doc must be installed and enabled in order to make dist"
+	@false
+endif
+
+dist-hook: doc-dist-hook
+
+doc-dist-hook: dist-check-gtkdoc dist-hook-local
+	@mkdir $(distdir)/tmpl
+	@mkdir $(distdir)/html
+	@-cp ./Documentation/tmpl/*.sgml $(distdir)/tmpl
+	@cp ./Documentation/html/* $(distdir)/html
+	@-cp ./Documentation/$(DOC_MODULE).types $(distdir)/
+	@-cp ./Documentation/$(DOC_MODULE)-sections.txt $(distdir)/
+	@cd $(distdir) && rm -f $(DISTCLEANFILES)
+	@$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs

Modified: trunk/Source/WebKit/gtk/docs/GNUmakefile.am (97900 => 97901)


--- trunk/Source/WebKit/gtk/docs/GNUmakefile.am	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/Source/WebKit/gtk/docs/GNUmakefile.am	2011-10-20 00:35:07 UTC (rev 97901)
@@ -74,55 +74,51 @@
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
 HTML_IMAGES=
 
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files=webkitenvironment.xml
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files=
-
 # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
 # Only needed if you are using gtkdoc-scangobj to dynamically query widget
 # signals and properties.
 # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
 INCLUDES= \
-	-I$(top_srcdir)/Source/WebKit/gtk \
-	-I$(top_builddir)/Source/WebKit/gtk \
+	-I$(abs_srcdir)/Source/WebKit/gtk \
+	-I$(abs_builddir)/Source/WebKit/gtk \
 	$(global_cppflags) \
 	$(global_cflags) \
-	-I$(top_srcdir)/Source \
-	-I$(top_srcdir)/Source/_javascript_Core \
-	-I$(top_srcdir)/Source/_javascript_Core/ForwardingHeaders \
-	-I$(top_srcdir)/Source/_javascript_Core/parser \
-	-I$(top_srcdir)/Source/_javascript_Core/wtf \
-	-I$(top_builddir)/DerivedSources \
-	-I$(top_srcdir)/Source/WebCore/platform/network/soup/cache \
+	-I$(abs_srcdir)/Source \
+	-I$(abs_srcdir)/Source/_javascript_Core \
+	-I$(abs_srcdir)/Source/_javascript_Core/ForwardingHeaders \
+	-I$(abs_srcdir)/Source/_javascript_Core/parser \
+	-I$(abs_srcdir)/Source/_javascript_Core/wtf \
+	-I$(abs_builddir)/DerivedSources \
+	-I$(abs_srcdir)/Source/WebCore/platform/network/soup/cache \
 	$(GLOBALDEPS_CFLAGS) \
 	$(CAIRO_CFLAGS) \
 	$(GLIB_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(LIBSOUP_CFLAGS)
 GTKDOC_LIBS= \
-	$(top_builddir)/libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected] \
-	$(top_builddir)/libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected] \
+	$(abs_builddir)/libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected] \
+	$(abs_builddir)/libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected] \
 	$(GLIB_LIBS) \
 	$(GTK_LIBS) \
 	$(LIBSOUP_LIBS)
 
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
-include $(top_srcdir)/gtk-doc.make
+# This includes our custom gtk-doc make rules.
+include $(top_srcdir)/Source/WebKit/gtk/GNUmakefile.gtk-doc.am
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST +=
+EXTRA_DIST += \
+	$(WebKit)/docs/webkitenvironment.xml \
+	$(WebKit)/docs/webkitgtk-docs.sgml \
+	$(WebKit)/docs/webkitgtk-sections.txt \
+	$(WebKit)/docs/version.xml.in
 
 # Files not to distribute
 # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
 # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
-#DISTCLEANFILES +=
+DISTCLEANFILES += \
+	$(top_builddir)/Source/WebKit/gtk/docs/version.xml
 
 # Comment this out if you want your docs-status tested during 'make check'
 #TESTS = $(GTKDOC_CHECK)

Modified: trunk/autogen.sh (97900 => 97901)


--- trunk/autogen.sh	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/autogen.sh	2011-10-20 00:35:07 UTC (rev 97901)
@@ -12,7 +12,6 @@
 
 touch README INSTALL
 
-gtkdocize --copy > /dev/null 2>&1 || echo "Warning: not running gtk-docize."
 if test -z `which autoreconf`; then
     echo "Error: autoreconf not found, please install it."
     exit 1

Modified: trunk/configure.ac (97900 => 97901)


--- trunk/configure.ac	2011-10-20 00:30:41 UTC (rev 97900)
+++ trunk/configure.ac	2011-10-20 00:35:07 UTC (rev 97901)
@@ -1194,10 +1194,7 @@
 
 AC_CONFIG_FILES([
 Source/WebKit/gtk/webkit/webkitversion.h
-Source/WebKit/gtk/docs/GNUmakefile
-Source/WebKit/gtk/docs/version.xml
-Source/WebKit2/UIProcess/API/gtk/docs/GNUmakefile
-Source/WebKit2/UIProcess/API/gtk/docs/version.xml
+Documentation/version.xml:Source/WebKit/gtk/docs/version.xml.in
 ])
 
 AC_CONFIG_FILES([
@@ -1213,6 +1210,8 @@
 if test "$enable_webkit2" = "yes"; then
     AC_CONFIG_FILES([
     Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/webkit2gtk.pc.in
+    Source/WebKit2/UIProcess/API/gtk/docs/version.xml
+    Source/WebKit2/UIProcess/API/gtk/docs/GNUmakefile
     ]
     ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
     )
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to