]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/problems/web.makefile
1c3864b877aaa7748dc4783c6bfb7518f41eb107
[bacula/docs] / docs / manuals / en / problems / web.makefile
1 MANUALSDIR=../..
2 IMAGES=$(MANUALSDIR)/../images
3 DOC=problems
4 MAINDOC=Bacula_Problem_Resolution_G.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 first_rule: all
25
26 all: web clean
27
28 pngimages:
29         @echo "PNG images"
30         @echo -n "Generating PNG images..."
31         @(cd ${IMAGES}/svg ; make png)
32         @echo "Done."
33         @echo -n "Linking png images..."
34         @(for F in $(IMAGES)/*.png ;\
35         do \
36         ln -sf $$F ./`basename $$F`; \
37         done)
38         @(for F in $(IMAGES)/png/*.png ;\
39         do \
40         ln -sf $$F ./`basename $$F`; \
41         done)
42         @echo "Done."
43         @echo "PNG done."
44
45 epsimages:
46         @echo "EPS images"
47         @echo -n "Generating EPS images..."
48         @(cd ${IMAGES}/svg ; make eps)
49         @echo "Done."
50         @echo -n "Linking eps images..."
51         @(for F in $(IMAGES)/*.eps ;\
52         do \
53         ln -sf $$F ./`basename $$F`; \
54         done)
55         @(for F in $(IMAGES)/eps/*.eps ;\
56         do \
57         ln -sf $$F ./`basename $$F`; \
58         done)
59         @echo "Done."
60         @echo "EPS done."
61
62 clean:
63         @echo -n "Cleaning..."
64         @find . -type l -iname "*.eps" -exec rm {} \;
65         @find . -type l -iname "*.png" -exec rm {} \;
66         @echo "Done."
67
68 commonfiles:
69         @(for F in $(LICENCES) ;\
70         do \
71         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` ;\
72         done)
73         cp $(MANUALSDIR)/bsys-web-mode.tex ./bsys-compiler-mode.tex
74         @echo "Done"
75
76 web: commonfiles epsimages pngimages
77         @echo "Making web"
78         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
79         @rm -f ${DOC}/xp-*.png
80         @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
81         latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \
82                 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
83                 -no_antialias -no_antialias_text \
84                 -white -notransparent ${DOC} >tex.out 2>&1
85         @(if [ -f imagename_translations ] ; then \
86             ./translate_images.pl --from_meaningful_names $(MAINDOC).html; \
87          fi)
88         @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
89         @echo "Done making web"