--- /dev/null
+# -*- 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@.@WEBKITGTK_API_MINOR_VERSION@.la
+ -@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
# 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/JavaScriptCore \
- -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
- -I$(top_srcdir)/Source/JavaScriptCore/parser \
- -I$(top_srcdir)/Source/JavaScriptCore/wtf \
- -I$(top_builddir)/DerivedSources \
- -I$(top_srcdir)/Source/WebCore/platform/network/soup/cache \
+ -I$(abs_srcdir)/Source \
+ -I$(abs_srcdir)/Source/JavaScriptCore \
+ -I$(abs_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
+ -I$(abs_srcdir)/Source/JavaScriptCore/parser \
+ -I$(abs_srcdir)/Source/JavaScriptCore/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@.@WEBKITGTK_API_MINOR_VERSION@.la \
- $(top_builddir)/libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ $(abs_builddir)/libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ $(abs_builddir)/libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
$(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)