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 \
17 pve-storage-dir.adoc \
18 pve-storage-glusterfs.adoc \
19 pve-storage-iscsi.adoc \
20 pve-storage-iscsidirect.adoc \
21 pve-storage-lvm.adoc \
22 pve-storage-nfs.adoc \
23 pve-storage-rbd.adoc \
24 pve-storage-zfspool.adoc \
36 gen-datacenter-cfg-opts-adoc.pl \
37 gen-pct-conf-opts-adoc.pl \
38 gen-pve-firewall-cluster-opts.pl \
39 gen-pve-firewall-host-opts.pl \
40 gen-pve-firewall-macros-adoc.pl \
41 gen-pve-firewall-rules-opts.pl \
42 gen-pve-firewall-vm-opts.pl \
43 gen-vm-conf-opts-adoc.pl
45 PVEUM_SOURCES
=attributes.txt pveum.adoc pveum
.1-synopsis.adoc
46 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
47 QM_SOURCES
=attributes.txt qm.adoc qm
.1-synopsis.adoc
48 PCT_SOURCES
=attributes.txt pct.adoc pct
.1-synopsis.adoc
49 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
50 HA_SOURCES
=attributes.txt ha-manager
.1-synopsis.adoc ha-manager.adoc
54 pve-package-repos.adoc \
55 pve-installation.adoc \
56 system-software-updates.adoc \
59 PVE_ADMIN_GUIDE_SOURCES
= \
61 datacenter.cfg
.5-opts.adoc \
65 pct.conf
.5-opts.adoc \
67 pve-admin-guide.adoc \
71 ${PVE_FIREWALL_MAN8_SOURCES} \
72 ${PVESM_MAN1_SOURCES} \
79 images
/cluster-nwdiag.svg \
80 images
/node-nwdiag.svg \
81 pve-bibliography.adoc \
85 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
86 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
87 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
88 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
92 all: pve-admin-guide.html
94 %-nwdiag.svg
: %.nwdiag
95 nwdiag
-T svg
$*.nwdiag
-o
$@
;
97 %.1: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
98 a2x
-a docinfo1
-a
"manvolnum=1" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
99 test -n
"$${NOVIEW}" || man
-l
$@
101 %.1.html
: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
102 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
103 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
107 perl
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
110 %.8: %.adoc
%.8-synopsis.adoc docinfo.xml
111 a2x
-a docinfo1
-a
"manvolnum=8" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
112 test -n
"$${NOVIEW}" || man
-l
$@
114 %.8.html
: %.adoc
%.8-synopsis.adoc docinfo.xml
115 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
116 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
118 %.5: %.adoc
%.5-opts.adoc docinfo.xml
119 a2x
-a docinfo1
-a
"manvolnum=5" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
120 test -n
"$${NOVIEW}" || man
-l
$@
122 %.5.html
: %.adoc
%.5-opts.adoc docinfo.xml
123 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
124 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
126 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES}
127 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
128 $(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
129 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
130 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
132 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
133 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
134 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
136 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
137 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
138 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
139 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
141 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
142 a2x
-f epub pve-admin-guide.adoc
143 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
153 rsync
-a debian
/ build
/debian
154 mkdir
-p build
/usr
/share
/${PACKAGE}
155 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
156 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
157 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
162 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
163 mkdir
-p
/pve
/${DOCRELEASE}/extra
164 rm -f
/pve
/${DOCRELEASE}/extra
/${PACKAGE}_
*.deb
165 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
166 cp
${DEB} /pve
/${DOCRELEASE}/extra
167 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
168 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
171 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
175 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build