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