]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/console/web.makefile
Change bactrace to lockdump
[bacula/docs] / docs / manuals / en / console / web.makefile
1 #
2 # Makefile to be placed into to the corresponding www directory
3 # ../www-console
4 MANUALSDIR=../..
5 IMAGES=$(MANUALSDIR)/../images
6 DOC=console
7 MAINDOC=Console_Operators_Guide.html
8 BSYSMANUALDIR=$(MANUALSDIR)/../bsysmanual
9 COVERSDIR=$(MANUALSDIR)/../covers
10 PDFCOVERSDIR=$(COVERSDIR)/pdf
11 SVGCOVERSDIR=$(COVERSDIR)/svg
12 EPSCOVERSDIR=$(COVERSDIR)/eps
13 LICENSESDIR=$(MANUALSDIR)/licences
14 COVERNAME=coverpage-console
15 BSYSMANNAME=bsysmanual-coverpagebackground
16 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
17 BSYSCOMPILERFILE=bsys-compiler-mode.tex
18 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
19 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
20 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
21 #
22 # Web documentation generation
23 WWWDIR=../www-$(DOC)
24 HTML_TITLE="Console and Operators Guide"
25 HTML_DEPTH=3
26 HTML_TITLES=6
27 HTML_VERSION=4.0
28 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
29
30 .SUFFIXES:     .tex .html
31 .PHONY:
32 .DONTCARE:
33
34 first_rule: all
35
36 all: web clean
37
38 pngimages:
39         @echo "PNG images"
40         @echo -n "Generating PNG images..."
41         @(cd ${IMAGES}/svg ; make png)
42         @echo "Done."
43         @echo -n "Linking png images..."
44         @(for F in $(IMAGES)/*.png ;\
45         do \
46         ln -sf $$F ./`basename $$F`; \
47         done)
48         @(for F in $(IMAGES)/png/*.png ;\
49         do \
50         ln -sf $$F ./`basename $$F`; \
51         done)
52         @echo "Done."
53         @echo "PNG done."
54
55 epsimages:
56         @echo "EPS images"
57         @echo -n "Generating EPS images..."
58         @(cd ${IMAGES}/svg ; make eps)
59         @echo "Done."
60         @echo -n "Linking eps images..."
61         @(for F in $(IMAGES)/*.eps ;\
62         do \
63         ln -sf $$F ./`basename $$F`; \
64         done)
65         @(for F in $(IMAGES)/eps/*.eps ;\
66         do \
67         ln -sf $$F ./`basename $$F`; \
68         done)
69         @echo "Done."
70         @echo "EPS done."
71
72 clean:
73         @echo -n "Cleaning..."
74         @find . -type l -iname "*.eps" -exec rm {} \;
75         @find . -type l -iname "*.png" -exec rm {} \;
76         @echo "Done."
77
78 commonfiles:
79         @(for F in $(LICENCES) ;\
80         do \
81         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` ;\
82         done)
83         cp $(MANUALSDIR)/bsys-web-mode.tex ./bsys-compiler-mode.tex
84         @echo "Done"
85
86 web: commonfiles epsimages pngimages
87         @echo "Making web"
88         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
89         @rm -f ${DOC}/xp-*.png
90         @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
91         @${LATEX_TO_HTML}
92         @(if [ -f imagename_translations ] ; then \
93             ./translate_images.pl --from_meaningful_names $(MAINDOC).html; \
94          fi)
95         @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
96         @echo "Done making web"