]> granicus.if.org Git - pdns/commitdiff
Only build manpages if we have pandoc
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 30 Dec 2014 22:57:07 +0000 (23:57 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 30 Dec 2014 22:57:07 +0000 (23:57 +0100)
docs/Makefile.am
m4/pdns_check_pandoc.m4

index b1bd8c8b24b1fdca2b2a884bb649611bce61fd97..a48dba4de46f2fc1bd772960a13ab1b70ed01436 100644 (file)
@@ -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
index bf1b3e2bdda968b69f364ec9c7b342647368d857..12ab3f423f2b00686217772bec219fabb9efc76f 100644 (file)
@@ -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"])
 ])