export pct.1 pct.conf.5 vm.conf.5 and datacenter.conf.5
[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
9344ee0d
DM
13PVE_FIREWALL_MAN8_SOURCES= \
14 pve-firewall.adoc \
15 pve-firewall.8-synopsis.adoc \
16 pve-firewall-cluster-opts.adoc \
17 pve-firewall-host-opts.adoc \
18 pve-firewall-vm-opts.adoc \
19 pve-firewall-rules-opts.adoc \
20 pve-firewall-macros.adoc \
828a27f5
DM
21 ${PVE_COMMON_DOC_SOURCES}
22
23PVESM_MAN1_SOURCES= \
24 pvesm.adoc \
25 pvesm.1-synopsis.adoc \
26 pve-storage-dir.adoc \
27 pve-storage-glusterfs.adoc \
28 pve-storage-iscsi.adoc \
29 pve-storage-iscsidirect.adoc \
30 pve-storage-lvm.adoc \
31 pve-storage-nfs.adoc \
32 pve-storage-rbd.adoc \
33 pve-storage-zfspool.adoc \
34 ${PVE_COMMON_DOC_SOURCES}
9344ee0d 35
f6b81378
DM
36PCT_MAN1_SOURCES= \
37 pct.adoc \
38 pct.1-synopsis.adoc \
39 ${PVE_COMMON_DOC_SOURCES}
40
9344ee0d
DM
41attributes.txt docinfo.xml:
42 cp ${DGDIR}/$@ $@.tmp
43 mv $@.tmp $@
44
45%-opts.adoc: ${DGDIR}/gen-%-opts.pl
f6b81378 46 ${DGDIR}/gen-$*-opts.pl >$@.tmp
9344ee0d
DM
47 mv $@.tmp $@
48
49%.adoc: ${DGDIR}/gen-%-adoc.pl
f6b81378 50 ${DGDIR}/gen-$*-adoc.pl >$@.tmp
9344ee0d
DM
51 mv $@.tmp $@
52
53%.1-synopsis.adoc:
54 perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
55 mv $@.tmp $@
56
57%.8-synopsis.adoc:
58 perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
59 mv $@.tmp $@
60
f6b81378 61ifneq (${DGDIR},.)
9344ee0d
DM
62%.adoc: ${DGDIR}/%.adoc
63 cp $< $@.tmp
64 mv $@.tmp $@
f6b81378 65endif
9344ee0d
DM
66
67pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
bef0c1b4 68 a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage pve-firewall.adoc
9344ee0d
DM
69 test -n "$${NOVIEW}" || man -l $@
70
828a27f5
DM
71pvesm.1: ${PVESM_MAN1_SOURCES}
72 a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pvesm.adoc
73 test -n "$${NOVIEW}" || man -l $@
74
f6b81378
DM
75pct.1: ${PCT_MAN1_SOURCES}
76 a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pct.adoc
77 test -n "$${NOVIEW}" || man -l $@
78
79pct.conf.5: pct.conf.adoc pct.conf.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
80 a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage pct.conf.adoc
81 test -n "$${NOVIEW}" || man -l $@
82
83vm.conf.5: vm.conf.adoc vm.conf.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
84 a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage vm.conf.adoc
85 test -n "$${NOVIEW}" || man -l $@
86
87datacenter.conf.5: datacenter.conf.adoc datacenter.conf.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
88 a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage datacenter.conf.adoc
89 test -n "$${NOVIEW}" || man -l $@
9344ee0d
DM
90
91.PHONY: cleanup-docgen
92cleanup-docgen:
93 rm -f *.1 *.8 *.adoc attributes.txt docinfo.xml