]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Revamp the manpage building 4790/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 19 Dec 2016 15:55:12 +0000 (16:55 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 19 Dec 2016 16:05:15 +0000 (17:05 +0100)
* Always dist the relevant manpages
* Don't build tools manpages is configured with `--disable-tools`
  (Closes #4643)
* Don't remove manpages if they cannot be rebuilt (Closes #3306)

docs/Makefile.am

index 4fa8256a751de9fbc1e2be14333a34cdb2b5b928..24d4e150e53783cc1642a6d2a9c781b871738c0f 100644 (file)
@@ -24,38 +24,41 @@ MANPAGES_TARGET_TOOLS += dnsbulktest.1 \
        dnstcpbench.1
 endif
 
-
 if HAVE_PROTOBUF
 if HAVE_PROTOC
 MANPAGES_TARGET_TOOLS += dnspcap2protobuf.1
 endif
 endif
 
-MANPAGES_TARGET_DNSDIST = dnsdist.1
-
-MANPAGES_TARGET_RECURSOR = pdns_recursor.1 \
-       rec_control.1
+EXTRA_DIST = manpages markdown/*.md markdown/appendix markdown/authoritative markdown/common markdown/httpapi markdown/recursor markdown/security markdown/tools $(MANPAGES_TARGET_AUTH) $(MANPAGES_TARGET_TOOLS)
 
-MANPAGES_TARGET_ALL=$(MANPAGES_TARGET_AUTH) \
-               $(MANPAGES_TARGET_RECURSOR) \
-               $(MANPAGES_TARGET_TOOLS) \
-               $(MANPAGES_TARGET_DNSDIST)
+# Figure out the manpages to build/install
+MANPAGES_TARGET_ALL=$(MANPAGES_TARGET_AUTH)
+man_MANS = $(MANPAGES_TARGET_AUTH)
 
-# The manpages to distribute and install are only those for the
-# auth server and tools. For the recursor and dnsdist tarballs,
-# the respective dist- scripts will take care of this
-if HAVE_PANDOC
-dist_man_MANS = $(MANPAGES_TARGET_AUTH) $(MANPAGES_TARGET_TOOLS)
-endif
-if HAVE_MANPAGES
-dist_man_MANS = $(MANPAGES_TARGET_AUTH) $(MANPAGES_TARGET_TOOLS)
+if TOOLS
+MANPAGES_TARGET_ALL += $(MANPAGES_TARGET_TOOLS)
+man_MANS += $(MANPAGES_TARGET_TOOLS)
 endif
 
-EXTRA_DIST = manpages markdown/*.md markdown/appendix markdown/authoritative markdown/common markdown/httpapi markdown/recursor markdown/security markdown/tools
+all-manpages: $(MANPAGES_TARGET_ALL)
 
+# If we can't rebuild the manpages, don't allow creation or deletion
+if HAVE_PANDOC
+$(MANPAGES_TARGET_ALL): %: manpages/%.md
+       $(PANDOC) -s -t man $< -o $@
 
-.PHONY: html all-manpages
+clean:
+       rm -rf html html.tar.bz2 *.8 *.1
+else
+if !HAVE_MANPAGES
+$(MANPAGES_TARGET_ALL):
+       echo "You need pandoc to generate the manpages"
+       exit 1
+endif
+endif
 
+# HTML documentation
 html: html/index.html
 
 if FROM_GIT
@@ -82,16 +85,4 @@ html/index.html:
        @echo "supported from a git checkout"
 endif
 
-all-manpages: $(MANPAGES_TARGET_ALL)
-
-if HAVE_PANDOC
-$(MANPAGES_TARGET_ALL): %: manpages/%.md
-       $(PANDOC) -s -t man $< -o $@
-else
-$(MANPAGES_TARGET_ALL):
-       echo "You need pandoc to generate the manpages"
-       exit 1
-endif
-
-clean:
-       rm -rf html html.tar.bz2 *.8 *.1
+.PHONY: html all-manpages