From 39b2d9248153bceaaea32c6d3b14f8141ad5e55d Mon Sep 17 00:00:00 2001 From: Marc-Andre Lureau Date: Sun, 30 Mar 2008 19:04:55 +0300 Subject: [PATCH] Add devhelp support --- Doxyfile.in | 2 +- doc/Makefile.am | 82 +++++++++++++++++++++++++++++++++++++++---- doc/doxygen_to_devhelp.xsl | 48 +++++++++++++++++++++++++ 3 files changed, 123 insertions(+), 9 deletions(-) create mode 100644 doc/doxygen_to_devhelp.xsl diff --git a/Doxyfile.in b/Doxyfile.in index 80ee0d0..afac639 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -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 #--------------------------------------------------------------------------- diff --git a/doc/Makefile.am b/doc/Makefile.am index e1c8e4d..ad5ac83 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +all-local: $(HTML_FILES) $(HTML_INDEX) $(devhelp_file) + EXTRA_DIST= \ busconfig.dtd \ introspect.dtd \ @@ -7,19 +9,16 @@ EXTRA_DIST= \ dbus-tutorial.xml \ dcop-howto.txt \ file-boilerplate.c \ - introspect.xsl + introspect.xsl \ + doxygen_to_devhelp.xsl +if DBUS_XML_DOCS_ENABLED HTML_FILES= \ dbus-faq.html \ dbus-specification.html \ dbus-test-plan.html \ dbus-tutorial.html -if DBUS_XML_DOCS_ENABLED -all-local: $(HTML_FILES) - -EXTRA_DIST += $(HTML_FILES) system-activation.txt - dbus-specification.html: dbus-specification.xml $(XMLTO) html-nochunks $< @@ -32,7 +31,74 @@ dbus-tutorial.html: dbus-tutorial.xml dbus-faq.html: dbus-faq.xml $(XMLTO) html-nochunks $< +install-doc: $(HTML_FILES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(docdir) + $(INSTALL_DATA) $(HTML_FILES) $(DESTDIR)$(docdir)/$$f + +uninstall-doc: + @$(NORMAL_UNINSTALL) + -(cd $(DESTDIR)$(docdir)/ && rm -f $(HTML_FILES)) endif -maintainer-clean-local: - rm -f $(HTML_FILES) +if DBUS_DOXYGEN_DOCS_ENABLED + +doxygen_configfile = Doxyfile +doxygen_configfile_source = $(top_srcdir)/Doxyfile.in + +devhelp_file = ${PACKAGE_TARNAME}.devhelp +devhelp_stylesheet = $(srcdir)/doxygen_to_devhelp.xsl + +referencedir = $(docdir)/reference/html +devhelpdir = $(datadir)/devhelp/books/${PACKAGE_TARNAME} + +HTML_INDEX=api/html/index.html +XML_INDEX=api/xml/index.xml + +# Build a DevHelp reference from the doxygen xml +$(devhelp_file): $(XML_INDEX) $(devhelp_stylesheet) + xsltproc --stringparam book_title "${PACKAGE_NAME} Reference Manual" \ + --stringparam book_name "${PACKAGE_NAME}" \ + --stringparam reference_prefix "../../../doc/${PACKAGE_NAME}/reference/html" \ + --stringparam docdir "../../../doc/${PACKAGE_NAME}" \ + -o $@ $(devhelp_stylesheet) $(XML_INDEX) + +$(HTML_INDEX) $(XML_INDEX): $(doxygen_configfile_source) $(beautify_docs_source) $(top_srcdir)/dbus/*.h + -rm -rf api + (cd .. && $(DOXYGEN) $(doxygen_configfile)) + touch $@ + +install-reference: $(HTML_INDEX) $(devhelp_file) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(referencedir) + @dir='$( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .html# + + + + + + + + + + -- 1.5.5.rc0.1.gb9db