diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-25 15:49:19 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-25 15:49:19 +0000 |
commit | f1ba52066cadb90edb192ea93d55ba775bdb73d7 (patch) | |
tree | 57074935fa7f9c44746d2bd9281d010b323e5c1a /doc | |
parent | c728addb610cd230d2aa0c1c857888377063a5df (diff) | |
parent | 1be098611ebeee171991e50571574a6e13388df4 (diff) | |
download | dbus-f1ba52066cadb90edb192ea93d55ba775bdb73d7.tar.gz |
Merge branch 'doxygenate' into dbus-1.4
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Conflicts:
configure.ac
doc/Makefile.am
Diffstat (limited to 'doc')
-rw-r--r-- | doc/.gitignore | 1 | ||||
-rw-r--r-- | doc/Makefile.am | 28 | ||||
-rw-r--r-- | doc/doxygen_to_devhelp.xsl | 40 |
3 files changed, 62 insertions, 7 deletions
diff --git a/doc/.gitignore b/doc/.gitignore index fd193572..c26fd2d0 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -7,6 +7,7 @@ Makefile.in *.la *.o api +dbus.devhelp dbus-specification.html dbus-test-plan.html dbus-tutorial.html diff --git a/doc/Makefile.am b/doc/Makefile.am index 7fe0dc10..adac743c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +apidir = @htmldir@/api + # automake normally assumes that man pages are generated files; # these ones aren't, so we need the dist_ prefix to say that they're # their own source code @@ -40,6 +42,7 @@ STATIC_DOCS = \ EXTRA_DIST = \ file-boilerplate.c \ + doxygen_to_devhelp.xsl \ $(STATIC_DOCS) \ $(MAN_IN_FILES) @@ -69,13 +72,24 @@ dbus-faq.html: dbus-faq.xml endif if DBUS_DOXYGEN_DOCS_ENABLED -# Use the index as a proxy for the entire doc tree. -DOXYGEN_HTML_INDEX = api/html/index.html - -all-local:: $(DOXYGEN_HTML_INDEX) +all-local:: doxygen.stamp -$(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch]) +doxygen.stamp: $(wildcard $(top_srcdir)/dbus/*.[ch]) $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile + @touch $@ + +if DBUS_HAVE_XSLTPROC +api_DATA = dbus.devhelp + +dbus.devhelp: $(srcdir)/doxygen_to_devhelp.xsl doxygen.stamp + $(XSLTPROC) -o $@ $< api/xml/index.xml +endif + +# this assumes CREATE_SUBDIRS isn't set to YES in Doxyfile +# (which it isn't currently) +install-data-local:: doxygen.stamp + $(MKDIR_P) $(DESTDIR)$(apidir) + $(INSTALL_DATA) api/html/* $(DESTDIR)$(apidir) endif if DBUS_HAVE_MAN2HTML @@ -94,9 +108,9 @@ BONUS_FILES = \ $(top_srcdir)/COPYING \ $(top_srcdir)/ChangeLog -dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) $(DOXYGEN_HTML_INDEX) +dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp $(AM_V_at)rm -rf $@ - $(AM_V_GEN)mkdir -p $@/api + $(AM_V_GEN)$(MKDIR_P) $@/api $(AM_V_at)cp $(STATIC_DOCS) $@ $(AM_V_at)cp $(HTML_FILES) $@ $(AM_V_at)cp $(MAN_HTML_FILES) $@ diff --git a/doc/doxygen_to_devhelp.xsl b/doc/doxygen_to_devhelp.xsl new file mode 100644 index 00000000..72098f9f --- /dev/null +++ b/doc/doxygen_to_devhelp.xsl @@ -0,0 +1,40 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<xsl:output method="xml" version="1.0" indent="yes"/> + +<xsl:param name="prefix"></xsl:param> + +<xsl:template match="/"> + <book title="D-Bus: A system for interprocess communication" + name="dbus" + link="dbus-tutorial.html"> + <chapters> + <sub name="Tutorial" link="{$prefix}dbus-tutorial.html"/> + <sub name="FAQ" link="{$prefix}dbus-faq.html"/> + <sub name="Specification" link="{$prefix}dbus-specification.html"/> + <sub name="API Reference" link="{$prefix}api/index.html"/> + </chapters> + + <functions> + <xsl:apply-templates select="doxygenindex/compound[@kind='group']/member[@kind='function']"/> + </functions> + </book> +</xsl:template> + +<xsl:template match="member"> + <xsl:param name="name"><xsl:value-of select="name"/></xsl:param> + <xsl:param name="refid"><xsl:value-of select="@refid"/></xsl:param> + <xsl:param name="before"><xsl:value-of select="substring-before($refid,'_1')"/></xsl:param> + <xsl:param name="after"><xsl:value-of select="substring-after($refid,'_1')"/></xsl:param> + <xsl:param name="link"><xsl:value-of select="$before"/>.html#<xsl:value-of select="$after"/></xsl:param> + <xsl:if test="starts-with($name,'dbus') or starts-with($name, 'DBus')"> + <xsl:if test="starts-with($refid,'group__') and contains($refid, '_1')"> + <function name="{$name}" link="{$prefix}api/{$link}"/> + </xsl:if> + </xsl:if> +</xsl:template> + +</xsl:stylesheet> |