]> git.proxmox.com Git - pve-docs.git/blame - pve-doc-generator.mk
add pvestatd manual 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
6ec3cd20
DM
46PCT_CONF_MAN5_SOURCE= \
47 pct.conf.adoc \
48 pct.conf.5-opts.adoc \
49 ${PVE_COMMON_DOC_SOURCES}
50
7f8858a2
DM
51QM_MAN1_SOURCES= \
52 qm.adoc \
53 qm.1-synopsis.adoc \
54 ${PVE_COMMON_DOC_SOURCES}
55
6ec3cd20
DM
56QM_CONF_MAN5_SOURCE= \
57 qm.conf.adoc \
58 qm.conf.5-opts.adoc \
59 ${PVE_COMMON_DOC_SOURCES}
60
a5bb4c40
DM
61QMRESTORE_MAN1_SOURCES= \
62 qmrestore.adoc \
63 qmrestore.1-synopsis.adoc \
64 ${PVE_COMMON_DOC_SOURCES}
65
d7810cdb
DM
66PVEUM_MAN1_SOURCES= \
67 pveum.adoc \
68 pveum.1-synopsis.adoc \
69 ${PVE_COMMON_DOC_SOURCES}
70
e26d2ff0
DM
71HA_MANAGER_MAN1_SOURCES= \
72 ha-manager.adoc \
73 ha-manager.1-synopsis.adoc \
74 ${PVE_COMMON_DOC_SOURCES}
75
47e1b0c6
DM
76PVE_HA_CRM_MAN8_SOURCES= \
77 pve-ha-crm.adoc \
78 pve-ha-crm.8-synopsis.adoc \
79 ${PVE_COMMON_DOC_SOURCES}
80
954a26fd
DM
81PVE_HA_LRM_MAN8_SOURCES= \
82 pve-ha-lrm.adoc \
83 pve-ha-lrm.8-synopsis.adoc \
84 ${PVE_COMMON_DOC_SOURCES}
85
4db6a3f3
DM
86PVESTATD_MAN8_SOURCES= \
87 pvestatd.adoc \
88 pvestatd.8-synopsis.adoc \
89 ${PVE_COMMON_DOC_SOURCES}
90
9344ee0d
DM
91attributes.txt docinfo.xml:
92 cp ${DGDIR}/$@ $@.tmp
93 mv $@.tmp $@
94
95%-opts.adoc: ${DGDIR}/gen-%-opts.pl
f6b81378 96 ${DGDIR}/gen-$*-opts.pl >$@.tmp
9344ee0d
DM
97 mv $@.tmp $@
98
99%.adoc: ${DGDIR}/gen-%-adoc.pl
f6b81378 100 ${DGDIR}/gen-$*-adoc.pl >$@.tmp
9344ee0d
DM
101 mv $@.tmp $@
102
103%.1-synopsis.adoc:
104 perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
105 mv $@.tmp $@
106
107%.8-synopsis.adoc:
108 perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
109 mv $@.tmp $@
110
f6b81378 111ifneq (${DGDIR},.)
9344ee0d
DM
112%.adoc: ${DGDIR}/%.adoc
113 cp $< $@.tmp
114 mv $@.tmp $@
f6b81378 115endif
9344ee0d 116
872bbc1b
DM
117A2X_MAN_COMMON_OPTIONS=-a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage
118A2X_MAN1_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=1"
119A2X_MAN5_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=5"
120A2X_MAN8_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=8"
121
9344ee0d 122pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
872bbc1b 123 a2x ${A2X_MAN8_OPTIONS} pve-firewall.adoc
9344ee0d
DM
124 test -n "$${NOVIEW}" || man -l $@
125
828a27f5 126pvesm.1: ${PVESM_MAN1_SOURCES}
872bbc1b 127 a2x ${A2X_MAN1_OPTIONS} pvesm.adoc
828a27f5
DM
128 test -n "$${NOVIEW}" || man -l $@
129
f6b81378 130pct.1: ${PCT_MAN1_SOURCES}
872bbc1b 131 a2x ${A2X_MAN1_OPTIONS} pct.adoc
f6b81378
DM
132 test -n "$${NOVIEW}" || man -l $@
133
7f8858a2 134qm.1: ${QM_MAN1_SOURCES}
872bbc1b 135 a2x ${A2X_MAN1_OPTIONS} qm.adoc
7f8858a2
DM
136 test -n "$${NOVIEW}" || man -l $@
137
a5bb4c40 138qmrestore.1: ${QMRESTORE_MAN1_SOURCES}
872bbc1b 139 a2x ${A2X_MAN1_OPTIONS} qmrestore.adoc
a5bb4c40
DM
140 test -n "$${NOVIEW}" || man -l $@
141
d8742b0c 142pvecm.1: ${PVECM_MAN1_SOURCES}
872bbc1b 143 a2x ${A2X_MAN1_OPTIONS} pvecm.adoc
d8742b0c
DM
144 test -n "$${NOVIEW}" || man -l $@
145
d7810cdb 146pveum.1: ${PVEUM_MAN1_SOURCES}
872bbc1b 147 a2x ${A2X_MAN1_OPTIONS} pveum.adoc
d7810cdb
DM
148 test -n "$${NOVIEW}" || man -l $@
149
e26d2ff0 150ha-manager.1: ${HA_MANAGER_MAN1_SOURCES}
872bbc1b 151 a2x ${A2X_MAN1_OPTIONS} ha-manager.adoc
e26d2ff0
DM
152 test -n "$${NOVIEW}" || man -l $@
153
47e1b0c6 154pve-ha-crm.8: ${PVE_HA_CRM_MAN8_SOURCES}
872bbc1b 155 a2x ${A2X_MAN8_OPTIONS} manpage pve-ha-crm.adoc
47e1b0c6
DM
156 test -n "$${NOVIEW}" || man -l $@
157
954a26fd 158pve-ha-lrm.8: ${PVE_HA_LRM_MAN8_SOURCES}
872bbc1b 159 a2x ${A2X_MAN8_OPTIONS} pve-ha-lrm.adoc
954a26fd
DM
160 test -n "$${NOVIEW}" || man -l $@
161
4db6a3f3
DM
162pvestatd.8: ${PVESTATD_MAN8_SOURCES}
163 a2x ${A2X_MAN8_OPTIONS} pvestatd.adoc
164 test -n "$${NOVIEW}" || man -l $@
165
6ec3cd20
DM
166qm.conf.5: ${QM_CONF_MAN5_SOURCE}
167
168pct.conf.5: ${PCT_CONF_MAN5_SOURCE}
169
b0f56e11 170%.5: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
872bbc1b 171 a2x ${A2X_MAN5_OPTIONS} $*.adoc
f6b81378 172 test -n "$${NOVIEW}" || man -l $@
9344ee0d
DM
173
174.PHONY: cleanup-docgen
175cleanup-docgen:
427b88e5 176 rm -f *.1 *.5 *.8 *.adoc attributes.txt docinfo.xml