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
16 pve-doc-generator.mk \
19 pve-storage-dir.adoc \
20 pve-storage-glusterfs.adoc \
21 pve-storage-iscsi.adoc \
22 pve-storage-iscsidirect.adoc \
23 pve-storage-lvm.adoc \
24 pve-storage-nfs.adoc \
25 pve-storage-rbd.adoc \
26 pve-storage-zfspool.adoc \
42 gen-datacenter.cfg
.5-opts.pl \
43 gen-pct.conf
.5-opts.pl \
44 gen-vm.conf
.5-opts.pl \
45 gen-pve-firewall-cluster-opts.pl \
46 gen-pve-firewall-host-opts.pl \
47 gen-pve-firewall-macros-adoc.pl \
48 gen-pve-firewall-rules-opts.pl \
49 gen-pve-firewall-vm-opts.pl
51 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
52 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
53 HA_SOURCES
=attributes.txt ha-manager
.1-synopsis.adoc ha-manager.adoc
57 pve-package-repos.adoc \
58 pve-installation.adoc \
59 system-software-updates.adoc \
62 PVE_ADMIN_GUIDE_SOURCES
= \
64 datacenter.cfg
.5-opts.adoc \
68 pct.conf
.5-opts.adoc \
70 pve-admin-guide.adoc \
74 ${PVE_FIREWALL_MAN8_SOURCES} \
75 ${PVESM_MAN1_SOURCES} \
77 ${PVECM_MAN1_SOURCES} \
78 ${PVEUM_MAN1_SOURCES} \
83 images
/cluster-nwdiag.svg \
84 images
/node-nwdiag.svg \
85 pve-bibliography.adoc \
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: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
102 a2x
-a docinfo1
-a
"manvolnum=1" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
103 test -n
"$${NOVIEW}" || man
-l
$@
105 %.1.html
: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
106 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
107 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
111 perl
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
114 %.8: %.adoc
%.8-synopsis.adoc docinfo.xml
115 a2x
-a docinfo1
-a
"manvolnum=8" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
116 test -n
"$${NOVIEW}" || man
-l
$@
118 %.8.html
: %.adoc
%.8-synopsis.adoc docinfo.xml
119 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
120 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
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 pvecm
.1.html 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 mkdir
-p build
/usr
/share
/doc
/${PACKAGE}
156 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${PACKAGE}/SOURCE
157 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
158 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
159 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
164 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
165 mkdir
-p
/pve
/${DOCRELEASE}/extra
166 rm -f
/pve
/${DOCRELEASE}/extra
/${PACKAGE}_
*.deb
167 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
168 cp
${DEB} /pve
/${DOCRELEASE}/extra
169 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
170 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
173 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
177 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build