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