3 PACKAGE
=pve-doc-generator
5 # also update debian/changelog
8 DEB
=${PACKAGE}_
${RELEASE}-${PKGREL}_amd64.deb
12 include .
/pve-doc-generator.mk
16 pve-doc-generator.mk \
30 gen-datacenter-cfg-opts-adoc.pl \
31 gen-pct-conf-opts-adoc.pl \
32 gen-pve-firewall-cluster-opts.pl \
33 gen-pve-firewall-host-opts.pl \
34 gen-pve-firewall-macros-adoc.pl \
35 gen-pve-firewall-rules-opts.pl \
36 gen-pve-firewall-vm-opts.pl \
37 gen-vm-conf-opts-adoc.pl
39 PVESM_SOURCES
=attributes.txt pvesm.adoc pvesm
.1-synopsis.adoc
$(shell ls pve-storage-
*.adoc
)
40 PVEUM_SOURCES
=attributes.txt pveum.adoc pveum
.1-synopsis.adoc
41 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
42 QM_SOURCES
=attributes.txt qm.adoc qm
.1-synopsis.adoc
43 PCT_SOURCES
=attributes.txt pct.adoc pct
.1-synopsis.adoc
44 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
45 HA_SOURCES
=attributes.txt ha-manager
.1-synopsis.adoc ha-manager.adoc
49 pve-package-repos.adoc \
50 pve-installation.adoc \
51 system-software-updates.adoc \
54 PVE_ADMIN_GUIDE_SOURCES
= \
56 datacenter.cfg
.5-opts.adoc \
60 pct.conf
.5-opts.adoc \
62 pve-admin-guide.adoc \
66 ${PVE_FIREWALL_MAN8_SOURCES} \
74 images
/cluster-nwdiag.svg \
75 images
/node-nwdiag.svg \
76 pve-bibliography.adoc \
80 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
81 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${RELEASE}"
82 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${RELEASE}"
83 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${RELEASE}"
87 all: pve-admin-guide.html
89 %-nwdiag.svg
: %.nwdiag
90 nwdiag
-T svg
$*.nwdiag
-o
$@
;
93 perl
-e
"use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
96 %.1: %.adoc
%.1-synopsis.adoc docinfo.xml
97 a2x
-a docinfo1
-a
"manvolnum=1" -a
"manversion=Release ${RELEASE}" -f manpage
$*.adoc
98 test -n
"$${NOVIEW}" || man
-l
$@
100 %.1.html
: %.adoc
%.1-synopsis.adoc docinfo.xml
101 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
102 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
106 perl
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
109 %.8: %.adoc
%.8-synopsis.adoc docinfo.xml
110 a2x
-a docinfo1
-a
"manvolnum=8" -a
"manversion=Release ${RELEASE}" -f manpage
$*.adoc
111 test -n
"$${NOVIEW}" || man
-l
$@
113 %.8.html
: %.adoc
%.8-synopsis.adoc docinfo.xml
114 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
115 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
117 %.5: %.adoc
%.5-opts.adoc docinfo.xml
118 a2x
-a docinfo1
-a
"manvolnum=5" -a
"manversion=Release ${RELEASE}" -f manpage
$*.adoc
119 test -n
"$${NOVIEW}" || man
-l
$@
121 %.5.html
: %.adoc
%.5-opts.adoc docinfo.xml
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 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
128 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${RELEASE}" index.adoc
129 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
131 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
132 asciidoc
-a
"revnumber=${RELEASE}" -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 ${RELEASE}<" 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 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
155 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
156 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
161 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
165 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build