]> git.proxmox.com Git - pve-docs.git/blame - Makefile
sysadmin.adoc: split into several smaller files
[pve-docs.git] / Makefile
CommitLineData
a4346554 1RELEASE=4.1
deb7f2ea
DM
2
3PVESM_SOURCES=attributes.txt pvesm.adoc pvesm.1-synopsis.adoc $(shell ls pve-storage-*.adoc)
4PVEUM_SOURCES=attributes.txt pveum.adoc pveum.1-synopsis.adoc
5VZDUMP_SOURCES=attributes.txt vzdump.adoc vzdump.1-synopsis.adoc
6PVEFW_SOURCES=attributes.txt pve-firewall.adoc pve-firewall.8-synopsis.adoc
7QM_SOURCES=attributes.txt qm.adoc qm.1-synopsis.adoc
8PCT_SOURCES=attributes.txt pct.adoc pct.1-synopsis.adoc
9
d91f8c1e
DM
10SYSADMIN_SOURCES= \
11 getting-help.adoc \
12 pve-package-repos.adoc \
13 pve-installation.adoc \
14 system-software-updates.adoc \
15 sysadmin.adoc
16
deb7f2ea 17PVE_ADMIN_GUIDE_SOURCES= \
d91f8c1e 18 ${SYSADMIN_SOURCES} \
deb7f2ea
DM
19 pve-admin-guide.adoc \
20 pve-intro.adoc \
21 pmxcfs.adoc \
22 pve-faq.adoc \
23 ${QM_SOURCES} \
24 ${PCT_SOURCES} \
25 ${PVEFW_SOURCES} \
26 ${PVEUM_SOURCES} \
27 ${PVESM_SOURCES} \
28 ${VZDUMP_SOURCES} \
29 images/cluster-nwdiag.svg \
30 images/node-nwdiag.svg \
31 pve-bibliography.adoc \
caf01dfc 32 GFDL.adoc \
deb7f2ea
DM
33 attributes.txt
34
35ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
db3cc8fc
DM
36ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
37ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
deb7f2ea
DM
38
39%-nwdiag.svg: %.nwdiag
40 nwdiag -T svg $*.nwdiag -o $@;
41
42%.1-synopsis.adoc:
43 perl -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
44 mv $@.tmp $@
45
46%.1: %.adoc %.1-synopsis.adoc docinfo.xml
db3cc8fc 47 a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
deb7f2ea
DM
48 test -z "$${NOVIEW}" && man -l $@
49
50%.1.html: %.adoc %.1-synopsis.adoc docinfo.xml
51 asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
52 test -z "$${NOVIEW}" && iceweasel $@ &
53
54
55%.8-synopsis.adoc:
56 perl -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
57 mv $@.tmp $@
58
59%.8: %.adoc %.8-synopsis.adoc docinfo.xml
db3cc8fc 60 a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
deb7f2ea
DM
61 test -z "$${NOVIEW}" && man -l $@
62
63%.8.html: %.adoc %.8-synopsis.adoc docinfo.xml
64 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc
65 test -z "$${NOVIEW}" && iceweasel $@ &
66
67
68all: pve-admin-guide.html
69
70index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
71 $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
72 $(MAKE) NOVIEW=1 qm.1.html pct.1.html pvesm.1.html pveum.1.html vzdump.1.html pve-firewall.8.html
db3cc8fc 73 asciidoc -a "date=$(shell date)" -a "revnumber=${RELEASE}" index.adoc
deb7f2ea
DM
74 iceweasel index.html &
75
76pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
a4346554 77 asciidoc -a "revnumber=${RELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
deb7f2ea
DM
78 test -z "$${NOVIEW}" && iceweasel $@ &
79
2296c490 80pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
8f13ba5f 81 grep ">Release ${RELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
2296c490 82 a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" pve-admin-guide.adoc
deb7f2ea
DM
83 test -z "$${NOVIEW}" && iceweasel $@ &
84
85pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
86 a2x -f epub pve-admin-guide.adoc
87 test -z "$${NOVIEW}" && iceweasel $@ &
88
89
90clean:
91 rm -rf *~ *.html *.pdf *.epub *.1 *.8