Rebuild manpage and HTML doc when xmltoman is available

Adjust configure.ac to detect if xmltoman is available; use that in
man/Makefile.am to rebuild the manpage and HTML file (generated from the
same source) if necessary.
This commit is contained in:
Chris Boot
2015-12-26 14:57:34 +00:00
parent d0d7b8b228
commit 6f8ee38d33
2 changed files with 17 additions and 0 deletions
+7
View File
@@ -229,6 +229,13 @@ AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
# Look for xmltoman
AC_CHECK_PROGS([XMLTOMAN], [xmltoman])
if test -z "$XMLTOMAN"; then
AC_MSG_WARN([>>xmltoman not found - not rebuilding man pages])
fi
AM_CONDITIONAL([HAVE_XMLTOMAN], [test -n "$XMLTOMAN"])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([getopt_long.h])
+10
View File
@@ -1 +1,11 @@
man_MANS = shairport-sync.7
if HAVE_XMLTOMAN
all-local: shairport-sync.html
shairport-sync.7: shairport-sync.7.xml
xmltoman $< > $@
shairport-sync.html: shairport-sync.7.xml
xmlmantohtml $< > $@
endif