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 .
/asciidoc-pve compile-wiki-section pve-package-repos.adoc
180 #./asciidoc-pve compile-wiki-chapter ha-manager.adoc
183 pve-usbstick-plain.html \
184 getting-help-plain.html \
185 pve-system-requirements-plain.html \
186 $(addsuffix -plain.html
, ${SYSADMIN_PARTS}) \
187 $(addsuffix -plain.html
, ${CHAPTER_LIST}) \
188 $(addsuffix .5-plain.html
, ${CONFIG_LIST}) \
189 $(addsuffix -plain.html
, $(addprefix pve-storage-
, ${STORAGE_TYPES}))
192 pve-admin-guide.pdf \
193 pve-admin-guide.html \
194 pve-admin-guide.epub \
195 $(addsuffix .1.html
, ${COMMAND_LIST}) \
196 $(addsuffix .8.html
, ${SERVICE_LIST}) \
197 $(addsuffix .5.html
, ${CONFIG_LIST}) \
198 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
200 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
201 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG}
202 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG}
203 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG}
209 %-nwdiag.svg
: %.nwdiag
210 nwdiag
-T svg
$*.nwdiag
-o
$@
;
212 %-plain.html
: asciidoc-pve
%.adoc
213 .
/asciidoc-pve compile-wiki
-o
$@
$*.adoc
215 chapter-sysadmin.html sysadmin-plain.html
: ${SYSADMIN_SOURCES}
217 chapter-
%.html
: %.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
218 .
/asciidoc-pve compile-chapter
-o
$@
$*.adoc
220 %.1.html
: %.adoc
%.1-synopsis.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
221 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
223 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
224 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
226 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
227 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
229 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
230 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
232 %.5-plain.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
233 asciidoc
-s
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
235 README.html
: README.adoc
236 asciidoc
${ADOC_STDARG} -o
$@
$<
240 $(BROWSER
) index.html
&
242 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
243 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
245 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
246 asciidoc
-a pvelogo
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
248 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
249 rm -rf pve-admin-guide.chunked
250 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
252 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
253 inkscape
-z
-D
--export-pdf
=proxmox-logo.pdf images
/proxmox-logo.svg
254 inkscape
-z
-D
--export-pdf
=proxmox-ci-header.pdf images
/proxmox-ci-header.svg
255 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
256 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
257 rm proxmox-logo.pdf proxmox-ci-header.pdf
259 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
260 a2x
-f epub pve-admin-guide.adoc
262 api-viewer
/apidata.js
: extractapi.pl
265 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
266 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
269 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
270 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
274 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
275 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
277 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES} asciidoc-pve pve-docs-mediawiki-import
280 rsync
-a debian
/ build
/debian
281 cp pve-docs-mediawiki-import build
/debian
/tree
/pve-docs-mediawiki
/pve-docs-mediawiki-import
282 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
283 # install files for pve-doc-generator package
284 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
285 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
286 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
287 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
288 # install files for pvedocs package
289 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
290 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
291 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
292 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
293 # install api doc viewer
294 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
295 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
296 # build Debian packages
297 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
300 lintian
${MEDIAWIKI_DEB}
303 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
304 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
308 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
309 rm -f api-viewer
/apidata.js
310 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
314 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
315 find .
-name
'*~' -exec
rm {} ';'