]> git.ipfire.org Git - thirdparty/pdns.git/blob - docs/Makefile.am
updated KSK and ZSK Rollover procedures, small fixes in Algorithm Rollover procedure
[thirdparty/pdns.git] / docs / Makefile.am
1 MAIN_MANS = pdns_server.1 \
2 pdns_control.1 \
3 pdnsutil.1 \
4 zone2json.1 \
5 zone2sql.1
6
7 MANPAGES_INSTALL = $(MAIN_MANS)
8
9 MANPAGES_DIST = $(MAIN_MANS) zone2ldap.1
10
11 if LDAP
12 MANPAGES_INSTALL += zone2ldap.1
13 endif
14
15 MANPAGES_TARGET_TOOLS = calidns.1 \
16 dnspcap2calidns.1 \
17 dnspcap2protobuf.1 \
18 dnsgram.1 \
19 dnsreplay.1 \
20 dnsscan.1 \
21 dnsscope.1 \
22 dnswasher.1 \
23 dumresp.1 \
24 ixplore.1 \
25 nproxy.1 \
26 nsec3dig.1 \
27 pdns_notify.1 \
28 saxfr.1 \
29 sdig.1
30
31 MANPAGES_TARGET_IXFRDIST = ixfrdist.1 \
32 ixfrdist.yml.5
33
34 MANPAGES_DIST += $(MANPAGES_TARGET_TOOLS) \
35 $(MANPAGES_TARGET_IXFRDIST) \
36 dnsbulktest.1 \
37 dnstcpbench.1
38
39 if HAVE_BOOST_GE_148
40 MANPAGES_INSTALL += dnsbulktest.1 \
41 dnstcpbench.1
42 endif
43
44 if TOOLS
45 MANPAGES_INSTALL += $(MANPAGES_TARGET_TOOLS)
46 endif
47
48 if IXFRDIST
49 MANPAGES_INSTALL += $(MANPAGES_TARGET_IXFRDIST)
50 endif
51
52 man_MANS = $(MANPAGES_INSTALL)
53
54 EXTRA_DIST = $(MANPAGES_DIST)
55
56 if HAVE_VENV
57 if !HAVE_MANPAGES
58 $(MANPAGES_DIST): %: mans/.complete manpages/%.rst
59 mv "$(<D)/$@" "$@" && rm -f "$<"
60 endif # if !HAVE_MANPAGES
61
62 mans/.complete: manpages := $(addprefix manpages/,$(addsuffix .rst,$(MANPAGES_DIST)))
63 mans/.complete: .venv
64 rm -rf "$(@D).tmp"
65 .venv/bin/python -msphinx -b man . "$(@D).tmp" $(manpages) && rm -rf "$(@D)" && mv "$(@D).tmp" "$(@D)"
66 touch "$@"
67 rm -rf "$(@D).tmp"
68
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
73
74 .NOTPARALLEL: \
75 all-docs \
76 upload-docs \
77 html-docs \
78 $(MANPAGES_DIST) \
79 latex/PowerDNS-Authoritative.pdf \
80 PowerDNS-Authoritative.pdf \
81 html-docs.tar.bz2
82
83 clean-local:
84 if !HAVE_MANPAGES
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
88 endif
89 rm -rf mans
90
91 html-docs: common/** manpages/** .venv *.rst
92 .venv/bin/python -msphinx -b html . html-docs
93
94 latex/PowerDNS-Authoritative.pdf: common/** manpages/** .venv *.rst
95 .venv/bin/python -msphinx -M latexpdf . .
96
97 PowerDNS-Authoritative.pdf: latex/PowerDNS-Authoritative.pdf
98 mv $< $@
99
100 html-docs.tar.bz2: html-docs
101 tar cjf $@ $<
102
103 all-docs: PowerDNS-Authoritative.pdf html-docs html-docs.tar.bz2
104
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/
109
110 else # if HAVE_VENV
111 $(MANPAGES_DIST):
112 @echo "You need Python 3 and the 'venv' module to generate the manpages"
113 exit 1
114
115 PowerDNS-Authoritative.pdf:
116 @echo "You need Python 3 and the 'venv' module to generate the PDF"
117 exit 1
118
119 html-docs:
120 @echo "You need Python 3 and the 'venv' module to generate the HTML docs"
121 exit 1
122 endif
123
124