]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Rebuild manpage and HTML doc when xmltoman is available 188/head
authorChris Boot <bootc@bootc.net>
Sat, 26 Dec 2015 14:57:34 +0000 (14:57 +0000)
committerChris Boot <bootc@bootc.net>
Sat, 26 Dec 2015 14:57:34 +0000 (14:57 +0000)
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.

configure.ac
man/Makefile.am

index 75e4db9e079fa6ed9468f200134d80d93615e2b4..439f74b3fb56c185c3cff7047a781346834b6d02 100644 (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])
index cbaf9165a9ef3ea74d4f89cb4702f2a8996784ed..e40bfb856ed10b07137eb7aa1a7835ce8cde25cc 100644 (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