]> git.ipfire.org Git - thirdparty/pdns.git/blob - docs/Makefile.am
Merge pull request #8316 from rgacogne/dnsdist-healthcheck-tests-timing
[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 dnsgram.1 \
18 dnsreplay.1 \
19 dnsscan.1 \
20 dnsscope.1 \
21 dnswasher.1 \
22 dumresp.1 \
23 ixplore.1 \
24 nproxy.1 \
25 nsec3dig.1 \
26 pdns_notify.1 \
27 saxfr.1 \
28 sdig.1
29
30 MANPAGES_TARGET_IXFRDIST = ixfrdist.1 \
31 ixfrdist.yml.5
32
33 MANPAGES_DIST += $(MANPAGES_TARGET_TOOLS) \
34 $(MANPAGES_TARGET_IXFRDIST) \
35 dnsbulktest.1 \
36 dnstcpbench.1 \
37 dnspcap2protobuf.1
38
39 if HAVE_BOOST_GE_148
40 MANPAGES_INSTALL += dnsbulktest.1 \
41 dnstcpbench.1
42 endif
43
44 if HAVE_PROTOBUF
45 if HAVE_PROTOC
46 MANPAGES_INSTALL += dnspcap2protobuf.1
47 endif
48 endif
49
50 if TOOLS
51 MANPAGES_INSTALL += $(MANPAGES_TARGET_TOOLS)
52 endif
53
54 if IXFRDIST
55 MANPAGES_INSTALL += $(MANPAGES_TARGET_IXFRDIST)
56 endif
57
58 man_MANS = $(MANPAGES_INSTALL)
59
60 EXTRA_DIST = $(MANPAGES_DIST)
61
62 if HAVE_VIRTUALENV
63 if !HAVE_MANPAGES
64 $(MANPAGES_DIST): %: mans/.complete manpages/%.rst
65 mv "$(<D)/$@" "$@" && rm -f "$<"
66 endif # if !HAVE_MANPAGES
67
68 mans/.complete: manpages := $(addprefix manpages/,$(addsuffix .rst,$(MANPAGES_DIST)))
69 mans/.complete: .venv
70 rm -rf "$(@D).tmp"
71 .venv/bin/python -msphinx -b man . "$(@D).tmp" $(manpages) && rm -rf "$(@D)" && mv "$(@D).tmp" "$(@D)"
72 touch "$@"
73 rm -rf "$(@D).tmp"
74
75 .venv: requirements.txt
76 virtualenv .venv
77 .venv/bin/pip install -U pip setuptools setuptools-git
78 .venv/bin/pip install -r requirements.txt
79
80 .NOTPARALLEL: \
81 all-docs \
82 upload-docs \
83 html-docs \
84 $(MANPAGES_DIST) \
85 latex/PowerDNS-Authoritative.pdf \
86 PowerDNS-Authoritative.pdf \
87 html-docs.tar.bz2
88
89 clean-local:
90 rm -f latex/PowerDNS-Authoritative.pdf $(MANPAGES_DIST) html-docs.tar.bz2
91 rm -rf mans
92
93 html-docs: common/** manpages/** .venv *.rst
94 .venv/bin/python -msphinx -b html . html-docs
95
96 latex/PowerDNS-Authoritative.pdf: common/** manpages/** .venv *.rst
97 .venv/bin/python -msphinx -M latexpdf . .
98
99 PowerDNS-Authoritative.pdf: latex/PowerDNS-Authoritative.pdf
100 mv $< $@
101
102 html-docs.tar.bz2: html-docs
103 tar cjf $@ $<
104
105 all-docs: PowerDNS-Authoritative.pdf html-docs html-docs.tar.bz2
106
107 upload-docs: all-docs
108 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./html-docs/ web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
109 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html-docs.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
110 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./PowerDNS-Authoritative.pdf web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
111
112 else # if HAVE_VIRTUALENV
113 $(MANPAGES_DIST):
114 echo "You need virtualenv to generate the manpages"
115 exit 1
116
117 PowerDNS-Authoritative.pdf:
118 echo "You need virtualenv to generate the PDF"
119 exit 1
120
121 html-docs:
122 echo "You need virtualenv to generate the HTML docs"
123 exit 1
124 endif
125
126