1 # also update debian/changelog
4 DGDIR?
=/usr
/share
/pve-doc-generator
8 PVE_COMMON_DOC_SOURCES
= \
15 pvecm
.1-synopsis.adoc \
16 ${PVE_COMMON_DOC_SOURCES}
18 PVE_FIREWALL_MAN8_SOURCES
= \
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}
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}
41 VZDUMP_MAN1_SOURCES
= \
43 vzdump
.1-synopsis.adoc \
44 vzdump.conf
.5-opts.adoc \
45 ${PVE_COMMON_DOC_SOURCES}
47 PVESUBSCRIPTION_MAN1_SOURCES
= \
48 pvesubscription.adoc \
49 pvesubscription
.1-synopsis.adoc \
50 ${PVE_COMMON_DOC_SOURCES}
52 PVECEPH_MAN1_SOURCES
= \
54 pveceph
.1-synopsis.adoc \
55 ${PVE_COMMON_DOC_SOURCES}
60 pct.conf
.5-opts.adoc \
61 pct-network-opts.adoc \
62 pct-mountpoint-opts.adoc \
63 ${PVE_COMMON_DOC_SOURCES}
65 PCT_CONF_MAN5_SOURCES
= \
67 pct.conf
.5-opts.adoc \
68 ${PVE_COMMON_DOC_SOURCES}
70 DATACENTER_CONF_MAN5_SOURCES
= \
72 datacenter.cfg
.5-opts.adoc \
73 ${PVE_COMMON_DOC_SOURCES}
79 ${PVE_COMMON_DOC_SOURCES}
81 QM_CONF_MAN5_SOURCES
= \
84 ${PVE_COMMON_DOC_SOURCES}
86 QMRESTORE_MAN1_SOURCES
= \
88 qmrestore
.1-synopsis.adoc \
89 ${PVE_COMMON_DOC_SOURCES}
93 pveum
.1-synopsis.adoc \
94 ${PVE_COMMON_DOC_SOURCES}
98 pveam
.1-synopsis.adoc \
99 ${PVE_COMMON_DOC_SOURCES}
101 HA_MANAGER_MAN1_SOURCES
= \
103 ha-manager
.1-synopsis.adoc \
104 ${PVE_COMMON_DOC_SOURCES}
106 PVE_HA_CRM_MAN8_SOURCES
= \
108 pve-ha-crm
.8-synopsis.adoc \
109 ${PVE_COMMON_DOC_SOURCES}
111 PVE_HA_LRM_MAN8_SOURCES
= \
113 pve-ha-lrm
.8-synopsis.adoc \
114 ${PVE_COMMON_DOC_SOURCES}
116 PVESTATD_MAN8_SOURCES
= \
118 pvestatd
.8-synopsis.adoc \
119 ${PVE_COMMON_DOC_SOURCES}
121 PVEDAEMON_MAN8_SOURCES
= \
123 pvedaemon
.8-synopsis.adoc \
124 ${PVE_COMMON_DOC_SOURCES}
126 PVEPROXY_MAN8_SOURCES
= \
128 pveproxy
.8-synopsis.adoc \
129 ${PVE_COMMON_DOC_SOURCES}
131 SPICEPROXY_MAN8_SOURCES
= \
133 spiceproxy
.8-synopsis.adoc \
134 ${PVE_COMMON_DOC_SOURCES}
136 PMXCFS_MAN8_SOURCES
= \
139 ${PVE_COMMON_DOC_SOURCES}
141 attributes.txt docinfo.xml
:
142 cp
${DGDIR}/$@
$@.tmp
145 %-opts.adoc
: ${DGDIR}/gen-
%-opts.pl
146 ${DGDIR}/gen-
$*-opts.pl
>$@.tmp
149 %.adoc
: ${DGDIR}/gen-
%-adoc.pl
150 ${DGDIR}/gen-
$*-adoc.pl
>$@.tmp
154 perl
-I.
-e
"use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
158 perl
-I.
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
162 %.adoc
: ${DGDIR}/%.adoc
167 # asciidoc /etc/asciidoc/docbook-xsl/manpage.xsl skip REFERENCES section
168 # like footnotes, so we cannot use a2x. We use xmlto instead.
169 #A2MAN_COMMON=a2x -v -k -a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage
170 #A2MAN1=${A2MAN_COMMON} -a "manvolnum=1"
171 #A2MAN5=${A2MAN_COMMON} -a "manvolnum=5"
172 #A2MAN8=${A2MAN_COMMON} -a "manvolnum=8"
174 A2MAN_COMMON
=asciidoc
-dmanpage
-bdocbook
-a docinfo1
177 ${A2MAN_COMMON} -a
"manvolnum=1" -o
$1.tmp.xml
$1.adoc
178 xmlto
-v man
$1.tmp.xml
183 ${A2MAN_COMMON} -a
"manvolnum=5" -o
$1.tmp.xml
$1.adoc
184 xmlto
-v man
$1.tmp.xml
189 ${A2MAN_COMMON} -a
"manvolnum=8" -o
$1.tmp.xml
$1.adoc
190 xmlto
-v man
$1.tmp.xml
194 pve-firewall
.8: ${PVE_FIREWALL_MAN8_SOURCES}
195 $(call A2MAN8
,pve-firewall
)
196 test -n
"$${NOVIEW}" || man
-l
$@
198 pvesm
.1: ${PVESM_MAN1_SOURCES}
200 test -n
"$${NOVIEW}" || man
-l
$@
202 pveceph
.1: ${PVECEPH_MAN1_SOURCES}
203 $(call A2MAN1
,pveceph
)
204 test -n
"$${NOVIEW}" || man
-l
$@
206 pct
.1: ${PCT_MAN1_SOURCES}
208 test -n
"$${NOVIEW}" || man
-l
$@
210 vzdump
.1: ${VZDUMP_MAN1_SOURCES}
211 $(call A2MAN1
,vzdump
)
212 test -n
"$${NOVIEW}" || man
-l
$@
214 pvesubscription
.1: ${PVESUBSCRIPTION_MAN1_SOURCES}
215 $(call A2MAN1
,pvesubscription
)
216 test -n
"$${NOVIEW}" || man
-l
$@
218 qm
.1: ${QM_MAN1_SOURCES}
220 test -n
"$${NOVIEW}" || man
-l
$@
222 qmrestore
.1: ${QMRESTORE_MAN1_SOURCES}
223 $(call A2MAN1
,qmrestore
)
224 test -n
"$${NOVIEW}" || man
-l
$@
226 pvecm
.1: ${PVECM_MAN1_SOURCES}
228 test -n
"$${NOVIEW}" || man
-l
$@
230 pveum
.1: ${PVEUM_MAN1_SOURCES}
232 test -n
"$${NOVIEW}" || man
-l
$@
234 pveam
.1: ${PVEAM_MAN1_SOURCES}
236 test -n
"$${NOVIEW}" || man
-l
$@
238 ha-manager
.1: ${HA_MANAGER_MAN1_SOURCES}
239 $(call A2MAN1
,ha-manager
)
240 test -n
"$${NOVIEW}" || man
-l
$@
242 pve-ha-crm
.8: ${PVE_HA_CRM_MAN8_SOURCES}
243 $(call A2MAN8
,pve-ha-crm
)
244 test -n
"$${NOVIEW}" || man
-l
$@
246 pve-ha-lrm
.8: ${PVE_HA_LRM_MAN8_SOURCES}
247 $(call A2MAN8
,pve-ha-lrm
)
248 test -n
"$${NOVIEW}" || man
-l
$@
250 pvestatd
.8: ${PVESTATD_MAN8_SOURCES}
251 $(call A2MAN8
,pvestatd
)
252 test -n
"$${NOVIEW}" || man
-l
$@
254 pvedaemon
.8: ${PVEDAEMON_MAN8_SOURCES}
255 $(call A2MAN8
,pvedaemon
)
256 test -n
"$${NOVIEW}" || man
-l
$@
258 pveproxy
.8: ${PVEPROXY_MAN8_SOURCES}
259 $(call A2MAN8
,pveproxy
)
260 test -n
"$${NOVIEW}" || man
-l
$@
262 spiceproxy
.8: ${SPICEPROXY_MAN8_SOURCES}
263 $(call A2MAN8
,spiceproxy
)
264 test -n
"$${NOVIEW}" || man
-l
$@
266 pmxcfs
.8: ${PMXCFS_MAN8_SOURCES}
267 $(call A2MAN8
,pmxcfs
)
268 test -n
"$${NOVIEW}" || man
-l
$@
270 qm.conf
.5: ${QM_CONF_MAN5_SOURCES}
272 pct.conf
.5: ${PCT_CONF_MAN5_SOURCES}
274 datacenter.cfg
.5: ${DATACENTER_CONF_MAN5_SOURCES}
276 %.5: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
278 test -n
"$${NOVIEW}" || man
-l
$@
280 .PHONY
: cleanup-docgen
282 rm -f
*.tmp.xml
*.1 *.5 *.8 *.adoc attributes.txt docinfo.xml