]>
Commit | Line | Data |
---|---|---|
1 | # also update debian/changelog | |
2 | DOCRELEASE=4.1 | |
3 | ||
4 | DGDIR?=/usr/share/pve-doc-generator | |
5 | ||
6 | all: | |
7 | ||
8 | PVE_COMMON_DOC_SOURCES= \ | |
9 | attributes.txt \ | |
10 | pve-copyright.adoc \ | |
11 | docinfo.xml | |
12 | ||
13 | PVECM_MAN1_SOURCES= \ | |
14 | pvecm.adoc \ | |
15 | pvecm.1-synopsis.adoc \ | |
16 | ${PVE_COMMON_DOC_SOURCES} | |
17 | ||
18 | PVE_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 \ | |
26 | ${PVE_COMMON_DOC_SOURCES} | |
27 | ||
28 | PVESM_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} | |
40 | ||
41 | PCT_MAN1_SOURCES= \ | |
42 | pct.adoc \ | |
43 | pct.1-synopsis.adoc \ | |
44 | ${PVE_COMMON_DOC_SOURCES} | |
45 | ||
46 | PCT_CONF_MAN5_SOURCES= \ | |
47 | pct.conf.adoc \ | |
48 | pct.conf.5-opts.adoc \ | |
49 | ${PVE_COMMON_DOC_SOURCES} | |
50 | ||
51 | DATACENTER_CONF_MAN5_SOURCES= \ | |
52 | datacenter.cfg.adoc \ | |
53 | datacenter.cfg.5-opts.adoc \ | |
54 | ${PVE_COMMON_DOC_SOURCES} | |
55 | ||
56 | QM_MAN1_SOURCES= \ | |
57 | qm.adoc \ | |
58 | qm.1-synopsis.adoc \ | |
59 | ${PVE_COMMON_DOC_SOURCES} | |
60 | ||
61 | QM_CONF_MAN5_SOURCES= \ | |
62 | qm.conf.adoc \ | |
63 | qm.conf.5-opts.adoc \ | |
64 | ${PVE_COMMON_DOC_SOURCES} | |
65 | ||
66 | QMRESTORE_MAN1_SOURCES= \ | |
67 | qmrestore.adoc \ | |
68 | qmrestore.1-synopsis.adoc \ | |
69 | ${PVE_COMMON_DOC_SOURCES} | |
70 | ||
71 | PVEUM_MAN1_SOURCES= \ | |
72 | pveum.adoc \ | |
73 | pveum.1-synopsis.adoc \ | |
74 | ${PVE_COMMON_DOC_SOURCES} | |
75 | ||
76 | HA_MANAGER_MAN1_SOURCES= \ | |
77 | ha-manager.adoc \ | |
78 | ha-manager.1-synopsis.adoc \ | |
79 | ${PVE_COMMON_DOC_SOURCES} | |
80 | ||
81 | PVE_HA_CRM_MAN8_SOURCES= \ | |
82 | pve-ha-crm.adoc \ | |
83 | pve-ha-crm.8-synopsis.adoc \ | |
84 | ${PVE_COMMON_DOC_SOURCES} | |
85 | ||
86 | PVE_HA_LRM_MAN8_SOURCES= \ | |
87 | pve-ha-lrm.adoc \ | |
88 | pve-ha-lrm.8-synopsis.adoc \ | |
89 | ${PVE_COMMON_DOC_SOURCES} | |
90 | ||
91 | PVESTATD_MAN8_SOURCES= \ | |
92 | pvestatd.adoc \ | |
93 | pvestatd.8-synopsis.adoc \ | |
94 | ${PVE_COMMON_DOC_SOURCES} | |
95 | ||
96 | PMXCFS_MAN8_SOURCES= \ | |
97 | pmxcfs.adoc \ | |
98 | pmxcfs.8-cli.adoc \ | |
99 | ${PVE_COMMON_DOC_SOURCES} | |
100 | ||
101 | attributes.txt docinfo.xml: | |
102 | cp ${DGDIR}/$@ $@.tmp | |
103 | mv $@.tmp $@ | |
104 | ||
105 | %-opts.adoc: ${DGDIR}/gen-%-opts.pl | |
106 | ${DGDIR}/gen-$*-opts.pl >$@.tmp | |
107 | mv $@.tmp $@ | |
108 | ||
109 | %.adoc: ${DGDIR}/gen-%-adoc.pl | |
110 | ${DGDIR}/gen-$*-adoc.pl >$@.tmp | |
111 | mv $@.tmp $@ | |
112 | ||
113 | %.1-synopsis.adoc: | |
114 | perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
115 | mv $@.tmp $@ | |
116 | ||
117 | %.8-synopsis.adoc: | |
118 | perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
119 | mv $@.tmp $@ | |
120 | ||
121 | ifneq (${DGDIR},.) | |
122 | %.adoc: ${DGDIR}/%.adoc | |
123 | cp $< $@.tmp | |
124 | mv $@.tmp $@ | |
125 | endif | |
126 | ||
127 | A2X_MAN_COMMON_OPTIONS=-a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage | |
128 | A2X_MAN1_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=1" | |
129 | A2X_MAN5_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=5" | |
130 | A2X_MAN8_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=8" | |
131 | ||
132 | pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES} | |
133 | a2x ${A2X_MAN8_OPTIONS} pve-firewall.adoc | |
134 | test -n "$${NOVIEW}" || man -l $@ | |
135 | ||
136 | pvesm.1: ${PVESM_MAN1_SOURCES} | |
137 | a2x ${A2X_MAN1_OPTIONS} pvesm.adoc | |
138 | test -n "$${NOVIEW}" || man -l $@ | |
139 | ||
140 | pct.1: ${PCT_MAN1_SOURCES} | |
141 | a2x ${A2X_MAN1_OPTIONS} pct.adoc | |
142 | test -n "$${NOVIEW}" || man -l $@ | |
143 | ||
144 | qm.1: ${QM_MAN1_SOURCES} | |
145 | a2x ${A2X_MAN1_OPTIONS} qm.adoc | |
146 | test -n "$${NOVIEW}" || man -l $@ | |
147 | ||
148 | qmrestore.1: ${QMRESTORE_MAN1_SOURCES} | |
149 | a2x ${A2X_MAN1_OPTIONS} qmrestore.adoc | |
150 | test -n "$${NOVIEW}" || man -l $@ | |
151 | ||
152 | pvecm.1: ${PVECM_MAN1_SOURCES} | |
153 | a2x ${A2X_MAN1_OPTIONS} pvecm.adoc | |
154 | test -n "$${NOVIEW}" || man -l $@ | |
155 | ||
156 | pveum.1: ${PVEUM_MAN1_SOURCES} | |
157 | a2x ${A2X_MAN1_OPTIONS} pveum.adoc | |
158 | test -n "$${NOVIEW}" || man -l $@ | |
159 | ||
160 | ha-manager.1: ${HA_MANAGER_MAN1_SOURCES} | |
161 | a2x ${A2X_MAN1_OPTIONS} ha-manager.adoc | |
162 | test -n "$${NOVIEW}" || man -l $@ | |
163 | ||
164 | pve-ha-crm.8: ${PVE_HA_CRM_MAN8_SOURCES} | |
165 | a2x ${A2X_MAN8_OPTIONS} manpage pve-ha-crm.adoc | |
166 | test -n "$${NOVIEW}" || man -l $@ | |
167 | ||
168 | pve-ha-lrm.8: ${PVE_HA_LRM_MAN8_SOURCES} | |
169 | a2x ${A2X_MAN8_OPTIONS} pve-ha-lrm.adoc | |
170 | test -n "$${NOVIEW}" || man -l $@ | |
171 | ||
172 | pvestatd.8: ${PVESTATD_MAN8_SOURCES} | |
173 | a2x ${A2X_MAN8_OPTIONS} pvestatd.adoc | |
174 | test -n "$${NOVIEW}" || man -l $@ | |
175 | ||
176 | pmxcfs.8: ${PMXCFS_MAN8_SOURCES} | |
177 | a2x ${A2X_MAN8_OPTIONS} pmxcfs.adoc | |
178 | test -n "$${NOVIEW}" || man -l $@ | |
179 | ||
180 | qm.conf.5: ${QM_CONF_MAN5_SOURCES} | |
181 | ||
182 | pct.conf.5: ${PCT_CONF_MAN5_SOURCES} | |
183 | ||
184 | datacenter.cfg.5: ${DATACENTER_CONF_MAN5_SOURCES} | |
185 | ||
186 | %.5: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES} | |
187 | a2x ${A2X_MAN5_OPTIONS} $*.adoc | |
188 | test -n "$${NOVIEW}" || man -l $@ | |
189 | ||
190 | .PHONY: cleanup-docgen | |
191 | cleanup-docgen: | |
192 | rm -f *.1 *.5 *.8 *.adoc attributes.txt docinfo.xml |