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