2 ASCIIDOC_PVE
=.
/asciidoc-pve
4 include .
/pve-doc-generator.mk
6 GEN_PACKAGE
=pve-doc-generator
8 MEDIAWIKI_PACKAGE
=pve-docs-mediawiki
10 # also update debian/changelog
13 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
15 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
17 GEN_DEB
=${GEN_PACKAGE}_
${DOCRELEASE}-${PKGREL}_
${ARCH}.deb
18 DOC_DEB
=${DOC_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
19 MEDIAWIKI_DEB
=${MEDIAWIKI_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
71 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
74 pve-doc-generator.mk \
76 $(addsuffix .adoc
, ${COMMAND_LIST}) \
77 $(addsuffix .adoc
, ${SERVICE_LIST}) \
78 $(addsuffix .adoc
, ${CONFIG_LIST}) \
79 pve-storage-dir.adoc \
80 pve-storage-glusterfs.adoc \
81 pve-storage-iscsi.adoc \
82 pve-storage-iscsidirect.adoc \
83 pve-storage-lvm.adoc \
84 pve-storage-lvmthin.adoc \
85 pve-storage-nfs.adoc \
86 pve-storage-rbd.adoc \
87 pve-storage-zfspool.adoc \
93 gen-datacenter.cfg
.5-opts.pl \
94 gen-pct.conf
.5-opts.pl \
95 gen-pct-network-opts.pl \
96 gen-pct-mountpoint-opts.pl \
97 gen-qm.conf
.5-opts.pl \
98 gen-vzdump.conf
.5-opts.pl \
99 gen-pve-firewall-cluster-opts.pl \
100 gen-pve-firewall-host-opts.pl \
101 gen-pve-firewall-macros-adoc.pl \
102 gen-pve-firewall-rules-opts.pl \
103 gen-pve-firewall-vm-opts.pl
105 INSTALLATION_SOURCES
= \
107 pve-system-requirements.adoc \
108 pve-installation.adoc
113 system-software-updates \
114 pve-disk-health-monitoring \
119 $(addsuffix .adoc
, ${SYSADMIN_PARTS}) \
122 API_VIEWER_SOURCES
= \
123 api-viewer
/index.html \
126 PVE_ADMIN_GUIDE_SOURCES
= \
127 ${DATACENTER_CONF_MAN5_SOURCES} \
128 ${QM_CONF_MAN5_SOURCES} \
129 ${PCT_CONF_MAN5_SOURCES} \
130 ${SYSADMIN_SOURCES} \
131 pve-admin-guide.adoc \
134 ${INSTALLATION_SOURCES} \
138 ${PVE_FIREWALL_MAN8_SOURCES} \
139 ${PVESM_MAN1_SOURCES} \
140 ${PCT_MAN1_SOURCES} \
141 ${PVECM_MAN1_SOURCES} \
142 ${PVEUM_MAN1_SOURCES} \
144 ${QMRESTORE_MAN1_SOURCES} \
145 ${HA_MANAGER_MAN1_SOURCES} \
146 ${PVESTATD_MAN8_SOURCES} \
147 ${PVEDAEMON_MAN8_SOURCES} \
148 ${PVEPROXY_MAN8_SOURCES} \
149 ${SPICEPROXY_MAN8_SOURCES} \
150 ${PVE_HA_CRM_MAN8_SOURCES} \
151 ${PVE_HA_LRM_MAN8_SOURCES} \
152 ${VZDUMP_MAN1_SOURCES} \
153 ${PVEAM_MAN1_SOURCES} \
154 ${PVESUBSCRIPTION_MAN1_SOURCES} \
155 ${PVECEPH_MAN1_SOURCES} \
156 ${PVEPERF_MAN1_SOURCES} \
157 pve-bibliography.adoc \
158 $(addsuffix .adoc
, ${COMMAND_LIST}) \
159 $(addsuffix .adoc
, ${SERVICE_LIST}) \
160 $(addsuffix .adoc
, ${CONFIG_LIST}) \
164 link-refs.json
: scan-adoc-refs
${PVE_ADMIN_GUIDE_SOURCES}
165 .
/scan-adoc-refs
${PVE_ADMIN_GUIDE_SOURCES} >link-refs.json
167 asciidoc-pve
: asciidoc-pve.in link-refs.json
168 cat asciidoc-pve.in link-refs.json
>asciidoc-pve.tmp
169 sed
-e s
/@RELEASE@
/${DOCRELEASE}/ -i asciidoc-pve.tmp
170 chmod
+x asciidoc-pve.tmp
171 mv asciidoc-pve.tmp asciidoc-pve
173 pve-docs-mediawiki-import
: pve-docs-mediawiki-import.in link-refs.json
174 cat pve-docs-mediawiki-import.in link-refs.json
> pve-docs-mediawiki-import.tmp
175 chmod
+x pve-docs-mediawiki-import.tmp
176 mv pve-docs-mediawiki-import.tmp pve-docs-mediawiki-import
179 pve-usbstick-plain.html \
180 getting-help-plain.html \
181 pve-system-requirements-plain.html \
182 $(addsuffix -plain.html
, ${SYSADMIN_PARTS}) \
183 $(addsuffix -plain.html
, ${CHAPTER_LIST}) \
184 $(addsuffix .5-plain.html
, ${CONFIG_LIST}) \
185 $(addsuffix -plain.html
, $(addprefix pve-storage-
, ${STORAGE_TYPES}))
188 pve-admin-guide.pdf \
189 pve-admin-guide.html \
190 pve-admin-guide.epub \
191 $(addsuffix .1.html
, ${COMMAND_LIST}) \
192 $(addsuffix .8.html
, ${SERVICE_LIST}) \
193 $(addsuffix .5.html
, ${CONFIG_LIST}) \
194 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
196 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
197 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG}
198 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG}
199 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG}
205 %-nwdiag.svg
: %.nwdiag
206 nwdiag
-T svg
$*.nwdiag
-o
$@
;
208 %-plain.html
: asciidoc-pve
%.adoc
209 .
/asciidoc-pve compile-wiki
-o
$@
$*.adoc
211 chapter-sysadmin.html sysadmin-plain.html
: ${SYSADMIN_SOURCES}
213 chapter-
%.html
: %.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
214 .
/asciidoc-pve compile-chapter
-o
$@
$*.adoc
216 %.1.html
: %.adoc
%.1-synopsis.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
217 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
219 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
220 .
/asciidoc-pve compile-man-html
-o
$@ pmxcfs.adoc
222 %.8.html
: %.adoc
%.8-synopsis.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
223 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
225 %.5.html
: %.adoc
%.5-opts.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
226 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
228 %.5-plain.html
: %.adoc
%.5-opts.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
229 .
/asciidoc-pve compile-man-wiki
-o
$@
$*.adoc
231 README.html
: README.adoc
232 asciidoc
${ADOC_STDARG} -o
$@
$<
236 $(BROWSER
) index.html
&
238 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
239 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
241 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
242 asciidoc
-a pvelogo
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
244 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
245 rm -rf pve-admin-guide.chunked
246 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
248 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
249 inkscape
-z
-D
--export-pdf
=proxmox-logo.pdf images
/proxmox-logo.svg
250 inkscape
-z
-D
--export-pdf
=proxmox-ci-header.pdf images
/proxmox-ci-header.svg
251 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
252 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" --dblatex-opts
"-P doc.publisher.show=0 -s asciidoc-dblatex-custom.sty" pve-admin-guide.adoc
253 rm proxmox-logo.pdf proxmox-ci-header.pdf
255 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
256 a2x
-f epub pve-admin-guide.adoc
258 api-viewer
/apidata.js
: extractapi.pl
261 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
262 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
265 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
266 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
270 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
271 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
273 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES} asciidoc-pve pve-docs-mediawiki-import
276 rsync
-a debian
/ build
/debian
277 cp pve-docs-mediawiki-import build
/debian
/tree
/pve-docs-mediawiki
/pve-docs-mediawiki-import
278 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
279 # install files for pve-doc-generator package
280 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
281 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
282 mkdir
-p build
/usr
/bin
283 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
284 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
285 install -m
0755 asciidoc-pve build
/usr
/bin
/
286 # install files for pvedocs package
287 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
288 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
289 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
290 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
291 # install api doc viewer
292 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
293 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
294 # build Debian packages
295 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
298 lintian
${MEDIAWIKI_DEB}
301 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
302 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
306 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
307 rm -f api-viewer
/apidata.js
308 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
312 rm -rf
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build api-viewer
/apidoc.js chapter-
*.html
*-plain.html chapter-
*.html pve-admin-guide.chunked asciidoc-pve link-refs.json .asciidoc-pve-tmp_
* pve-docs-mediawiki-import
313 find .
-name
'*~' -exec
rm {} ';'