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 | |
9 | ||
d91f8c1e DM |
10 | SYSADMIN_SOURCES= \ |
11 | getting-help.adoc \ | |
12 | pve-package-repos.adoc \ | |
13 | pve-installation.adoc \ | |
14 | system-software-updates.adoc \ | |
15 | sysadmin.adoc | |
16 | ||
deb7f2ea | 17 | PVE_ADMIN_GUIDE_SOURCES= \ |
d91f8c1e | 18 | ${SYSADMIN_SOURCES} \ |
deb7f2ea DM |
19 | pve-admin-guide.adoc \ |
20 | pve-intro.adoc \ | |
21 | pmxcfs.adoc \ | |
22 | pve-faq.adoc \ | |
23 | ${QM_SOURCES} \ | |
24 | ${PCT_SOURCES} \ | |
25 | ${PVEFW_SOURCES} \ | |
26 | ${PVEUM_SOURCES} \ | |
27 | ${PVESM_SOURCES} \ | |
28 | ${VZDUMP_SOURCES} \ | |
29 | images/cluster-nwdiag.svg \ | |
30 | images/node-nwdiag.svg \ | |
31 | pve-bibliography.adoc \ | |
caf01dfc | 32 | GFDL.adoc \ |
deb7f2ea DM |
33 | attributes.txt |
34 | ||
35 | ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)" | |
db3cc8fc DM |
36 | ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${RELEASE}" |
37 | ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${RELEASE}" | |
deb7f2ea | 38 | |
df41beec TL |
39 | BROWSER=xdg-open |
40 | ||
deb7f2ea DM |
41 | %-nwdiag.svg: %.nwdiag |
42 | nwdiag -T svg $*.nwdiag -o $@; | |
43 | ||
44 | %.1-synopsis.adoc: | |
45 | perl -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
46 | mv $@.tmp $@ | |
47 | ||
48 | %.1: %.adoc %.1-synopsis.adoc docinfo.xml | |
db3cc8fc | 49 | a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc |
deb7f2ea DM |
50 | test -z "$${NOVIEW}" && man -l $@ |
51 | ||
52 | %.1.html: %.adoc %.1-synopsis.adoc docinfo.xml | |
53 | asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc | |
df41beec | 54 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea DM |
55 | |
56 | ||
57 | %.8-synopsis.adoc: | |
58 | perl -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp | |
59 | mv $@.tmp $@ | |
60 | ||
61 | %.8: %.adoc %.8-synopsis.adoc docinfo.xml | |
db3cc8fc | 62 | a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc |
deb7f2ea DM |
63 | test -z "$${NOVIEW}" && man -l $@ |
64 | ||
65 | %.8.html: %.adoc %.8-synopsis.adoc docinfo.xml | |
66 | asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc | |
df41beec | 67 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea DM |
68 | |
69 | ||
70 | all: pve-admin-guide.html | |
71 | ||
72 | index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} | |
73 | $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub | |
74 | $(MAKE) NOVIEW=1 qm.1.html pct.1.html pvesm.1.html pveum.1.html vzdump.1.html pve-firewall.8.html | |
db3cc8fc | 75 | asciidoc -a "date=$(shell date)" -a "revnumber=${RELEASE}" index.adoc |
df41beec | 76 | $(BROWSER) index.html & |
deb7f2ea DM |
77 | |
78 | pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES} | |
a4346554 | 79 | asciidoc -a "revnumber=${RELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc |
df41beec | 80 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea | 81 | |
2296c490 | 82 | pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml |
8f13ba5f | 83 | grep ">Release ${RELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false); |
4de1e57a | 84 | 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 | 85 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea DM |
86 | |
87 | pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES} | |
88 | a2x -f epub pve-admin-guide.adoc | |
df41beec | 89 | test -z "$${NOVIEW}" && $(BROWSER) $@ & |
deb7f2ea DM |
90 | |
91 | ||
92 | clean: | |
93 | rm -rf *~ *.html *.pdf *.epub *.1 *.8 |