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 | ||
d8742b0c DM |
13 | PVECM_MAN1_SOURCES= \ |
14 | pvecm.adoc \ | |
15 | pvecm.1-synopsis.adoc \ | |
16 | ${PVE_COMMON_DOC_SOURCES} | |
17 | ||
9344ee0d DM |
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 \ | |
828a27f5 DM |
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} | |
9344ee0d | 40 | |
f6b81378 DM |
41 | PCT_MAN1_SOURCES= \ |
42 | pct.adoc \ | |
43 | pct.1-synopsis.adoc \ | |
44 | ${PVE_COMMON_DOC_SOURCES} | |
45 | ||
7f8858a2 DM |
46 | QM_MAN1_SOURCES= \ |
47 | qm.adoc \ | |
48 | qm.1-synopsis.adoc \ | |
49 | ${PVE_COMMON_DOC_SOURCES} | |
50 | ||
a5bb4c40 DM |
51 | QMRESTORE_MAN1_SOURCES= \ |
52 | qmrestore.adoc \ | |
53 | qmrestore.1-synopsis.adoc \ | |
54 | ${PVE_COMMON_DOC_SOURCES} | |
55 | ||
d7810cdb DM |
56 | PVEUM_MAN1_SOURCES= \ |
57 | pveum.adoc \ | |
58 | pveum.1-synopsis.adoc \ | |
59 | ${PVE_COMMON_DOC_SOURCES} | |
60 | ||
e26d2ff0 DM |
61 | HA_MANAGER_MAN1_SOURCES= \ |
62 | ha-manager.adoc \ | |
63 | ha-manager.1-synopsis.adoc \ | |
64 | ${PVE_COMMON_DOC_SOURCES} | |
65 | ||
9344ee0d DM |
66 | attributes.txt docinfo.xml: |
67 | cp ${DGDIR}/$@ $@.tmp | |
68 | mv $@.tmp $@ | |
69 | ||
70 | %-opts.adoc: ${DGDIR}/gen-%-opts.pl | |
f6b81378 | 71 | ${DGDIR}/gen-$*-opts.pl >$@.tmp |
9344ee0d DM |
72 | mv $@.tmp $@ |
73 | ||
74 | %.adoc: ${DGDIR}/gen-%-adoc.pl | |
f6b81378 | 75 | ${DGDIR}/gen-$*-adoc.pl >$@.tmp |
9344ee0d DM |
76 | mv $@.tmp $@ |
77 | ||
78 | %.1-synopsis.adoc: | |
79 | perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
80 | mv $@.tmp $@ | |
81 | ||
82 | %.8-synopsis.adoc: | |
83 | perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
84 | mv $@.tmp $@ | |
85 | ||
f6b81378 | 86 | ifneq (${DGDIR},.) |
9344ee0d DM |
87 | %.adoc: ${DGDIR}/%.adoc |
88 | cp $< $@.tmp | |
89 | mv $@.tmp $@ | |
f6b81378 | 90 | endif |
9344ee0d DM |
91 | |
92 | pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES} | |
bef0c1b4 | 93 | a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage pve-firewall.adoc |
9344ee0d DM |
94 | test -n "$${NOVIEW}" || man -l $@ |
95 | ||
828a27f5 DM |
96 | pvesm.1: ${PVESM_MAN1_SOURCES} |
97 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pvesm.adoc | |
98 | test -n "$${NOVIEW}" || man -l $@ | |
99 | ||
f6b81378 DM |
100 | pct.1: ${PCT_MAN1_SOURCES} |
101 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pct.adoc | |
102 | test -n "$${NOVIEW}" || man -l $@ | |
103 | ||
7f8858a2 DM |
104 | qm.1: ${QM_MAN1_SOURCES} |
105 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage qm.adoc | |
106 | test -n "$${NOVIEW}" || man -l $@ | |
107 | ||
a5bb4c40 DM |
108 | qmrestore.1: ${QMRESTORE_MAN1_SOURCES} |
109 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage qmrestore.adoc | |
110 | test -n "$${NOVIEW}" || man -l $@ | |
111 | ||
d8742b0c DM |
112 | pvecm.1: ${PVECM_MAN1_SOURCES} |
113 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pvecm.adoc | |
114 | test -n "$${NOVIEW}" || man -l $@ | |
115 | ||
d7810cdb DM |
116 | pveum.1: ${PVEUM_MAN1_SOURCES} |
117 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pveum.adoc | |
118 | test -n "$${NOVIEW}" || man -l $@ | |
119 | ||
e26d2ff0 DM |
120 | ha-manager.1: ${HA_MANAGER_MAN1_SOURCES} |
121 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage ha-manager.adoc | |
122 | test -n "$${NOVIEW}" || man -l $@ | |
123 | ||
b0f56e11 DM |
124 | %.5: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES} |
125 | a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage $*.adoc | |
f6b81378 | 126 | test -n "$${NOVIEW}" || man -l $@ |
9344ee0d DM |
127 | |
128 | .PHONY: cleanup-docgen | |
129 | cleanup-docgen: | |
130 | rm -f *.1 *.8 *.adoc attributes.txt docinfo.xml |