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 \
44 gen-datacenter.cfg
.5-opts.pl \
45 gen-pct.conf
.5-opts.pl \
46 gen-vm.conf
.5-opts.pl \
47 gen-pve-firewall-cluster-opts.pl \
48 gen-pve-firewall-host-opts.pl \
49 gen-pve-firewall-macros-adoc.pl \
50 gen-pve-firewall-rules-opts.pl \
51 gen-pve-firewall-vm-opts.pl
53 VZDUMP_SOURCES
=attributes.txt vzdump.adoc vzdump
.1-synopsis.adoc
54 PVEAM_SOURCES
=attributes.txt pveam.adoc pveam
.1-synopsis.adoc
58 pve-package-repos.adoc \
59 pve-installation.adoc \
60 system-software-updates.adoc \
63 PVE_ADMIN_GUIDE_SOURCES
= \
65 datacenter.cfg
.5-opts.adoc \
69 pct.conf
.5-opts.adoc \
71 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} \
86 images
/cluster-nwdiag.svg \
87 images
/node-nwdiag.svg \
88 pve-bibliography.adoc \
92 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)"
93 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
94 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
95 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG} -a
"revnumber=${DOCRELEASE}"
99 all: pve-admin-guide.html
101 %-nwdiag.svg
: %.nwdiag
102 nwdiag
-T svg
$*.nwdiag
-o
$@
;
104 %.1: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
105 a2x
-a docinfo1
-a
"manvolnum=1" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
106 test -n
"$${NOVIEW}" || man
-l
$@
108 %.1.html
: %.adoc
%.1-synopsis.adoc docinfo.xml attributes.txt
109 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
110 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
114 perl
-e
"use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
117 %.8: %.adoc
%.8-synopsis.adoc docinfo.xml
118 a2x
-a docinfo1
-a
"manvolnum=8" -a
"manversion=Release ${DOCRELEASE}" -f manpage
$*.adoc
119 test -n
"$${NOVIEW}" || man
-l
$@
121 %.8.html
: %.adoc
%.8-synopsis.adoc docinfo.xml
122 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
123 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
125 %.5.html
: %.adoc
%.5-opts.adoc docinfo.xml
126 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
127 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
129 index.html
: index.adoc
${PVE_ADMIN_GUIDE_SOURCES}
130 $(MAKE
) NOVIEW
=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
131 $(MAKE
) NOVIEW
=1 pvecm
.1.html qm
.1.html qmrestore
.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 pve-ha-crm
.8.html datacenter.cfg
.5.html vm.conf
.5.html pct.conf
.5.html
132 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
133 test -n
"$${NOVIEW}" ||
$(BROWSER
) index.html
&
135 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
136 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
137 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
139 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
140 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
141 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
142 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
144 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
145 a2x
-f epub pve-admin-guide.adoc
146 test -n
"$${NOVIEW}" ||
$(BROWSER
) $@
&
156 rsync
-a debian
/ build
/debian
157 mkdir
-p build
/usr
/share
/${PACKAGE}
158 mkdir
-p build
/usr
/share
/doc
/${PACKAGE}
159 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/usr
/share
/doc
/${PACKAGE}/SOURCE
160 install -m
0644 ${DEB_SOURCES} build
/usr
/share
/${PACKAGE}
161 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${PACKAGE}
162 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
167 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o rw
168 mkdir
-p
/pve
/${DOCRELEASE}/extra
169 rm -f
/pve
/${DOCRELEASE}/extra
/${PACKAGE}_
*.deb
170 rm -f
/pve
/${DOCRELEASE}/extra
/Packages
*
171 cp
${DEB} /pve
/${DOCRELEASE}/extra
172 cd
/pve
/${DOCRELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
173 umount
/pve
/${DOCRELEASE}; mount
/pve
/${DOCRELEASE} -o ro
176 rm -f
*.5-opts.adoc
.1-synopsis.adoc
.8-synopsis.adoc
180 rm -rf
*~
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build