]>
Commit | Line | Data |
---|---|---|
a4346554 | 1 | RELEASE=4.1 |
deb7f2ea DM |
2 | |
3 | PVESM_SOURCES=attributes.txt pvesm.adoc pvesm.1-synopsis.adoc $(shell ls pve-storage-*.adoc) | |
4 | PVEUM_SOURCES=attributes.txt pveum.adoc pveum.1-synopsis.adoc | |
5 | VZDUMP_SOURCES=attributes.txt vzdump.adoc vzdump.1-synopsis.adoc | |
6 | PVEFW_SOURCES=attributes.txt pve-firewall.adoc pve-firewall.8-synopsis.adoc | |
7 | QM_SOURCES=attributes.txt qm.adoc qm.1-synopsis.adoc | |
8 | PCT_SOURCES=attributes.txt pct.adoc pct.1-synopsis.adoc | |
d61bab51 | 9 | PVEAM_SOURCES=attributes.txt pveam.adoc pveam.1-synopsis.adoc |
22653ac8 | 10 | HA_SOURCES=attributes.txt ha-manager.1-synopsis.adoc ha-manager.adoc |
deb7f2ea | 11 | |
d91f8c1e DM |
12 | SYSADMIN_SOURCES= \ |
13 | getting-help.adoc \ | |
14 | pve-package-repos.adoc \ | |
15 | pve-installation.adoc \ | |
16 | system-software-updates.adoc \ | |
17 | sysadmin.adoc | |
18 | ||
deb7f2ea | 19 | PVE_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 \ | |
d91f8c1e | 24 | ${SYSADMIN_SOURCES} \ |
deb7f2ea DM |
25 | pve-admin-guide.adoc \ |
26 | pve-intro.adoc \ | |
27 | pmxcfs.adoc \ | |
28 | pve-faq.adoc \ | |
29 | ${QM_SOURCES} \ | |
30 | ${PCT_SOURCES} \ | |
d61bab51 | 31 | ${PVEAM_SOURCES} \ |
deb7f2ea DM |
32 | ${PVEFW_SOURCES} \ |
33 | ${PVEUM_SOURCES} \ | |
34 | ${PVESM_SOURCES} \ | |
35 | ${VZDUMP_SOURCES} \ | |
22653ac8 | 36 | ${HA_SOURCES} \ |
deb7f2ea DM |
37 | images/cluster-nwdiag.svg \ |
38 | images/node-nwdiag.svg \ | |
39 | pve-bibliography.adoc \ | |
caf01dfc | 40 | GFDL.adoc \ |
deb7f2ea DM |
41 | attributes.txt |
42 | ||
43 | ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)" | |
db3cc8fc | 44 | ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${RELEASE}" |
c016ebb7 | 45 | ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${RELEASE}" |
db3cc8fc | 46 | ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${RELEASE}" |
deb7f2ea | 47 | |
fc1090ef | 48 | BROWSER?=xdg-open |
df41beec | 49 | |
7b2c36ae DM |
50 | all: pve-admin-guide.html |
51 | ||
deb7f2ea DM |
52 | %-nwdiag.svg: %.nwdiag |
53 | nwdiag -T svg $*.nwdiag -o $@; | |
54 | ||
55 | %.1-synopsis.adoc: | |
56 | perl -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
57 | mv $@.tmp $@ | |
58 | ||
59 | %.1: %.adoc %.1-synopsis.adoc docinfo.xml | |
db3cc8fc | 60 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc |
c016ebb7 | 61 | test -z "$${NOVIEW}" && man -l $@ |
deb7f2ea DM |
62 | |
63 | %.1.html: %.adoc %.1-synopsis.adoc docinfo.xml | |
64 | asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc | |
df41beec | 65 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea DM |
66 | |
67 | ||
68 | %.8-synopsis.adoc: | |
69 | perl -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
70 | mv $@.tmp $@ | |
71 | ||
72 | %.8: %.adoc %.8-synopsis.adoc docinfo.xml | |
db3cc8fc | 73 | a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc |
c016ebb7 | 74 | test -z "$${NOVIEW}" && man -l $@ |
deb7f2ea DM |
75 | |
76 | %.8.html: %.adoc %.8-synopsis.adoc docinfo.xml | |
77 | asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc | |
df41beec | 78 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea | 79 | |
c016ebb7 DM |
80 | datacenter.cfg.5-opts.adoc: |
81 | ./gen-datacenter-cfg-opts-adoc.pl >$@.tmp | |
82 | mv $@.tmp $@ | |
83 | ||
7b2c36ae DM |
84 | vm.conf.5-opts.adoc: |
85 | ./gen-vm-conf-opts-adoc.pl >$@.tmp | |
86 | mv $@.tmp $@ | |
87 | ||
c016ebb7 DM |
88 | %.5: %.adoc %.5-opts.adoc docinfo.xml |
89 | a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc | |
90 | test -z "$${NOVIEW}" && man -l $@ | |
91 | ||
92 | %.5.html: %.adoc %.5-opts.adoc docinfo.xml | |
93 | asciidoc ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc | |
94 | test -z "$${NOVIEW}" && $(BROWSER) $@ & | |
95 | ||
deb7f2ea DM |
96 | index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} |
97 | $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub | |
7b2c36ae | 98 | $(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 |
c016ebb7 | 99 | asciidoc -a "date=$(shell date)" -a "revnumber=${RELEASE}" index.adoc |
df41beec | 100 | $(BROWSER) index.html & |
deb7f2ea DM |
101 | |
102 | pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES} | |
c016ebb7 | 103 | asciidoc -a "revnumber=${RELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc |
df41beec | 104 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea | 105 | |
2296c490 | 106 | pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml |
8f13ba5f | 107 | grep ">Release ${RELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false); |
4de1e57a | 108 | 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 | 109 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea DM |
110 | |
111 | pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES} | |
112 | a2x -f epub pve-admin-guide.adoc | |
df41beec | 113 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea | 114 | |
c016ebb7 DM |
115 | update: clean |
116 | rm -f *.5-opts.adoc .1-synopsis.adoc .8-synopsis.adoc | |
117 | make all | |
deb7f2ea DM |
118 | |
119 | clean: | |
c016ebb7 | 120 | rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8 |