]> git.proxmox.com Git - pve-docs.git/blame - Makefile
pve-firewall.adoc: small improvements
[pve-docs.git] / Makefile
CommitLineData
a4346554 1RELEASE=4.1
deb7f2ea
DM
2
3PVESM_SOURCES=attributes.txt pvesm.adoc pvesm.1-synopsis.adoc $(shell ls pve-storage-*.adoc)
4PVEUM_SOURCES=attributes.txt pveum.adoc pveum.1-synopsis.adoc
5VZDUMP_SOURCES=attributes.txt vzdump.adoc vzdump.1-synopsis.adoc
78ef35dc 6PVEFW_SOURCES=attributes.txt pve-firewall.adoc pve-firewall-rules-opts.adoc pve-firewall-cluster-opts.adoc pve-firewall-host-opts.adoc pve-firewall-vm-opts.adoc pve-firewall-macros.adoc pve-firewall.8-synopsis.adoc
deb7f2ea
DM
7QM_SOURCES=attributes.txt qm.adoc qm.1-synopsis.adoc
8PCT_SOURCES=attributes.txt pct.adoc pct.1-synopsis.adoc
d61bab51 9PVEAM_SOURCES=attributes.txt pveam.adoc pveam.1-synopsis.adoc
22653ac8 10HA_SOURCES=attributes.txt ha-manager.1-synopsis.adoc ha-manager.adoc
deb7f2ea 11
d91f8c1e
DM
12SYSADMIN_SOURCES= \
13 getting-help.adoc \
14 pve-package-repos.adoc \
15 pve-installation.adoc \
16 system-software-updates.adoc \
17 sysadmin.adoc
18
deb7f2ea 19PVE_ADMIN_GUIDE_SOURCES= \
c016ebb7
DM
20 datacenter.cfg.adoc \
21 datacenter.cfg.5-opts.adoc \
7b2c36ae
DM
22 vm.conf.adoc \
23 vm.conf.5-opts.adoc \
71e16346
DM
24 pct.conf.adoc \
25 pct.conf.5-opts.adoc \
d91f8c1e 26 ${SYSADMIN_SOURCES} \
deb7f2ea
DM
27 pve-admin-guide.adoc \
28 pve-intro.adoc \
29 pmxcfs.adoc \
30 pve-faq.adoc \
31 ${QM_SOURCES} \
32 ${PCT_SOURCES} \
d61bab51 33 ${PVEAM_SOURCES} \
deb7f2ea
DM
34 ${PVEFW_SOURCES} \
35 ${PVEUM_SOURCES} \
36 ${PVESM_SOURCES} \
37 ${VZDUMP_SOURCES} \
22653ac8 38 ${HA_SOURCES} \
deb7f2ea
DM
39 images/cluster-nwdiag.svg \
40 images/node-nwdiag.svg \
41 pve-bibliography.adoc \
caf01dfc 42 GFDL.adoc \
deb7f2ea
DM
43 attributes.txt
44
45ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
db3cc8fc 46ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
c016ebb7 47ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
db3cc8fc 48ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
deb7f2ea 49
fc1090ef 50BROWSER?=xdg-open
df41beec 51
7b2c36ae
DM
52all: pve-admin-guide.html
53
deb7f2ea
DM
54%-nwdiag.svg: %.nwdiag
55 nwdiag -T svg $*.nwdiag -o $@;
56
57%.1-synopsis.adoc:
58 perl -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
59 mv $@.tmp $@
60
61%.1: %.adoc %.1-synopsis.adoc docinfo.xml
db3cc8fc 62 a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
c016ebb7 63 test -z "$${NOVIEW}" && man -l $@
deb7f2ea
DM
64
65%.1.html: %.adoc %.1-synopsis.adoc docinfo.xml
66 asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
df41beec 67 test -z "$${NOVIEW}" && $(BROWSER) $@ &
deb7f2ea
DM
68
69
70%.8-synopsis.adoc:
71 perl -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
72 mv $@.tmp $@
73
74%.8: %.adoc %.8-synopsis.adoc docinfo.xml
db3cc8fc 75 a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
c016ebb7 76 test -z "$${NOVIEW}" && man -l $@
deb7f2ea
DM
77
78%.8.html: %.adoc %.8-synopsis.adoc docinfo.xml
79 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc
df41beec 80 test -z "$${NOVIEW}" && $(BROWSER) $@ &
deb7f2ea 81
c48819d1
DM
82pve-firewall-cluster-opts.adoc:
83 ./gen-pve-firewall-cluster-opts.pl >$@.tmp
84 mv $@.tmp $@
85
888c4116
DM
86pve-firewall-host-opts.adoc:
87 ./gen-pve-firewall-host-opts.pl >$@.tmp
88 mv $@.tmp $@
89
78ef35dc
DM
90pve-firewall-vm-opts.adoc:
91 ./gen-pve-firewall-vm-opts.pl >$@.tmp
92 mv $@.tmp $@
93
696fb448
DM
94pve-firewall-rules-opts.adoc:
95 ./gen-pve-firewall-rules-opts-adoc.pl >$@.tmp
96 mv $@.tmp $@
97
14c06023
DM
98pve-firewall-macros.adoc:
99 ./gen-pve-firewall-macros-adoc.pl >$@.tmp
100 mv $@.tmp $@
101
c016ebb7
DM
102datacenter.cfg.5-opts.adoc:
103 ./gen-datacenter-cfg-opts-adoc.pl >$@.tmp
104 mv $@.tmp $@
105
7b2c36ae
DM
106vm.conf.5-opts.adoc:
107 ./gen-vm-conf-opts-adoc.pl >$@.tmp
108 mv $@.tmp $@
109
71e16346
DM
110pct.conf.5-opts.adoc:
111 ./gen-pct-conf-opts-adoc.pl >$@.tmp
112 mv $@.tmp $@
113
c016ebb7
DM
114%.5: %.adoc %.5-opts.adoc docinfo.xml
115 a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
116 test -z "$${NOVIEW}" && man -l $@
117
118%.5.html: %.adoc %.5-opts.adoc docinfo.xml
119 asciidoc ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc
120 test -z "$${NOVIEW}" && $(BROWSER) $@ &
121
deb7f2ea
DM
122index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
123 $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
71e16346 124 $(MAKE) NOVIEW=1 qm.1.html pct.1.html pveam.1.html pvesm.1.html pveum.1.html vzdump.1.html pve-firewall.8.html ha-manager.1.html datacenter.cfg.5.html vm.conf.5.html pct.conf.5.html
c016ebb7 125 asciidoc -a "date=$(shell date)" -a "revnumber=${RELEASE}" index.adoc
df41beec 126 $(BROWSER) index.html &
deb7f2ea
DM
127
128pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
c016ebb7 129 asciidoc -a "revnumber=${RELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
df41beec 130 test -z "$${NOVIEW}" && $(BROWSER) $@ &
deb7f2ea 131
2296c490 132pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
8f13ba5f 133 grep ">Release ${RELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
4de1e57a 134 a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" pve-admin-guide.adoc
df41beec 135 test -z "$${NOVIEW}" && $(BROWSER) $@ &
deb7f2ea
DM
136
137pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
138 a2x -f epub pve-admin-guide.adoc
df41beec 139 test -z "$${NOVIEW}" && $(BROWSER) $@ &
deb7f2ea 140
c016ebb7
DM
141update: clean
142 rm -f *.5-opts.adoc .1-synopsis.adoc .8-synopsis.adoc
143 make all
deb7f2ea
DM
144
145clean:
c016ebb7 146 rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8