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