summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-09-08 22:38:22 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-05 11:46:00 +0100
commitee17175118028ad3b2c39be2fd58a21406325b91 (patch)
tree054b81b53177c6d996e1aead85d7a919849e55fc
parente8c5d7525cb8515d62a0ca791c765b2316ebff98 (diff)
Integrate building HTML-ified manpages with the build system
-rw-r--r--configure.in9
-rw-r--r--doc/.gitignore1
-rw-r--r--doc/Makefile.am16
3 files changed, 24 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 2286a0e5..6af0ca9f 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 23125734..8a38ca33 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 445d2fd6..ec370843 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)