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