3 include .
/pve-doc-generator.mk
5 GEN_PACKAGE
=pve-doc-generator
7 MEDIAWIKI_PACKAGE
=pve-docs-mediawiki
9 # also update debian/changelog
12 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
14 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
16 GEN_DEB
=${GEN_PACKAGE}_
${DOCRELEASE}-${PKGREL}_
${ARCH}.deb
17 DOC_DEB
=${DOC_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
18 MEDIAWIKI_DEB
=${MEDIAWIKI_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
68 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
71 pve-doc-generator.mk \
73 $(addsuffix .adoc
, ${COMMAND_LIST}) \
74 $(addsuffix .adoc
, ${SERVICE_LIST}) \
75 $(addsuffix .adoc
, ${CONFIG_LIST}) \
76 pve-storage-dir.adoc \
77 pve-storage-glusterfs.adoc \
78 pve-storage-iscsi.adoc \
79 pve-storage-iscsidirect.adoc \
80 pve-storage-lvm.adoc \
81 pve-storage-nfs.adoc \
82 pve-storage-rbd.adoc \
83 pve-storage-zfspool.adoc \
89 gen-datacenter.cfg
.5-opts.pl \
90 gen-pct.conf
.5-opts.pl \
91 gen-pct-network-opts.pl \
92 gen-pct-mountpoint-opts.pl \
93 gen-qm.conf
.5-opts.pl \
94 gen-vzdump.conf
.5-opts.pl \
95 gen-pve-firewall-cluster-opts.pl \
96 gen-pve-firewall-host-opts.pl \
97 gen-pve-firewall-macros-adoc.pl \
98 gen-pve-firewall-rules-opts.pl \
99 gen-pve-firewall-vm-opts.pl
106 system-software-updates \
110 $(addsuffix .adoc
, ${SYSADMIN_PARTS}) \
113 API_VIEWER_SOURCES
= \
114 api-viewer
/index.html \
117 PVE_ADMIN_GUIDE_SOURCES
= \
118 ${DATACENTER_CONF_MAN5_SOURCES} \
119 ${QM_CONF_MAN5_SOURCES} \
120 ${PCT_CONF_MAN5_SOURCES} \
121 ${SYSADMIN_SOURCES} \
122 pve-admin-guide.adoc \
127 ${PVE_FIREWALL_MAN8_SOURCES} \
128 ${PVESM_MAN1_SOURCES} \
129 ${PCT_MAN1_SOURCES} \
130 ${PVECM_MAN1_SOURCES} \
131 ${PVEUM_MAN1_SOURCES} \
133 ${QMRESTORE_MAN1_SOURCES} \
134 ${HA_MANAGER_MAN1_SOURCES} \
135 ${PVESTATD_MAN8_SOURCES} \
136 ${PVEDAEMON_MAN8_SOURCES} \
137 ${PVEPROXY_MAN8_SOURCES} \
138 ${SPICEPROXY_MAN8_SOURCES} \
139 ${PVE_HA_CRM_MAN8_SOURCES} \
140 ${PVE_HA_LRM_MAN8_SOURCES} \
141 ${VZDUMP_MAN1_SOURCES} \
142 ${PVEAM_MAN1_SOURCES} \
143 ${PVESUBSCRIPTION_MAN1_SOURCES} \
144 ${PVECEPH_MAN1_SOURCES} \
145 pve-bibliography.adoc \
146 $(addsuffix .adoc
, ${COMMAND_LIST}) \
147 $(addsuffix .adoc
, ${SERVICE_LIST}) \
148 $(addsuffix .adoc
, ${CONFIG_LIST}) \
153 $(addsuffix -plain.html
, $(addprefix sysadmin-
, ${SYSADMIN_PARTS})) \
154 $(addsuffix -plain.html
, $(addprefix chapter-
, ${CHAPTER_LIST})) \
155 $(addsuffix .5-plain.html
, ${CONFIG_LIST}) \
156 $(addsuffix -plain.html
, $(addprefix pve-storage-
, ${STORAGE_TYPES}))
159 pve-admin-guide.pdf \
160 pve-admin-guide.html \
161 pve-admin-guide.epub \
162 $(addsuffix .1.html
, ${COMMAND_LIST}) \
163 $(addsuffix .8.html
, ${SERVICE_LIST}) \
164 $(addsuffix .5.html
, ${CONFIG_LIST}) \
165 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
167 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
168 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG}
169 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG}
170 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG}
176 %-nwdiag.svg
: %.nwdiag
177 nwdiag
-T svg
$*.nwdiag
-o
$@
;
179 sysadmin-
%-plain.html
: %.adoc
180 asciidoc
-s
-a wiki
${ADOC_STDARG} -o
$@
$*.adoc
182 chapter-sysadmin.html chapter-sysadmin-plain.html
: ${SYSADMIN_SOURCES}
184 chapter-
%.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
185 asciidoc
${ADOC_STDARG} -a toc
-o
$@
$*.adoc
187 chapter-
%-plain.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
188 asciidoc
-s
-a wiki
${ADOC_STDARG} -o
$@
$*.adoc
190 pve-storage-
%-plain.html
: pve-storage-
%.adoc
${PVE_COMMON_DOC_SOURCES}
191 asciidoc
-s
-a wiki
-a
'leveloffset=-1' ${ADOC_STDARG} -o
$@ pve-storage-
$*.adoc
193 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
194 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
196 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
197 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
199 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
200 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
202 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
203 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
205 %.5-plain.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
206 asciidoc
-s
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
210 $(BROWSER
) index.html
&
212 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
213 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
215 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
216 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
218 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
219 rm -rf pve-admin-guide.chunked
220 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
222 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
223 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
224 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
226 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
227 a2x
-f epub pve-admin-guide.adoc
229 api-viewer
/apidata.js
: extractapi.pl
232 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
233 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
236 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
237 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
241 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
242 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
244 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES}
247 rsync
-a debian
/ build
/debian
248 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
249 # install files for pve-doc-generator package
250 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
251 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
252 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
253 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
254 # install files for pvedocs package
255 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
256 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
257 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
258 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
259 # install api doc viewer
260 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
261 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
262 # build Debian packages
263 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
266 lintian
${MEDIAWIKI_DEB}
269 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
270 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
274 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
275 rm -f api-viewer
/apidata.js
276 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
280 rm -rf
*.tmp.xml
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build api-viewer
/apidoc.js chapter-
*.html chapter-
*-plain.html chapter-
*.html pve-admin-guide.chunked
281 find .
-name
'*~' -exec
rm {} ';'