Commit | Line | Data |
---|---|---|
9344ee0d DM |
1 | DGDIR?=/usr/share/pve-doc-generator |
2 | ||
3 | all: | |
4 | ||
5 | PVE_FIREWALL_MAN8_SOURCES= \ | |
6 | pve-firewall.adoc \ | |
7 | pve-firewall.8-synopsis.adoc \ | |
8 | pve-firewall-cluster-opts.adoc \ | |
9 | pve-firewall-host-opts.adoc \ | |
10 | pve-firewall-vm-opts.adoc \ | |
11 | pve-firewall-rules-opts.adoc \ | |
12 | pve-firewall-macros.adoc \ | |
13 | attributes.txt \ | |
14 | docinfo.xml | |
15 | ||
16 | attributes.txt docinfo.xml: | |
17 | cp ${DGDIR}/$@ $@.tmp | |
18 | mv $@.tmp $@ | |
19 | ||
20 | %-opts.adoc: ${DGDIR}/gen-%-opts.pl | |
21 | $< >$@.tmp | |
22 | mv $@.tmp $@ | |
23 | ||
24 | %.adoc: ${DGDIR}/gen-%-adoc.pl | |
25 | $< >$@.tmp | |
26 | mv $@.tmp $@ | |
27 | ||
28 | %.1-synopsis.adoc: | |
29 | perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
30 | mv $@.tmp $@ | |
31 | ||
32 | %.8-synopsis.adoc: | |
33 | perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
34 | mv $@.tmp $@ | |
35 | ||
36 | %.adoc: ${DGDIR}/%.adoc | |
37 | cp $< $@.tmp | |
38 | mv $@.tmp $@ | |
39 | ||
40 | pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES} | |
41 | a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage pve-firewall.adoc | |
42 | test -n "$${NOVIEW}" || man -l $@ | |
43 | ||
44 | ||
45 | .PHONY: cleanup-docgen | |
46 | cleanup-docgen: | |
47 | rm -f *.1 *.8 *.adoc attributes.txt docinfo.xml |