3 include .
/pve-doc-generator.mk
5 PACKAGE
=pve-doc-generator
7 # also update debian/changelog
10 DEB
=${PACKAGE}_
${DOCRELEASE}-${PKGREL}_amd64.deb
14 pve-doc-generator.mk \
28 gen-datacenter-cfg-opts-adoc.pl \
29 gen-pct-conf-opts-adoc.pl \
30 gen-pve-firewall-cluster-opts.pl \
31 gen-pve-firewall-host-opts.pl \
32 gen-pve-firewall-macros-adoc.pl \
33 gen-pve-firewall-rules-opts.pl \
34 gen-pve-firewall-vm-opts.pl \
35 gen-vm-conf-opts-adoc.pl
37 PVESM_SOURCES
=attributes.txt pvesm.adoc pvesm
.1-synopsis.adoc
$(shell ls pve-storage-
*.adoc
)
38 PVEUM_SOURCES
=attributes.txt pveum.adoc pveum
.1-synopsis.adoc
39 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
40 QM_SOURCES
=attributes.txt qm.adoc qm
.1-synopsis.adoc
41 PCT_SOURCES
=attributes.txt pct.adoc pct
.1-synopsis.adoc
42 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
43 HA_SOURCES
=attributes.txt ha-manager
.1-synopsis.adoc ha-manager.adoc
47 pve-package-repos.adoc \
48 pve-installation.adoc \
49 system-software-updates.adoc \
52 PVE_ADMIN_GUIDE_SOURCES
= \
54 datacenter.cfg
.5-opts.adoc \
58 pct.conf
.5-opts.adoc \
60 pve-admin-guide.adoc \
64 ${PVE_FIREWALL_MAN8_SOURCES} \
72 images
/cluster-nwdiag.svg \
73 images
/node-nwdiag.svg \
74 pve-bibliography.adoc \
78 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
79 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
80 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
81 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
85 all: pve-admin-guide.html
87 %-nwdiag.svg
: %.nwdiag
88 nwdiag
-T svg
$*.nwdiag
-o
$@
;
90 %.1: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
91 a2x
-a docinfo1
-a
"manvolnum=1" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
92 test -n
"$${NOVIEW}" || man
-l
$@
94 %.1.html
: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
95 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
96 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
100 perl
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
103 %.8: %.adoc
%.8-synopsis.adoc docinfo.xml
104 a2x
-a docinfo1
-a
"manvolnum=8" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
105 test -n
"$${NOVIEW}" || man
-l
$@
107 %.8.html
: %.adoc
%.8-synopsis.adoc docinfo.xml
108 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
109 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
111 %.5: %.adoc
%.5-opts.adoc docinfo.xml
112 a2x
-a docinfo1
-a
"manvolnum=5" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
113 test -n
"$${NOVIEW}" || man
-l
$@
115 %.5.html
: %.adoc
%.5-opts.adoc docinfo.xml
116 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
117 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
119 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES}
120 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
121 $(MAKE
) NOVIEW
=1 qm
.1.html pct
.1.html pveam
.1.html pvesm
.1.html pveum
.1.html vzdump
.1.html pve-firewall
.8.html ha-manager
.1.html datacenter.cfg
.5.html vm.conf
.5.html pct.conf
.5.html
122 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
123 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
125 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
126 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
127 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
129 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
130 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
131 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
132 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
134 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
135 a2x
-f epub pve-admin-guide.adoc
136 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
146 rsync
-a debian
/ build
/debian
147 mkdir
-p build
/usr
/share
/${PACKAGE}
148 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
149 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
150 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
155 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
159 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build