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-lvmthin.adoc \
37 pve-storage-nfs.adoc \
38 pve-storage-rbd.adoc \
39 pve-storage-zfspool.adoc \
40 ${PVE_COMMON_DOC_SOURCES}
42 VZDUMP_MAN1_SOURCES
= \
44 vzdump
.1-synopsis.adoc \
45 vzdump.conf
.5-opts.adoc \
46 ${PVE_COMMON_DOC_SOURCES}
48 PVESUBSCRIPTION_MAN1_SOURCES
= \
49 pvesubscription.adoc \
50 pvesubscription
.1-synopsis.adoc \
51 ${PVE_COMMON_DOC_SOURCES}
53 PVECEPH_MAN1_SOURCES
= \
55 pveceph
.1-synopsis.adoc \
56 ${PVE_COMMON_DOC_SOURCES}
61 pct.conf
.5-opts.adoc \
62 pct-network-opts.adoc \
63 pct-mountpoint-opts.adoc \
64 ${PVE_COMMON_DOC_SOURCES}
66 PCT_CONF_MAN5_SOURCES
= \
68 pct.conf
.5-opts.adoc \
69 ${PVE_COMMON_DOC_SOURCES}
71 DATACENTER_CONF_MAN5_SOURCES
= \
73 datacenter.cfg
.5-opts.adoc \
74 ${PVE_COMMON_DOC_SOURCES}
80 ${PVE_COMMON_DOC_SOURCES}
82 QM_CONF_MAN5_SOURCES
= \
85 ${PVE_COMMON_DOC_SOURCES}
87 QMRESTORE_MAN1_SOURCES
= \
89 qmrestore
.1-synopsis.adoc \
90 ${PVE_COMMON_DOC_SOURCES}
94 pveum
.1-synopsis.adoc \
95 ${PVE_COMMON_DOC_SOURCES}
99 pveam
.1-synopsis.adoc \
100 ${PVE_COMMON_DOC_SOURCES}
102 HA_MANAGER_MAN1_SOURCES
= \
104 ha-manager
.1-synopsis.adoc \
105 ${PVE_COMMON_DOC_SOURCES}
107 PVE_HA_CRM_MAN8_SOURCES
= \
109 pve-ha-crm
.8-synopsis.adoc \
110 ${PVE_COMMON_DOC_SOURCES}
112 PVE_HA_LRM_MAN8_SOURCES
= \
114 pve-ha-lrm
.8-synopsis.adoc \
115 ${PVE_COMMON_DOC_SOURCES}
117 PVESTATD_MAN8_SOURCES
= \
119 pvestatd
.8-synopsis.adoc \
120 ${PVE_COMMON_DOC_SOURCES}
122 PVEDAEMON_MAN8_SOURCES
= \
124 pvedaemon
.8-synopsis.adoc \
125 ${PVE_COMMON_DOC_SOURCES}
127 PVEPROXY_MAN8_SOURCES
= \
129 pveproxy
.8-synopsis.adoc \
130 ${PVE_COMMON_DOC_SOURCES}
132 SPICEPROXY_MAN8_SOURCES
= \
134 spiceproxy
.8-synopsis.adoc \
135 ${PVE_COMMON_DOC_SOURCES}
137 PMXCFS_MAN8_SOURCES
= \
140 ${PVE_COMMON_DOC_SOURCES}
142 PVEPERF_MAN1_SOURCES
= \
144 pveperf
.1-synopsis.adoc \
145 ${PVE_COMMON_DOC_SOURCES}
147 attributes.txt docinfo.xml
:
148 cp
${DGDIR}/$@
$@.tmp
151 %-opts.adoc
: ${DGDIR}/gen-
%-opts.pl
152 ${DGDIR}/gen-
$*-opts.pl
>$@.tmp
155 %.adoc
: ${DGDIR}/gen-
%-adoc.pl
156 ${DGDIR}/gen-
$*-adoc.pl
>$@.tmp
159 pveperf
.1-synopsis.adoc
:
160 echo
'*pveperf* `[PATH]`' > pveperf
.1-synopsis.adoc
163 perl
-I.
-e
"use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsis();" > $@.tmp
167 perl
-I.
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsis();" > $@.tmp
171 %.adoc
: ${DGDIR}/%.adoc
176 # asciidoc /etc/asciidoc/docbook-xsl/manpage.xsl skip REFERENCES section
177 # like footnotes, so we cannot use a2x. We use xmlto instead.
178 #A2MAN_COMMON=a2x -v -k -a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage
179 #A2MAN1=${A2MAN_COMMON} -a "manvolnum=1"
180 #A2MAN5=${A2MAN_COMMON} -a "manvolnum=5"
181 #A2MAN8=${A2MAN_COMMON} -a "manvolnum=8"
183 A2MAN_COMMON
=asciidoc
-dmanpage
-bdocbook
-a docinfo1
186 ${A2MAN_COMMON} -a
"manvolnum=1" -o
$1.tmp.xml
$1.adoc
187 xmlto
-v man
$1.tmp.xml
192 ${A2MAN_COMMON} -a
"manvolnum=5" -o
$1.tmp.xml
$1.adoc
193 xmlto
-v man
$1.tmp.xml
198 ${A2MAN_COMMON} -a
"manvolnum=8" -o
$1.tmp.xml
$1.adoc
199 xmlto
-v man
$1.tmp.xml
203 pve-firewall
.8: ${PVE_FIREWALL_MAN8_SOURCES}
204 $(call A2MAN8
,pve-firewall
)
205 test -n
"$${NOVIEW}" || man
-l
$@
207 pvesm
.1: ${PVESM_MAN1_SOURCES}
209 test -n
"$${NOVIEW}" || man
-l
$@
211 pveceph
.1: ${PVECEPH_MAN1_SOURCES}
212 $(call A2MAN1
,pveceph
)
213 test -n
"$${NOVIEW}" || man
-l
$@
215 pct
.1: ${PCT_MAN1_SOURCES}
217 test -n
"$${NOVIEW}" || man
-l
$@
219 vzdump
.1: ${VZDUMP_MAN1_SOURCES}
220 $(call A2MAN1
,vzdump
)
221 test -n
"$${NOVIEW}" || man
-l
$@
223 pvesubscription
.1: ${PVESUBSCRIPTION_MAN1_SOURCES}
224 $(call A2MAN1
,pvesubscription
)
225 test -n
"$${NOVIEW}" || man
-l
$@
227 qm
.1: ${QM_MAN1_SOURCES}
229 test -n
"$${NOVIEW}" || man
-l
$@
231 qmrestore
.1: ${QMRESTORE_MAN1_SOURCES}
232 $(call A2MAN1
,qmrestore
)
233 test -n
"$${NOVIEW}" || man
-l
$@
235 pvecm
.1: ${PVECM_MAN1_SOURCES}
237 test -n
"$${NOVIEW}" || man
-l
$@
239 pveum
.1: ${PVEUM_MAN1_SOURCES}
241 test -n
"$${NOVIEW}" || man
-l
$@
243 pveam
.1: ${PVEAM_MAN1_SOURCES}
245 test -n
"$${NOVIEW}" || man
-l
$@
247 ha-manager
.1: ${HA_MANAGER_MAN1_SOURCES}
248 $(call A2MAN1
,ha-manager
)
249 test -n
"$${NOVIEW}" || man
-l
$@
251 pve-ha-crm
.8: ${PVE_HA_CRM_MAN8_SOURCES}
252 $(call A2MAN8
,pve-ha-crm
)
253 test -n
"$${NOVIEW}" || man
-l
$@
255 pve-ha-lrm
.8: ${PVE_HA_LRM_MAN8_SOURCES}
256 $(call A2MAN8
,pve-ha-lrm
)
257 test -n
"$${NOVIEW}" || man
-l
$@
259 pvestatd
.8: ${PVESTATD_MAN8_SOURCES}
260 $(call A2MAN8
,pvestatd
)
261 test -n
"$${NOVIEW}" || man
-l
$@
263 pvedaemon
.8: ${PVEDAEMON_MAN8_SOURCES}
264 $(call A2MAN8
,pvedaemon
)
265 test -n
"$${NOVIEW}" || man
-l
$@
267 pveproxy
.8: ${PVEPROXY_MAN8_SOURCES}
268 $(call A2MAN8
,pveproxy
)
269 test -n
"$${NOVIEW}" || man
-l
$@
271 spiceproxy
.8: ${SPICEPROXY_MAN8_SOURCES}
272 $(call A2MAN8
,spiceproxy
)
273 test -n
"$${NOVIEW}" || man
-l
$@
275 pmxcfs
.8: ${PMXCFS_MAN8_SOURCES}
276 $(call A2MAN8
,pmxcfs
)
277 test -n
"$${NOVIEW}" || man
-l
$@
279 qm.conf
.5: ${QM_CONF_MAN5_SOURCES}
281 pct.conf
.5: ${PCT_CONF_MAN5_SOURCES}
283 datacenter.cfg
.5: ${DATACENTER_CONF_MAN5_SOURCES}
285 %.5: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
287 test -n
"$${NOVIEW}" || man
-l
$@
289 .PHONY
: cleanup-docgen
291 rm -f
*.tmp.xml
*.1 *.5 *.8 *.adoc attributes.txt docinfo.xml