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