3 include .
/pve-doc-generator.mk
5 GEN_PACKAGE
=pve-doc-generator
8 # also update debian/changelog
10 # also update doc-debian/changelog
13 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
15 GEN_DEB
=${GEN_PACKAGE}_
${DOCRELEASE}-${GEN_PKGREL}_amd64.deb
16 DOC_DEB
=${DOC_PACKAGE}_
${DOCRELEASE}-${DOC_PKGREL}_all.deb
56 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
59 pve-doc-generator.mk \
61 $(addsuffix .adoc
, ${COMMAND_LIST}) \
62 $(addsuffix .adoc
, ${SERVICE_LIST}) \
63 $(addsuffix .adoc
, ${CONFIG_LIST}) \
64 pve-storage-dir.adoc \
65 pve-storage-glusterfs.adoc \
66 pve-storage-iscsi.adoc \
67 pve-storage-iscsidirect.adoc \
68 pve-storage-lvm.adoc \
69 pve-storage-nfs.adoc \
70 pve-storage-rbd.adoc \
71 pve-storage-zfspool.adoc \
77 gen-datacenter.cfg
.5-opts.pl \
78 gen-pct.conf
.5-opts.pl \
79 gen-qm.conf
.5-opts.pl \
80 gen-vzdump.conf
.5-opts.pl \
81 gen-pve-firewall-cluster-opts.pl \
82 gen-pve-firewall-host-opts.pl \
83 gen-pve-firewall-macros-adoc.pl \
84 gen-pve-firewall-rules-opts.pl \
85 gen-pve-firewall-vm-opts.pl
89 pve-package-repos.adoc \
90 pve-installation.adoc \
91 system-software-updates.adoc \
95 api-viewer
/index.html \
98 PVE_ADMIN_GUIDE_SOURCES
= \
99 ${DATACENTER_CONF_MAN5_SOURCES} \
100 ${QM_CONF_MAN5_SOURCES} \
101 ${PCT_CONF_MAN5_SOURCES} \
102 ${SYSADMIN_SOURCES} \
103 pve-admin-guide.adoc \
108 ${PVE_FIREWALL_MAN8_SOURCES} \
109 ${PVESM_MAN1_SOURCES} \
110 ${PCT_MAN1_SOURCES} \
111 ${PVECM_MAN1_SOURCES} \
112 ${PVEUM_MAN1_SOURCES} \
114 ${QMRESTORE_MAN1_SOURCES} \
115 ${HA_MANAGER_MAN1_SOURCES} \
116 ${PVESTATD_MAN8_SOURCES} \
117 ${PVEDAEMON_MAN8_SOURCES} \
118 ${PVEPROXY_MAN8_SOURCES} \
119 ${SPICEPROXY_MAN8_SOURCES} \
120 ${PVE_HA_CRM_MAN8_SOURCES} \
121 ${PVE_HA_LRM_MAN8_SOURCES} \
122 ${VZDUMP_MAN1_SOURCES} \
123 ${PVEAM_MAN1_SOURCES} \
124 ${PVESUBSCRIPTION_MAN1_SOURCES} \
125 ${PVECEPH_MAN1_SOURCES} \
126 pve-bibliography.adoc \
127 $(addsuffix .adoc
, ${COMMAND_LIST}) \
128 $(addsuffix .adoc
, ${SERVICE_LIST}) \
129 $(addsuffix .adoc
, ${CONFIG_LIST}) \
133 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
134 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
135 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
136 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
142 %-nwdiag.svg
: %.nwdiag
143 nwdiag
-T svg
$*.nwdiag
-o
$@
;
145 chapter-
%.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
146 asciidoc
${ADOC_STDARG} -a toc
-o
$@
$*.adoc
147 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
149 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
150 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
151 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
154 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
155 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
156 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
158 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
159 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
160 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
162 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
163 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
164 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
168 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
170 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES} ${API_VIEWER_SOURCES}
171 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
172 $(MAKE
) NOVIEW
=1 $(addsuffix .1.html
, ${COMMAND_LIST}) $(addsuffix .8.html
, ${SERVICE_LIST}) $(addsuffix .5.html
, ${CONFIG_LIST})
173 $(MAKE
) NOVIEW
=1 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
174 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
176 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
177 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
178 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
180 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
181 rm -rf pve-admin-guide.chunked
182 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
183 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
/index.html
&
185 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
186 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
187 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
188 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
190 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
191 a2x
-f epub pve-admin-guide.adoc
192 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
194 api-viewer
/apidata.js
: extractapi.pl
197 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
198 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
201 dinstall
: ${GEN_DEB} ${DOC_DEB}
202 dpkg
-i
${GEN_DEB} ${DOC_DEB}
207 rm -f
${GEN_DEB} ${DOC_DEB};
212 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST})) \
213 $(addsuffix .1.html
, ${COMMAND_LIST}) \
214 $(addsuffix .8.html
, ${SERVICE_LIST}) \
215 $(addsuffix .5.html
, ${CONFIG_LIST}) \
216 pve-admin-guide.pdf \
217 pve-admin-guide.html \
218 pve-admin-guide.epub \
221 ${DOC_DEB}: index.html
224 rsync
-a doc-debian
/ build
/debian
225 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
226 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
227 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${DOC_PACKAGE}/SOURCE
229 install -m
0644 ${DOC_DEB_FILES} build
/usr
/share
/${DOC_PACKAGE}
230 # install api doc viewer
231 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
232 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
233 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
236 ${GEN_DEB}: ${GEN_DEB_SOURCES}
239 rsync
-a debian
/ build
/debian
240 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
241 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
242 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${GEN_PACKAGE}/SOURCE
243 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
244 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
245 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
249 upload
: ${GEN_DEB} ${DOC_DEB}
250 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
251 mkdir
-p
/pve
/${DOCRELEASE}/extra
252 rm -f
/pve
/${DOCRELEASE}/extra
/${GEN_PACKAGE}_
*.deb
253 rm -f
/pve
/${DOCRELEASE}/extra
/${DOC_PACKAGE}_
*.deb
254 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
255 cp
${GEN_DEB} ${DOC_DEB} /pve
/${DOCRELEASE}/extra
256 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
257 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
261 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
262 rm -f api-viewer
/apidata.js
263 rm -f pve-firewall-macros.adoc
267 rm -rf
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build api-viewer
/apidoc.js chapter-
*.html pve-admin-guide.chunked
268 find .
-name
'*~' -exec
rm {} ';'