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