fix HA manager build
[pve-docs.git] / pve-doc-generator.mk
1 # also update debian/changelog
2 DOCRELEASE=4.1
3
4 DGDIR?=/usr/share/pve-doc-generator
5
6 all:
7
8 PVE_COMMON_DOC_SOURCES= \
9 attributes.txt \
10 pve-copyright.adoc \
11 docinfo.xml
12
13 PVECM_MAN1_SOURCES= \
14 pvecm.adoc \
15 pvecm.1-synopsis.adoc \
16 ${PVE_COMMON_DOC_SOURCES}
17
18 PVE_FIREWALL_MAN8_SOURCES= \
19 pve-firewall.adoc \
20 pve-firewall.8-synopsis.adoc \
21 pve-firewall-cluster-opts.adoc \
22 pve-firewall-host-opts.adoc \
23 pve-firewall-vm-opts.adoc \
24 pve-firewall-rules-opts.adoc \
25 pve-firewall-macros.adoc \
26 ${PVE_COMMON_DOC_SOURCES}
27
28 PVESM_MAN1_SOURCES= \
29 pvesm.adoc \
30 pvesm.1-synopsis.adoc \
31 pve-storage-dir.adoc \
32 pve-storage-glusterfs.adoc \
33 pve-storage-iscsi.adoc \
34 pve-storage-iscsidirect.adoc \
35 pve-storage-lvm.adoc \
36 pve-storage-nfs.adoc \
37 pve-storage-rbd.adoc \
38 pve-storage-zfspool.adoc \
39 ${PVE_COMMON_DOC_SOURCES}
40
41 VZDUMP_MAN1_SOURCES= \
42 vzdump.adoc \
43 vzdump.1-synopsis.adoc \
44 ${PVE_COMMON_DOC_SOURCES}
45
46 PVESUBSCRIPTION_MAN1_SOURCES= \
47 pvesubscription.adoc \
48 pvesubscription.1-synopsis.adoc \
49 ${PVE_COMMON_DOC_SOURCES}
50
51 PVECEPH_MAN1_SOURCES= \
52 pveceph.adoc \
53 pveceph.1-synopsis.adoc \
54 ${PVE_COMMON_DOC_SOURCES}
55
56 PCT_MAN1_SOURCES= \
57 pct.adoc \
58 pct.1-synopsis.adoc \
59 ${PVE_COMMON_DOC_SOURCES}
60
61 PCT_CONF_MAN5_SOURCES= \
62 pct.conf.adoc \
63 pct.conf.5-opts.adoc \
64 ${PVE_COMMON_DOC_SOURCES}
65
66 DATACENTER_CONF_MAN5_SOURCES= \
67 datacenter.cfg.adoc \
68 datacenter.cfg.5-opts.adoc \
69 ${PVE_COMMON_DOC_SOURCES}
70
71 QM_MAN1_SOURCES= \
72 qm.adoc \
73 qm.1-synopsis.adoc \
74 ${PVE_COMMON_DOC_SOURCES}
75
76 QM_CONF_MAN5_SOURCES= \
77 qm.conf.adoc \
78 qm.conf.5-opts.adoc \
79 ${PVE_COMMON_DOC_SOURCES}
80
81 QMRESTORE_MAN1_SOURCES= \
82 qmrestore.adoc \
83 qmrestore.1-synopsis.adoc \
84 ${PVE_COMMON_DOC_SOURCES}
85
86 PVEUM_MAN1_SOURCES= \
87 pveum.adoc \
88 pveum.1-synopsis.adoc \
89 ${PVE_COMMON_DOC_SOURCES}
90
91 PVEAM_MAN1_SOURCES= \
92 pveam.adoc \
93 pveam.1-synopsis.adoc \
94 ${PVE_COMMON_DOC_SOURCES}
95
96 HA_MANAGER_MAN1_SOURCES= \
97 ha-manager.adoc \
98 ha-manager.1-synopsis.adoc \
99 ${PVE_COMMON_DOC_SOURCES}
100
101 PVE_HA_CRM_MAN8_SOURCES= \
102 pve-ha-crm.adoc \
103 pve-ha-crm.8-synopsis.adoc \
104 ${PVE_COMMON_DOC_SOURCES}
105
106 PVE_HA_LRM_MAN8_SOURCES= \
107 pve-ha-lrm.adoc \
108 pve-ha-lrm.8-synopsis.adoc \
109 ${PVE_COMMON_DOC_SOURCES}
110
111 PVESTATD_MAN8_SOURCES= \
112 pvestatd.adoc \
113 pvestatd.8-synopsis.adoc \
114 ${PVE_COMMON_DOC_SOURCES}
115
116 PVEDAEMON_MAN8_SOURCES= \
117 pvedaemon.adoc \
118 pvedaemon.8-synopsis.adoc \
119 ${PVE_COMMON_DOC_SOURCES}
120
121 PVEPROXY_MAN8_SOURCES= \
122 pveproxy.adoc \
123 pveproxy.8-synopsis.adoc \
124 ${PVE_COMMON_DOC_SOURCES}
125
126 SPICEPROXY_MAN8_SOURCES= \
127 spiceproxy.adoc \
128 spiceproxy.8-synopsis.adoc \
129 ${PVE_COMMON_DOC_SOURCES}
130
131 PMXCFS_MAN8_SOURCES= \
132 pmxcfs.adoc \
133 pmxcfs.8-cli.adoc \
134 ${PVE_COMMON_DOC_SOURCES}
135
136 attributes.txt docinfo.xml:
137 cp ${DGDIR}/$@ $@.tmp
138 mv $@.tmp $@
139
140 %-opts.adoc: ${DGDIR}/gen-%-opts.pl
141 ${DGDIR}/gen-$*-opts.pl >$@.tmp
142 mv $@.tmp $@
143
144 %.adoc: ${DGDIR}/gen-%-adoc.pl
145 ${DGDIR}/gen-$*-adoc.pl >$@.tmp
146 mv $@.tmp $@
147
148 %.1-synopsis.adoc:
149 perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
150 mv $@.tmp $@
151
152 %.8-synopsis.adoc:
153 perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
154 mv $@.tmp $@
155
156 ifneq (${DGDIR},.)
157 %.adoc: ${DGDIR}/%.adoc
158 cp $< $@.tmp
159 mv $@.tmp $@
160 endif
161
162 A2X_MAN_COMMON_OPTIONS=-a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage
163 A2X_MAN1_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=1"
164 A2X_MAN5_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=5"
165 A2X_MAN8_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=8"
166
167 pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
168 a2x ${A2X_MAN8_OPTIONS} pve-firewall.adoc
169 test -n "$${NOVIEW}" || man -l $@
170
171 pvesm.1: ${PVESM_MAN1_SOURCES}
172 a2x ${A2X_MAN1_OPTIONS} pvesm.adoc
173 test -n "$${NOVIEW}" || man -l $@
174
175 pveceph.1: ${PVECEPH_MAN1_SOURCES}
176 a2x ${A2X_MAN1_OPTIONS} pveceph.adoc
177 test -n "$${NOVIEW}" || man -l $@
178
179 pct.1: ${PCT_MAN1_SOURCES}
180 a2x ${A2X_MAN1_OPTIONS} pct.adoc
181 test -n "$${NOVIEW}" || man -l $@
182
183 vzdump.1: ${VZDUMP_MAN1_SOURCES}
184 a2x ${A2X_MAN1_OPTIONS} vzdump.adoc
185 test -n "$${NOVIEW}" || man -l $@
186
187 pvesubscription.1: ${PVESUBSCRIPTION_MAN1_SOURCES}
188 a2x ${A2X_MAN1_OPTIONS} pvesubscription.adoc
189 test -n "$${NOVIEW}" || man -l $@
190
191 qm.1: ${QM_MAN1_SOURCES}
192 a2x ${A2X_MAN1_OPTIONS} qm.adoc
193 test -n "$${NOVIEW}" || man -l $@
194
195 qmrestore.1: ${QMRESTORE_MAN1_SOURCES}
196 a2x ${A2X_MAN1_OPTIONS} qmrestore.adoc
197 test -n "$${NOVIEW}" || man -l $@
198
199 pvecm.1: ${PVECM_MAN1_SOURCES}
200 a2x ${A2X_MAN1_OPTIONS} pvecm.adoc
201 test -n "$${NOVIEW}" || man -l $@
202
203 pveum.1: ${PVEUM_MAN1_SOURCES}
204 a2x ${A2X_MAN1_OPTIONS} pveum.adoc
205 test -n "$${NOVIEW}" || man -l $@
206
207 pveam.1: ${PVEAM_MAN1_SOURCES}
208 a2x ${A2X_MAN1_OPTIONS} pveam.adoc
209 test -n "$${NOVIEW}" || man -l $@
210
211 ha-manager.1: ${HA_MANAGER_MAN1_SOURCES}
212 a2x ${A2X_MAN1_OPTIONS} ha-manager.adoc
213 test -n "$${NOVIEW}" || man -l $@
214
215 pve-ha-crm.8: ${PVE_HA_CRM_MAN8_SOURCES}
216 a2x ${A2X_MAN8_OPTIONS} pve-ha-crm.adoc
217 test -n "$${NOVIEW}" || man -l $@
218
219 pve-ha-lrm.8: ${PVE_HA_LRM_MAN8_SOURCES}
220 a2x ${A2X_MAN8_OPTIONS} pve-ha-lrm.adoc
221 test -n "$${NOVIEW}" || man -l $@
222
223 pvestatd.8: ${PVESTATD_MAN8_SOURCES}
224 a2x ${A2X_MAN8_OPTIONS} pvestatd.adoc
225 test -n "$${NOVIEW}" || man -l $@
226
227 pvedaemon.8: ${PVEDAEMON_MAN8_SOURCES}
228 a2x ${A2X_MAN8_OPTIONS} pvedaemon.adoc
229 test -n "$${NOVIEW}" || man -l $@
230
231 pveproxy.8: ${PVEPROXY_MAN8_SOURCES}
232 a2x ${A2X_MAN8_OPTIONS} pveproxy.adoc
233 test -n "$${NOVIEW}" || man -l $@
234
235 spiceproxy.8: ${SPICEPROXY_MAN8_SOURCES}
236 a2x ${A2X_MAN8_OPTIONS} spiceproxy.adoc
237 test -n "$${NOVIEW}" || man -l $@
238
239 pmxcfs.8: ${PMXCFS_MAN8_SOURCES}
240 a2x ${A2X_MAN8_OPTIONS} pmxcfs.adoc
241 test -n "$${NOVIEW}" || man -l $@
242
243 qm.conf.5: ${QM_CONF_MAN5_SOURCES}
244
245 pct.conf.5: ${PCT_CONF_MAN5_SOURCES}
246
247 datacenter.cfg.5: ${DATACENTER_CONF_MAN5_SOURCES}
248
249 %.5: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
250 a2x ${A2X_MAN5_OPTIONS} $*.adoc
251 test -n "$${NOVIEW}" || man -l $@
252
253 .PHONY: cleanup-docgen
254 cleanup-docgen:
255 rm -f *.1 *.5 *.8 *.adoc attributes.txt docinfo.xml