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