add cluster manager to pve-admin-guide.adoc
[pve-docs.git] / Makefile
CommitLineData
bef0c1b4
DM
1DGDIR=.
2
3include ./pve-doc-generator.mk
deb7f2ea 4
9344ee0d
DM
5PACKAGE=pve-doc-generator
6
7# also update debian/changelog
8PKGREL=1
9
bef0c1b4 10DEB=${PACKAGE}_${DOCRELEASE}-${PKGREL}_amd64.deb
9344ee0d
DM
11
12
13DEB_SOURCES= \
14 pve-doc-generator.mk \
15 attributes.txt \
16 pvesm.adoc \
828a27f5
DM
17 pve-storage-dir.adoc \
18 pve-storage-glusterfs.adoc \
19 pve-storage-iscsi.adoc \
20 pve-storage-iscsidirect.adoc \
21 pve-storage-lvm.adoc \
22 pve-storage-nfs.adoc \
23 pve-storage-rbd.adoc \
24 pve-storage-zfspool.adoc \
d8742b0c 25 pvecm.adoc \
9344ee0d
DM
26 pveum.adoc \
27 vzdump.adoc \
28 pve-firewall.adoc \
29 qm.adoc \
f6b81378 30 vm.conf.adoc \
9344ee0d 31 pct.adoc \
f6b81378
DM
32 pct.conf.adoc \
33 datacenter.cfg.adoc \
9344ee0d
DM
34 pveam.adoc \
35 ha-manager.adoc \
36 pve-copyright.adoc \
37 docinfo.xml
38
39GEN_SCRIPTS= \
f6b81378
DM
40 gen-datacenter.cfg.5-opts.pl \
41 gen-pct.conf.5-opts.pl \
42 gen-vm.conf.5-opts.pl \
9344ee0d
DM
43 gen-pve-firewall-cluster-opts.pl \
44 gen-pve-firewall-host-opts.pl \
45 gen-pve-firewall-macros-adoc.pl \
46 gen-pve-firewall-rules-opts.pl \
f6b81378 47 gen-pve-firewall-vm-opts.pl
9344ee0d 48
deb7f2ea
DM
49PVEUM_SOURCES=attributes.txt pveum.adoc pveum.1-synopsis.adoc
50VZDUMP_SOURCES=attributes.txt vzdump.adoc vzdump.1-synopsis.adoc
deb7f2ea 51QM_SOURCES=attributes.txt qm.adoc qm.1-synopsis.adoc
d61bab51 52PVEAM_SOURCES=attributes.txt pveam.adoc pveam.1-synopsis.adoc
22653ac8 53HA_SOURCES=attributes.txt ha-manager.1-synopsis.adoc ha-manager.adoc
deb7f2ea 54
d91f8c1e
DM
55SYSADMIN_SOURCES= \
56 getting-help.adoc \
57 pve-package-repos.adoc \
58 pve-installation.adoc \
59 system-software-updates.adoc \
60 sysadmin.adoc
61
deb7f2ea 62PVE_ADMIN_GUIDE_SOURCES= \
c016ebb7
DM
63 datacenter.cfg.adoc \
64 datacenter.cfg.5-opts.adoc \
7b2c36ae
DM
65 vm.conf.adoc \
66 vm.conf.5-opts.adoc \
71e16346
DM
67 pct.conf.adoc \
68 pct.conf.5-opts.adoc \
d91f8c1e 69 ${SYSADMIN_SOURCES} \
deb7f2ea
DM
70 pve-admin-guide.adoc \
71 pve-intro.adoc \
72 pmxcfs.adoc \
73 pve-faq.adoc \
9344ee0d 74 ${PVE_FIREWALL_MAN8_SOURCES} \
828a27f5 75 ${PVESM_MAN1_SOURCES} \
f6b81378 76 ${PCT_MAN1_SOURCES} \
d8742b0c 77 ${PVECM_MAN1_SOURCES} \
deb7f2ea 78 ${QM_SOURCES} \
d61bab51 79 ${PVEAM_SOURCES} \
deb7f2ea 80 ${PVEUM_SOURCES} \
deb7f2ea 81 ${VZDUMP_SOURCES} \
22653ac8 82 ${HA_SOURCES} \
deb7f2ea
DM
83 images/cluster-nwdiag.svg \
84 images/node-nwdiag.svg \
85 pve-bibliography.adoc \
caf01dfc 86 GFDL.adoc \
deb7f2ea
DM
87 attributes.txt
88
89ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
bef0c1b4
DM
90ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
91ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
92ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
deb7f2ea 93
fc1090ef 94BROWSER?=xdg-open
df41beec 95
7b2c36ae
DM
96all: pve-admin-guide.html
97
deb7f2ea
DM
98%-nwdiag.svg: %.nwdiag
99 nwdiag -T svg $*.nwdiag -o $@;
100
bef0c1b4
DM
101%.1: %.adoc %.1-synopsis.adoc docinfo.xml attributes.txt
102 a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage $*.adoc
9344ee0d 103 test -n "$${NOVIEW}" || man -l $@
deb7f2ea 104
bef0c1b4 105%.1.html: %.adoc %.1-synopsis.adoc docinfo.xml attributes.txt
deb7f2ea 106 asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
9344ee0d 107 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea
DM
108
109
110%.8-synopsis.adoc:
111 perl -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
112 mv $@.tmp $@
113
114%.8: %.adoc %.8-synopsis.adoc docinfo.xml
bef0c1b4 115 a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage $*.adoc
9344ee0d 116 test -n "$${NOVIEW}" || man -l $@
deb7f2ea
DM
117
118%.8.html: %.adoc %.8-synopsis.adoc docinfo.xml
119 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc
9344ee0d 120 test -n "$${NOVIEW}" || $(BROWSER) $@ &
71e16346 121
c016ebb7
DM
122%.5.html: %.adoc %.5-opts.adoc docinfo.xml
123 asciidoc ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc
9344ee0d 124 test -n "$${NOVIEW}" || $(BROWSER) $@ &
c016ebb7 125
deb7f2ea
DM
126index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
127 $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
d8742b0c 128 $(MAKE) NOVIEW=1 pvecm.1.html 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
bef0c1b4 129 asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc
9344ee0d 130 test -n "$${NOVIEW}" || $(BROWSER) index.html &
deb7f2ea
DM
131
132pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
bef0c1b4 133 asciidoc -a "revnumber=${DOCRELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
9344ee0d 134 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea 135
2296c490 136pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
bef0c1b4 137 grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
27125931 138 a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" pve-admin-guide.adoc
9344ee0d 139 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea
DM
140
141pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
142 a2x -f epub pve-admin-guide.adoc
9344ee0d
DM
143 test -n "$${NOVIEW}" || $(BROWSER) $@ &
144
145.PHONY: dinstall
146dinstall: ${DEB}
147 dpkg -i ${DEB}
148
149.PHONY: deb
150${DEB} deb:
151 rm -rf build
152 mkdir build
153 rsync -a debian/ build/debian
154 mkdir -p build/usr/share/${PACKAGE}
155 install -m 0644 ${DEB_SOURCES} build/usr/share/${PACKAGE}
156 install -m 0755 ${GEN_SCRIPTS} build/usr/share/${PACKAGE}
157 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
158 lintian ${DEB}
159
89e93b38
DM
160.PHONY: upload
161upload: ${DEB}
162 umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o rw
163 mkdir -p /pve/${DOCRELEASE}/extra
164 rm -f /pve/${DOCRELEASE}/extra/${PACKAGE}_*.deb
165 rm -f /pve/${DOCRELEASE}/extra/Packages*
166 cp ${DEB} /pve/${DOCRELEASE}/extra
167 cd /pve/${DOCRELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
168 umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o ro
deb7f2ea 169
c016ebb7
DM
170update: clean
171 rm -f *.5-opts.adoc .1-synopsis.adoc .8-synopsis.adoc
172 make all
deb7f2ea
DM
173
174clean:
9344ee0d
DM
175 rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build
176