From: Ruben Kerkhof Date: Tue, 30 Dec 2014 22:57:07 +0000 (+0100) Subject: Only build manpages if we have pandoc X-Git-Tag: rec-3.7.0-rc1~67^2~13^2~11^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b078ced68b5f3e44be505d19ff922cf6a8d8bec;p=pdns Only build manpages if we have pandoc --- diff --git a/docs/Makefile.am b/docs/Makefile.am index b1bd8c8b2..a48dba4de 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -11,14 +11,16 @@ MANPAGES_TARGET = dnsdist.1 \ zone2ldap.1 \ zone2sql.1 +if HAVE_PANDOC man_MANS = $(MANPAGES_TARGET) +endif EXTRA_DIST = manpages \ markdown \ $(MANPAGES_TARGET) # html -.PHONY: html +.PHONY: html manpages html: html/index.html html/index.html: process-md.sh mkdocs.yml markdown/** markdown/*/** @@ -28,11 +30,10 @@ html/index.html: process-md.sh mkdocs.yml markdown/** markdown/*/** mkdocs build --clean ./process-md.sh post -.PHONY: manpages manpages: $(MANPAGES_TARGET) $(MANPAGES_TARGET): %: manpages/%.md - pandoc -s -t man $< -o $@ + $(PANDOC) -s -t man $< -o $@ clean: rm -rf html *.8 *.1 diff --git a/m4/pdns_check_pandoc.m4 b/m4/pdns_check_pandoc.m4 index bf1b3e2bd..12ab3f423 100644 --- a/m4/pdns_check_pandoc.m4 +++ b/m4/pdns_check_pandoc.m4 @@ -1,9 +1,10 @@ AC_DEFUN([PDNS_CHECK_PANDOC], [ - AC_CHECK_PROG([PANDOC], [pandoc], [yes], [no]) + AC_CHECK_PROG([PANDOC], [pandoc], [pandoc], [no]) AS_IF([test "x$PANDOC" = "xno"], [ AS_IF([test ! -d "$srcdir/docs/html" -o ! -f "$srcdir/docs/pdns_server.1"], [AC_MSG_WARN([pandoc is missing, unable to build documentation and manpages.])] ) ]) + AM_CONDITIONAL([HAVE_PANDOC], [test "x$PANDOC" != "xno"]) ])