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
16 SERVICE_LIST
=pve-firewall pve-ha-crm pve-ha-lrm pvestatd pmxcfs
18 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
21 pve-doc-generator.mk \
23 $(addsuffix .adoc
, ${COMMAND_LIST}) \
24 $(addsuffix .adoc
, ${SERVICE_LIST}) \
25 $(addsuffix .adoc
, ${CONFIG_LIST}) \
26 pve-storage-dir.adoc \
27 pve-storage-glusterfs.adoc \
28 pve-storage-iscsi.adoc \
29 pve-storage-iscsidirect.adoc \
30 pve-storage-lvm.adoc \
31 pve-storage-nfs.adoc \
32 pve-storage-rbd.adoc \
33 pve-storage-zfspool.adoc \
39 gen-datacenter.cfg
.5-opts.pl \
40 gen-pct.conf
.5-opts.pl \
41 gen-qm.conf
.5-opts.pl \
42 gen-pve-firewall-cluster-opts.pl \
43 gen-pve-firewall-host-opts.pl \
44 gen-pve-firewall-macros-adoc.pl \
45 gen-pve-firewall-rules-opts.pl \
46 gen-pve-firewall-vm-opts.pl
48 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
49 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
53 pve-package-repos.adoc \
54 pve-installation.adoc \
55 system-software-updates.adoc \
58 PVE_ADMIN_GUIDE_SOURCES
= \
59 ${DATACENTER_CONF_MAN5_SOURCES} \
60 ${QM_CONF_MAN5_SOURCES} \
61 ${PCT_CONF_MAN5_SOURCES} \
63 pve-admin-guide.adoc \
68 ${PVE_FIREWALL_MAN8_SOURCES} \
69 ${PVESM_MAN1_SOURCES} \
71 ${PVECM_MAN1_SOURCES} \
72 ${PVEUM_MAN1_SOURCES} \
74 ${QMRESTORE_MAN1_SOURCES} \
75 ${HA_MANAGER_MAN1_SOURCES} \
76 ${PVE_HA_CRM_MAN8_SOURCES} \
77 ${PVE_HA_LRM_MAN8_SOURCES} \
80 images
/cluster-nwdiag.svg \
81 images
/node-nwdiag.svg \
82 pve-bibliography.adoc \
83 $(addsuffix .adoc
, ${COMMAND_LIST}) \
84 $(addsuffix .adoc
, ${SERVICE_LIST}) \
85 $(addsuffix .adoc
, ${CONFIG_LIST}) \
89 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
90 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
91 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
92 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
96 all: pve-admin-guide.html
98 %-nwdiag.svg
: %.nwdiag
99 nwdiag
-T svg
$*.nwdiag
-o
$@
;
101 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
102 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
103 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
106 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
107 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
108 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
110 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
111 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
112 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
114 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
115 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
116 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
118 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES}
119 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
120 $(MAKE
) NOVIEW
=1 $(addsuffix .1.html
, ${COMMAND_LIST}) $(addsuffix .8.html
, ${SERVICE_LIST}) $(addsuffix .5.html
, ${CONFIG_LIST})
121 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
122 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
124 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
125 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
126 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
128 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
129 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
130 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
131 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
133 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
134 a2x
-f epub pve-admin-guide.adoc
135 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
145 rsync
-a debian
/ build
/debian
146 mkdir
-p build
/usr
/share
/${PACKAGE}
147 mkdir
-p build
/usr
/share
/doc
/${PACKAGE}
148 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${PACKAGE}/SOURCE
149 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
150 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
151 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
156 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
157 mkdir
-p
/pve
/${DOCRELEASE}/extra
158 rm -f
/pve
/${DOCRELEASE}/extra
/${PACKAGE}_
*.deb
159 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
160 cp
${DEB} /pve
/${DOCRELEASE}/extra
161 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
162 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
165 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
169 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build