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