From 1edc0772576dd7843ceca2e53290253d8dacb945 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 13 Jan 2011 17:11:00 +0000 Subject: Add doxygen_to_devhelp.xsl (from Fedora, via Debian) Originally committed by Matthias Clasen . Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13495 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=454142 --- doc/Makefile.am | 1 + doc/doxygen_to_devhelp.xsl | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 doc/doxygen_to_devhelp.xsl (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index bc349f87..5f81a657 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -34,6 +34,7 @@ STATIC_DOCS = \ EXTRA_DIST = \ file-boilerplate.c \ + doxygen_to_devhelp.xsl \ $(STATIC_DOCS) \ $(MAN_IN_FILES) $(man_MANS) 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + .html# + + + + + + + + -- cgit v1.2.3 From b72f6e0ca00da1dd4134e6e113ea1e656df770ed Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 13 Jan 2011 18:33:54 +0000 Subject: Use a stamp file to represent the Doxygen output This avoids thinking it's up to date if the Doxygen build fails, but writes partial output to index.html before failing. --- doc/Makefile.am | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 5f81a657..834da057 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -64,13 +64,11 @@ 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.stamp -all-local:: $(DOXYGEN_HTML_INDEX) - -$(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch]) +doxygen.stamp: $(wildcard $(top_srcdir)/dbus/*.[ch]) $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile + @touch $@ endif if DBUS_HAVE_MAN2HTML @@ -89,7 +87,7 @@ 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_at)cp $(STATIC_DOCS) $@ -- cgit v1.2.3 From 5277d3c23287e734f057176578787a6179c4bec8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 13 Jan 2011 18:34:43 +0000 Subject: docs: use $(MKDIR_P), which we already check for in configure.in mkdir -p isn't 100% portable, whereas $(MKDIR_P) can either be mkdir -p, install -d or (as a last resort) ./install-sh -d. --- doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 834da057..1a638254 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -89,7 +89,7 @@ BONUS_FILES = \ 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) $@ -- cgit v1.2.3 From fbe8c192e2a53f61fde9bfd1a92a1c5876321781 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 13 Jan 2011 18:37:53 +0000 Subject: Install the Doxygen documentation to $(htmldir) Use ./configure --docdir=/foo (or --htmldir=/foo) to control where it ends up. For instance, Debian could use: --docdir=/usr/share/doc/dbus-1-doc --htmldir='${docdir}/html' Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13495 --- doc/Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 1a638254..497ba807 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +apidir = @htmldir@/api + man_MANS = \ dbus-cleanup-sockets.1 \ dbus-daemon.1 \ @@ -69,6 +71,12 @@ all-local:: doxygen.stamp doxygen.stamp: $(wildcard $(top_srcdir)/dbus/*.[ch]) $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile @touch $@ + +# 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 -- cgit v1.2.3 From 1be098611ebeee171991e50571574a6e13388df4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 13 Jan 2011 18:38:43 +0000 Subject: Build dbus.devhelp using doxygen_to_devhelp.xsl and install it Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13495 --- doc/.gitignore | 1 + doc/Makefile.am | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'doc') 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 497ba807..28b2ddfa 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -72,6 +72,13 @@ 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 -- cgit v1.2.3