]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/misc/Makefile.web
Prepare some notes for the new virtualfull feature
[bacula/docs] / docs / manuals / en / misc / Makefile.web
1 MANUALSDIR=../..
2 IMAGES=$(MANUALSDIR)/../images
3 DOC=misc
4 MAINDOC=Bacula_Miscellaneous_Guide.html
5 BSYSMANUALDIR=$(MANUALSDIR)/../bsysmanual
6 COVERSDIR=$(MANUALSDIR)/../covers
7 PDFCOVERSDIR=$(COVERSDIR)/pdf
8 SVGCOVERSDIR=$(COVERSDIR)/svg
9 EPSCOVERSDIR=$(COVERSDIR)/eps
10 LICENSESDIR=$(MANUALSDIR)/licences
11 COVERNAME=coverpage-console
12 BSYSMANNAME=bsysmanual-coverpagebackground
13 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
14 BSYSCOMPILERFILE=bsys-compiler-mode.tex
15 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
16 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
17 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
18 WWWDIR=../www-$(DOC)
19
20 .SUFFIXES:     .tex .html
21 .PHONY:
22 .DONTCARE:
23
24
25 first_rule: all
26
27 all: web clean
28
29 pngimages:
30         @echo "PNG images"
31         @echo -n "Generating PNG images..."
32         @(cd ${IMAGES}/svg ; make png)
33         @echo "Done."
34         @echo -n "Linking png images..."
35         @(for F in $(IMAGES)/*.png ;\
36         do \
37         ln -sf $$F ./`basename $$F`; \
38         done)
39         @(for F in $(IMAGES)/png/*.png ;\
40         do \
41         ln -sf $$F ./`basename $$F`; \
42         done)
43         @echo "Done."
44         @echo "PNG done."
45
46 epsimages:
47         @echo "EPS images"
48         @echo -n "Generating EPS images..."
49         @(cd ${IMAGES}/svg ; make eps)
50         @echo "Done."
51         @echo -n "Linking eps images..."
52         @(for F in $(IMAGES)/*.eps ;\
53         do \
54         ln -sf $$F ./`basename $$F`; \
55         done)
56         @(for F in $(IMAGES)/eps/*.eps ;\
57         do \
58         ln -sf $$F ./`basename $$F`; \
59         done)
60         @echo "Done."
61         @echo "EPS done."
62
63 clean:
64         @echo -n "Cleaning..."
65         @find . -type l -iname "*.eps" -exec rm {} \;
66         @find . -type l -iname "*.png" -exec rm {} \;
67         @echo "Done."
68
69 commonfiles:
70         @(for F in $(LICENCES) ;\
71         do \
72         cat $$F | sed -e 's/lstlisting/verbatim/g;s/lstinline/verb/g;s/\\lstset.*//g;s/bsysimage.{\(.*\)}{.*}{.*}/includegraphics{\1}/g;s/\\input{head.*//g;s/bsysmanual/book/g;s/Aenumerate/enumerate/g;s/\\raisebox{0.1ex}{\\textsuperscript\\textregistered}/\\textregistered/g;s/\[0.3\\linewidth\]/\[5cm\]/g;s/bsysitemize/itemize/g' > ./`basename $$F` ;\
73         done)
74         cp $(MANUALSDIR)/bsys-web-mode.tex ./bsys-compiler-mode.tex
75         @echo "Done"
76
77 web: commonfiles epsimages pngimages
78         @echo "Making web"
79         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
80         @rm -f ${DOC}/xp-*.png
81         @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
82         latex2html -split 3 -local_icons -t "Bacula Miscellaneous Guide" -long_titles 4 \
83                 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
84                 -no_antialias -no_antialias_text \
85                 -white -notransparent ${DOC} >tex.out 2>&1
86         @(if [ -f imagename_translations ] ; then \
87             ./translate_images.pl --from_meaningful_names $(MAINDOC).html; \
88          fi)
89         @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
90         @echo "Done making web"