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
25 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
28 pve-doc-generator.mk \
30 $(addsuffix .adoc
, ${COMMAND_LIST}) \
31 $(addsuffix .adoc
, ${SERVICE_LIST}) \
32 $(addsuffix .adoc
, ${CONFIG_LIST}) \
33 pve-storage-dir.adoc \
34 pve-storage-glusterfs.adoc \
35 pve-storage-iscsi.adoc \
36 pve-storage-iscsidirect.adoc \
37 pve-storage-lvm.adoc \
38 pve-storage-nfs.adoc \
39 pve-storage-rbd.adoc \
40 pve-storage-zfspool.adoc \
46 gen-datacenter.cfg
.5-opts.pl \
47 gen-pct.conf
.5-opts.pl \
48 gen-qm.conf
.5-opts.pl \
49 gen-pve-firewall-cluster-opts.pl \
50 gen-pve-firewall-host-opts.pl \
51 gen-pve-firewall-macros-adoc.pl \
52 gen-pve-firewall-rules-opts.pl \
53 gen-pve-firewall-vm-opts.pl
55 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
56 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
60 pve-package-repos.adoc \
61 pve-installation.adoc \
62 system-software-updates.adoc \
65 PVE_ADMIN_GUIDE_SOURCES
= \
66 ${DATACENTER_CONF_MAN5_SOURCES} \
67 ${QM_CONF_MAN5_SOURCES} \
68 ${PCT_CONF_MAN5_SOURCES} \
70 pve-admin-guide.adoc \
75 ${PVE_FIREWALL_MAN8_SOURCES} \
76 ${PVESM_MAN1_SOURCES} \
78 ${PVECM_MAN1_SOURCES} \
79 ${PVEUM_MAN1_SOURCES} \
81 ${QMRESTORE_MAN1_SOURCES} \
82 ${HA_MANAGER_MAN1_SOURCES} \
83 ${PVE_HA_CRM_MAN8_SOURCES} \
84 ${PVE_HA_LRM_MAN8_SOURCES} \
87 images
/cluster-nwdiag.svg \
88 images
/node-nwdiag.svg \
89 pve-bibliography.adoc \
90 $(addsuffix .adoc
, ${COMMAND_LIST}) \
91 $(addsuffix .adoc
, ${SERVICE_LIST}) \
92 $(addsuffix .adoc
, ${CONFIG_LIST}) \
96 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
97 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
98 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
99 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
103 all: pve-admin-guide.html
105 %-nwdiag.svg
: %.nwdiag
106 nwdiag
-T svg
$*.nwdiag
-o
$@
;
108 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
109 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
110 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
113 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
114 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
115 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
117 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
118 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
119 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
121 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
122 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
123 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
125 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES}
126 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
127 $(MAKE
) NOVIEW
=1 $(addsuffix .1.html
, ${COMMAND_LIST}) $(addsuffix .8.html
, ${SERVICE_LIST}) $(addsuffix .5.html
, ${CONFIG_LIST})
128 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
129 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
131 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
132 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
133 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
135 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
136 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
137 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
138 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
140 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
141 a2x
-f epub pve-admin-guide.adoc
142 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
152 rsync
-a debian
/ build
/debian
153 mkdir
-p build
/usr
/share
/${PACKAGE}
154 mkdir
-p build
/usr
/share
/doc
/${PACKAGE}
155 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${PACKAGE}/SOURCE
156 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
157 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
158 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
163 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
164 mkdir
-p
/pve
/${DOCRELEASE}/extra
165 rm -f
/pve
/${DOCRELEASE}/extra
/${PACKAGE}_
*.deb
166 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
167 cp
${DEB} /pve
/${DOCRELEASE}/extra
168 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
169 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
172 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
176 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build