vzdump.adoc: add note that values can be specified on command line
[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
b4f3c18a
DM
10GITVERSION:=$(shell cat .git/refs/heads/master)
11
bef0c1b4 12DEB=${PACKAGE}_${DOCRELEASE}-${PKGREL}_amd64.deb
9344ee0d 13
ebd2a7fb
DM
14COMMAND_LIST= \
15 pvesubscription \
16 pvecm \
17 qm \
18 qmrestore \
0840a663 19 pveceph \
ebd2a7fb
DM
20 pct \
21 pveam \
22 pvesm \
23 pveum \
24 vzdump \
25 ha-manager
672abac1 26
96f2beeb
DM
27SERVICE_LIST= \
28 pve-firewall \
29 pve-ha-crm \
30 pve-ha-lrm \
31 pvestatd \
32 pmxcfs \
33 pveproxy \
2d8f1c92 34 spiceproxy \
96f2beeb 35 pvedaemon
672abac1
DM
36
37CONFIG_LIST=datacenter.cfg qm.conf pct.conf
38
39DEB_SOURCES= \
40 pve-doc-generator.mk \
41 attributes.txt \
42 $(addsuffix .adoc, ${COMMAND_LIST}) \
43 $(addsuffix .adoc, ${SERVICE_LIST}) \
44 $(addsuffix .adoc, ${CONFIG_LIST}) \
45 pve-storage-dir.adoc \
46 pve-storage-glusterfs.adoc \
47 pve-storage-iscsi.adoc \
48 pve-storage-iscsidirect.adoc \
49 pve-storage-lvm.adoc \
50 pve-storage-nfs.adoc \
51 pve-storage-rbd.adoc \
52 pve-storage-zfspool.adoc \
bd88f9d9 53 pmxcfs.8-cli.adoc \
672abac1 54 pve-copyright.adoc \
9344ee0d
DM
55 docinfo.xml
56
57GEN_SCRIPTS= \
f6b81378
DM
58 gen-datacenter.cfg.5-opts.pl \
59 gen-pct.conf.5-opts.pl \
9b4799ab 60 gen-qm.conf.5-opts.pl \
9344ee0d
DM
61 gen-pve-firewall-cluster-opts.pl \
62 gen-pve-firewall-host-opts.pl \
63 gen-pve-firewall-macros-adoc.pl \
64 gen-pve-firewall-rules-opts.pl \
f6b81378 65 gen-pve-firewall-vm-opts.pl
9344ee0d 66
672abac1
DM
67SYSADMIN_SOURCES= \
68 getting-help.adoc \
69 pve-package-repos.adoc \
70 pve-installation.adoc \
71 system-software-updates.adoc \
d91f8c1e
DM
72 sysadmin.adoc
73
672abac1
DM
74PVE_ADMIN_GUIDE_SOURCES= \
75 ${DATACENTER_CONF_MAN5_SOURCES} \
76 ${QM_CONF_MAN5_SOURCES} \
77 ${PCT_CONF_MAN5_SOURCES} \
78 ${SYSADMIN_SOURCES} \
79 pve-admin-guide.adoc \
80 pve-intro.adoc \
81 pmxcfs.adoc \
bd88f9d9 82 pmxcfs.8-cli.adoc \
672abac1
DM
83 pve-faq.adoc \
84 ${PVE_FIREWALL_MAN8_SOURCES} \
85 ${PVESM_MAN1_SOURCES} \
86 ${PCT_MAN1_SOURCES} \
87 ${PVECM_MAN1_SOURCES} \
88 ${PVEUM_MAN1_SOURCES} \
89 ${QM_MAN1_SOURCES} \
90 ${QMRESTORE_MAN1_SOURCES} \
91 ${HA_MANAGER_MAN1_SOURCES} \
2d8f1c92
DM
92 ${PVESTATD_MAN8_SOURCES} \
93 ${PVEDAEMON_MAN8_SOURCES} \
94 ${PVEPROXY_MAN8_SOURCES} \
95 ${SPICEPROXY_MAN8_SOURCES} \
672abac1
DM
96 ${PVE_HA_CRM_MAN8_SOURCES} \
97 ${PVE_HA_LRM_MAN8_SOURCES} \
6198e7c5
DM
98 ${VZDUMP_MAN1_SOURCES} \
99 ${PVEAM_MAN1_SOURCES} \
ebd2a7fb 100 ${PVESUBSCRIPTION_MAN1_SOURCES} \
0840a663 101 ${PVECEPH_MAN1_SOURCES} \
672abac1
DM
102 images/cluster-nwdiag.svg \
103 images/node-nwdiag.svg \
104 pve-bibliography.adoc \
105 $(addsuffix .adoc, ${COMMAND_LIST}) \
106 $(addsuffix .adoc, ${SERVICE_LIST}) \
107 $(addsuffix .adoc, ${CONFIG_LIST}) \
108 GFDL.adoc \
deb7f2ea
DM
109 attributes.txt
110
111ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
bef0c1b4
DM
112ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
113ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
114ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
deb7f2ea 115
fc1090ef 116BROWSER?=xdg-open
df41beec 117
7b2c36ae
DM
118all: pve-admin-guide.html
119
deb7f2ea
DM
120%-nwdiag.svg: %.nwdiag
121 nwdiag -T svg $*.nwdiag -o $@;
122
bd88f9d9 123%.1.html: %.adoc %.1-synopsis.adoc ${PVE_COMMON_DOC_SOURCES}
deb7f2ea 124 asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
9344ee0d 125 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea
DM
126
127
7c40c631
DM
128pmxcfs.8.html: pmxcfs.adoc pmxcfs.8-cli.adoc ${PVE_COMMON_DOC_SOURCES}
129 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ pmxcfs.adoc
130 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea 131
7c40c631 132%.8.html: %.adoc %.8-synopsis.adoc ${PVE_COMMON_DOC_SOURCES}
deb7f2ea 133 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc
9344ee0d 134 test -n "$${NOVIEW}" || $(BROWSER) $@ &
71e16346 135
7c40c631 136%.5.html: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
c016ebb7 137 asciidoc ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc
9344ee0d 138 test -n "$${NOVIEW}" || $(BROWSER) $@ &
c016ebb7 139
deb7f2ea
DM
140index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
141 $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
672abac1 142 $(MAKE) NOVIEW=1 $(addsuffix .1.html, ${COMMAND_LIST}) $(addsuffix .8.html, ${SERVICE_LIST}) $(addsuffix .5.html, ${CONFIG_LIST})
bef0c1b4 143 asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc
9344ee0d 144 test -n "$${NOVIEW}" || $(BROWSER) index.html &
deb7f2ea
DM
145
146pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
bef0c1b4 147 asciidoc -a "revnumber=${DOCRELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
9344ee0d 148 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea 149
2296c490 150pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
bef0c1b4 151 grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
27125931 152 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 153 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea
DM
154
155pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
156 a2x -f epub pve-admin-guide.adoc
9344ee0d
DM
157 test -n "$${NOVIEW}" || $(BROWSER) $@ &
158
159.PHONY: dinstall
160dinstall: ${DEB}
161 dpkg -i ${DEB}
162
163.PHONY: deb
78859703 164${DEB} deb: ${DEB_SOURCES}
9344ee0d
DM
165 rm -rf build
166 mkdir build
167 rsync -a debian/ build/debian
168 mkdir -p build/usr/share/${PACKAGE}
b4f3c18a
DM
169 mkdir -p build/usr/share/doc/${PACKAGE}
170 echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${PACKAGE}/SOURCE
9344ee0d
DM
171 install -m 0644 ${DEB_SOURCES} build/usr/share/${PACKAGE}
172 install -m 0755 ${GEN_SCRIPTS} build/usr/share/${PACKAGE}
173 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
174 lintian ${DEB}
175
89e93b38
DM
176.PHONY: upload
177upload: ${DEB}
178 umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o rw
179 mkdir -p /pve/${DOCRELEASE}/extra
180 rm -f /pve/${DOCRELEASE}/extra/${PACKAGE}_*.deb
181 rm -f /pve/${DOCRELEASE}/extra/Packages*
182 cp ${DEB} /pve/${DOCRELEASE}/extra
183 cd /pve/${DOCRELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
184 umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o ro
deb7f2ea 185
c016ebb7
DM
186update: clean
187 rm -f *.5-opts.adoc .1-synopsis.adoc .8-synopsis.adoc
188 make all
deb7f2ea
DM
189
190clean:
9344ee0d
DM
191 rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build
192