Commit f1ba5206 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'doxygenate' into dbus-1.4



Reviewed-by: default avatarWill Thompson <will.thompson@collabora.co.uk>
Conflicts:
	configure.ac
	doc/Makefile.am
parents c728addb 1be09861
......@@ -133,7 +133,7 @@ MAN_LINKS = YES
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
GENERATE_XML = YES
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
......
......@@ -1351,6 +1351,10 @@ fi
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT($enable_doxygen_docs)
XSLTPROC=false
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
AM_CONDITIONAL(DBUS_HAVE_XSLTPROC, test "$XSLTPROC" != false)
### XML Documentation
AC_PATH_PROG(XMLTO, xmlto, no)
......
......@@ -7,6 +7,7 @@ Makefile.in
*.la
*.o
api
dbus.devhelp
dbus-specification.html
dbus-test-plan.html
dbus-tutorial.html
......
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) $@
......
<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>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment