From: Chris Boot Date: Sat, 26 Dec 2015 14:57:34 +0000 (+0000) Subject: Rebuild manpage and HTML doc when xmltoman is available X-Git-Tag: 2.7.6~12^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F188%2Fhead;p=thirdparty%2Fshairport-sync.git 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. --- diff --git a/configure.ac b/configure.ac index 75e4db9e..439f74b3 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/man/Makefile.am b/man/Makefile.am index cbaf9165..e40bfb85 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -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