Commit | Line | Data |
---|---|---|
bef0c1b4 DM |
1 | # also update debian/changelog |
2 | DOCRELEASE=4.1 | |
3 | ||
9344ee0d DM |
4 | DGDIR?=/usr/share/pve-doc-generator |
5 | ||
6 | all: | |
7 | ||
828a27f5 DM |
8 | PVE_COMMON_DOC_SOURCES= \ |
9 | attributes.txt \ | |
10 | pve-copyright.adoc \ | |
11 | docinfo.xml | |
12 | ||
9344ee0d DM |
13 | PVE_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 | ||
23 | PVESM_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 DM |
35 | |
36 | attributes.txt docinfo.xml: | |
37 | cp ${DGDIR}/$@ $@.tmp | |
38 | mv $@.tmp $@ | |
39 | ||
40 | %-opts.adoc: ${DGDIR}/gen-%-opts.pl | |
41 | $< >$@.tmp | |
42 | mv $@.tmp $@ | |
43 | ||
44 | %.adoc: ${DGDIR}/gen-%-adoc.pl | |
45 | $< >$@.tmp | |
46 | mv $@.tmp $@ | |
47 | ||
48 | %.1-synopsis.adoc: | |
49 | perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
50 | mv $@.tmp $@ | |
51 | ||
52 | %.8-synopsis.adoc: | |
53 | perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
54 | mv $@.tmp $@ | |
55 | ||
56 | %.adoc: ${DGDIR}/%.adoc | |
57 | cp $< $@.tmp | |
58 | mv $@.tmp $@ | |
59 | ||
60 | pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES} | |
bef0c1b4 | 61 | a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage pve-firewall.adoc |
9344ee0d DM |
62 | test -n "$${NOVIEW}" || man -l $@ |
63 | ||
828a27f5 DM |
64 | pvesm.1: ${PVESM_MAN1_SOURCES} |
65 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pvesm.adoc | |
66 | test -n "$${NOVIEW}" || man -l $@ | |
67 | ||
9344ee0d DM |
68 | |
69 | .PHONY: cleanup-docgen | |
70 | cleanup-docgen: | |
71 | rm -f *.1 *.8 *.adoc attributes.txt docinfo.xml |