3 include .
/pve-doc-generator.mk
5 PACKAGE
=pve-doc-generator
7 # also update debian/changelog
10 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
12 DEB
=${PACKAGE}_
${DOCRELEASE}-${PKGREL}_amd64.deb
14 COMMAND_LIST
=pvecm qm qmrestore pct pveam pvesm pveum vzdump ha-manager
26 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
29 pve-doc-generator.mk \
31 $(addsuffix .adoc
, ${COMMAND_LIST}) \
32 $(addsuffix .adoc
, ${SERVICE_LIST}) \
33 $(addsuffix .adoc
, ${CONFIG_LIST}) \
34 pve-storage-dir.adoc \
35 pve-storage-glusterfs.adoc \
36 pve-storage-iscsi.adoc \
37 pve-storage-iscsidirect.adoc \
38 pve-storage-lvm.adoc \
39 pve-storage-nfs.adoc \
40 pve-storage-rbd.adoc \
41 pve-storage-zfspool.adoc \
47 gen-datacenter.cfg
.5-opts.pl \
48 gen-pct.conf
.5-opts.pl \
49 gen-qm.conf
.5-opts.pl \
50 gen-pve-firewall-cluster-opts.pl \
51 gen-pve-firewall-host-opts.pl \
52 gen-pve-firewall-macros-adoc.pl \
53 gen-pve-firewall-rules-opts.pl \
54 gen-pve-firewall-vm-opts.pl
56 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
57 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
61 pve-package-repos.adoc \
62 pve-installation.adoc \
63 system-software-updates.adoc \
66 PVE_ADMIN_GUIDE_SOURCES
= \
67 ${DATACENTER_CONF_MAN5_SOURCES} \
68 ${QM_CONF_MAN5_SOURCES} \
69 ${PCT_CONF_MAN5_SOURCES} \
71 pve-admin-guide.adoc \
76 ${PVE_FIREWALL_MAN8_SOURCES} \
77 ${PVESM_MAN1_SOURCES} \
79 ${PVECM_MAN1_SOURCES} \
80 ${PVEUM_MAN1_SOURCES} \
82 ${QMRESTORE_MAN1_SOURCES} \
83 ${HA_MANAGER_MAN1_SOURCES} \
84 ${PVESTATD_MAN8_SOURCES} \
85 ${PVEDAEMON_MAN8_SOURCES} \
86 ${PVEPROXY_MAN8_SOURCES} \
87 ${SPICEPROXY_MAN8_SOURCES} \
88 ${PVE_HA_CRM_MAN8_SOURCES} \
89 ${PVE_HA_LRM_MAN8_SOURCES} \
92 images
/cluster-nwdiag.svg \
93 images
/node-nwdiag.svg \
94 pve-bibliography.adoc \
95 $(addsuffix .adoc
, ${COMMAND_LIST}) \
96 $(addsuffix .adoc
, ${SERVICE_LIST}) \
97 $(addsuffix .adoc
, ${CONFIG_LIST}) \
101 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
102 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
103 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
104 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
108 all: pve-admin-guide.html
110 %-nwdiag.svg
: %.nwdiag
111 nwdiag
-T svg
$*.nwdiag
-o
$@
;
113 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
114 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
115 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
118 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
119 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
120 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
122 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
123 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
124 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
126 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
127 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
128 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
130 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES}
131 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
132 $(MAKE
) NOVIEW
=1 $(addsuffix .1.html
, ${COMMAND_LIST}) $(addsuffix .8.html
, ${SERVICE_LIST}) $(addsuffix .5.html
, ${CONFIG_LIST})
133 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
134 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
136 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
137 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
138 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
140 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
141 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
142 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
143 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
145 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
146 a2x
-f epub pve-admin-guide.adoc
147 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
157 rsync
-a debian
/ build
/debian
158 mkdir
-p build
/usr
/share
/${PACKAGE}
159 mkdir
-p build
/usr
/share
/doc
/${PACKAGE}
160 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${PACKAGE}/SOURCE
161 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
162 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
163 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
168 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
169 mkdir
-p
/pve
/${DOCRELEASE}/extra
170 rm -f
/pve
/${DOCRELEASE}/extra
/${PACKAGE}_
*.deb
171 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
172 cp
${DEB} /pve
/${DOCRELEASE}/extra
173 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
174 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
177 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
181 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build