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