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