From ee17175118028ad3b2c39be2fd58a21406325b91 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 8 Sep 2010 22:38:22 +0100 Subject: [PATCH] Integrate building HTML-ified manpages with the build system --- configure.in | 9 +++++++-- doc/.gitignore | 1 + doc/Makefile.am | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 2286a0e..6af0ca9 100644 --- a/configure.in +++ b/configure.in @@ -1344,6 +1344,10 @@ fi AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes) AC_MSG_RESULT($enable_xml_docs) +AC_PATH_PROG([MAN2HTML], [man2html]) +AC_ARG_VAR([MAN2HTML], [Path to man2html (optional)]) +AM_CONDITIONAL(DBUS_HAVE_MAN2HTML, test x$MAN2HTML != x) + #### Have to go $localstatedir->$prefix/var->/usr/local/var #### find the actual value for $prefix that we'll end up with @@ -1630,8 +1634,9 @@ echo " 64-bit int: ${DBUS_INT64_TYPE} 32-bit int: ${DBUS_INT32_TYPE} 16-bit int: ${DBUS_INT16_TYPE} - Doxygen: ${DOXYGEN} - xmlto: ${XMLTO}" + Doxygen: ${DOXYGEN:-not found} + xmlto: ${XMLTO:-not found} + man2html: ${MAN2HTML:-not found}" echo " Maintainer mode: ${USE_MAINTAINER_MODE} diff --git a/doc/.gitignore b/doc/.gitignore index 2312573..8a38ca3 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -2,6 +2,7 @@ .libs Makefile Makefile.in +*.1.html *.lo *.la *.o diff --git a/doc/Makefile.am b/doc/Makefile.am index 445d2fd..ec37084 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -8,6 +8,14 @@ man_MANS = \ MAN_IN_FILES = dbus-daemon.1.in +MAN_HTML_FILES = \ + dbus-cleanup-sockets.1.html \ + dbus-daemon.1.html \ + dbus-launch.1.html \ + dbus-monitor.1.html \ + dbus-send.1.html \ + dbus-uuidgen.1.html + EXTRA_DIST= \ busconfig.dtd \ diagram.png \ @@ -58,8 +66,16 @@ $(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch]) $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile endif +if DBUS_HAVE_MAN2HTML +all-local:: $(MAN_HTML_FILES) + +%.1.html: %.1 + $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ ) +endif + clean-local: rm -rf api + rm -f *.1.html maintainer-clean-local: rm -f $(HTML_FILES) -- 1.7.1