1 MAIN_MANS = pdns_server.1 \
7 MANPAGES_INSTALL = $(MAIN_MANS)
9 MANPAGES_DIST = $(MAIN_MANS) zone2ldap.1
12 MANPAGES_INSTALL += zone2ldap.1
15 MANPAGES_TARGET_TOOLS = calidns.1 \
31 MANPAGES_TARGET_IXFRDIST = ixfrdist.1 \
34 MANPAGES_DIST += $(MANPAGES_TARGET_TOOLS) \
35 $(MANPAGES_TARGET_IXFRDIST) \
40 MANPAGES_INSTALL += dnsbulktest.1 \
45 MANPAGES_INSTALL += $(MANPAGES_TARGET_TOOLS)
49 MANPAGES_INSTALL += $(MANPAGES_TARGET_IXFRDIST)
52 man_MANS = $(MANPAGES_INSTALL)
54 EXTRA_DIST = $(MANPAGES_DIST)
58 $(MANPAGES_DIST): %: mans/.complete manpages/%.rst
59 mv "$(<D)/$@" "$@" && rm -f "$<"
60 endif # if !HAVE_MANPAGES
62 mans/.complete: manpages := $(addprefix manpages/,$(addsuffix .rst,$(MANPAGES_DIST)))
65 .venv/bin/python -msphinx -b man . "$(@D).tmp" $(manpages) && rm -rf "$(@D)" && mv "$(@D).tmp" "$(@D)"
69 .venv: requirements.txt
70 $(PYTHON) -m venv .venv
71 .venv/bin/pip install -U pip setuptools setuptools-git wheel
72 .venv/bin/pip install -r requirements.txt
79 latex/PowerDNS-Authoritative.pdf \
80 PowerDNS-Authoritative.pdf \
85 # don't clean these files if they were present
86 # at 'configure' time (e.g. from a source dist)
87 rm -f latex/PowerDNS-Authoritative.pdf $(MANPAGES_DIST) html-docs.tar.bz2
91 html-docs: common/** manpages/** .venv *.rst
92 .venv/bin/python -msphinx -b html . html-docs
94 latex/PowerDNS-Authoritative.pdf: common/** manpages/** .venv *.rst
95 .venv/bin/python -msphinx -M latexpdf . .
97 PowerDNS-Authoritative.pdf: latex/PowerDNS-Authoritative.pdf
100 html-docs.tar.bz2: html-docs
103 all-docs: PowerDNS-Authoritative.pdf html-docs html-docs.tar.bz2
105 upload-docs: all-docs
106 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./html-docs/ web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
107 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html-docs.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
108 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./PowerDNS-Authoritative.pdf web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
112 @echo "You need Python 3 and the 'venv' module to generate the manpages"
115 PowerDNS-Authoritative.pdf:
116 @echo "You need Python 3 and the 'venv' module to generate the PDF"
120 @echo "You need Python 3 and the 'venv' module to generate the HTML docs"