1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
MAIN_MANS = pdns_server.1 \
pdns_control.1 \
pdnsutil.1 \
zone2json.1 \
zone2sql.1
MANPAGES_INSTALL = $(MAIN_MANS)
MANPAGES_DIST = $(MAIN_MANS) zone2ldap.1
if LDAP
MANPAGES_INSTALL += zone2ldap.1
endif
MANPAGES_TARGET_TOOLS = calidns.1 \
dnspcap2calidns.1 \
dnspcap2protobuf.1 \
dnsgram.1 \
dnsreplay.1 \
dnsscan.1 \
dnsscope.1 \
dnswasher.1 \
dumresp.1 \
ixplore.1 \
nproxy.1 \
nsec3dig.1 \
pdns_notify.1 \
saxfr.1 \
sdig.1
MANPAGES_TARGET_IXFRDIST = ixfrdist.1 \
ixfrdist.yml.5
MANPAGES_DIST += $(MANPAGES_TARGET_TOOLS) \
$(MANPAGES_TARGET_IXFRDIST) \
dnsbulktest.1 \
dnstcpbench.1
MANPAGES_INSTALL += dnsbulktest.1 \
dnstcpbench.1
if TOOLS
MANPAGES_INSTALL += $(MANPAGES_TARGET_TOOLS)
endif
if IXFRDIST
MANPAGES_INSTALL += $(MANPAGES_TARGET_IXFRDIST)
endif
man_MANS = $(MANPAGES_INSTALL)
EXTRA_DIST = \
$(MANPAGES_DIST) \
http-api/swagger/authoritative-api-swagger.yaml
if HAVE_VENV
if !HAVE_MANPAGES
$(MANPAGES_DIST): %: mans/.complete manpages/%.rst
mv "$(<D)/$@" "$@" && rm -f "$<"
endif # if !HAVE_MANPAGES
mans/.complete: manpages := $(addprefix manpages/,$(addsuffix .rst,$(MANPAGES_DIST)))
mans/.complete: .venv
rm -rf "$(@D).tmp"
(cd "${srcdir}" && $(CURDIR)/.venv/bin/python -msphinx -b man . "$(CURDIR)/$(@D).tmp" $(manpages)) && rm -rf "$(@D)" && mv "$(@D).tmp" "$(@D)"
touch "$@"
rm -rf "$(@D).tmp"
.venv: requirements.txt
$(PYTHON) -m venv .venv
.venv/bin/pip install -U pip setuptools
.venv/bin/pip install -r ${srcdir}/requirements.txt
.NOTPARALLEL: \
all-docs \
upload-docs \
html-docs \
$(MANPAGES_DIST) \
latex/PowerDNS-Authoritative.pdf \
PowerDNS-Authoritative.pdf \
html-docs.tar.bz2
clean-local:
if !HAVE_MANPAGES
# don't clean these files if they were present
# at 'configure' time (e.g. from a source dist)
rm -f latex/PowerDNS-Authoritative.pdf $(MANPAGES_DIST) html-docs.tar.bz2
endif
rm -rf mans
html-docs: common/** manpages/** .venv *.rst
.venv/bin/python -msphinx -b html . html-docs
latex/PowerDNS-Authoritative.pdf: common/** manpages/** .venv *.rst
.venv/bin/python -msphinx -M latexpdf . .
PowerDNS-Authoritative.pdf: latex/PowerDNS-Authoritative.pdf
mv $< $@
html-docs.tar.bz2: html-docs
tar cjf $@ $<
all-docs: PowerDNS-Authoritative.pdf html-docs html-docs.tar.bz2
upload-docs: all-docs
rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./html-docs/ web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html-docs.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./PowerDNS-Authoritative.pdf web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
else # if HAVE_VENV
$(MANPAGES_DIST):
@echo "You need Python 3 and the 'venv' module to generate the manpages"
exit 1
PowerDNS-Authoritative.pdf:
@echo "You need Python 3 and the 'venv' module to generate the PDF"
exit 1
html-docs:
@echo "You need Python 3 and the 'venv' module to generate the HTML docs"
exit 1
endif
|