]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/problems/Makefile.in
PDF, DVI and HTML should work now...
[bacula/docs] / docs / manuals / en / problems / Makefile.in
1 #
2 #
3 #  Makefile for LaTeX  
4 #
5 # To build everything do
6 #    make tex
7 #    make web
8 #    make html
9 #    make dvipdf
10 #
11 # or simply
12 #
13 #    make
14 #
15 # for rapid development do:
16 #    make tex
17 #    make show
18 #
19 #
20 # If you are having problems getting "make" to work, debugging it is
21 #  easier if can see the output from latex, which is normally redirected
22 #  to /dev/null.  To see it, do the following:
23 #
24 #   cd docs/manual
25 #   make tex
26 #   latex bacula.tex
27 #
28 #  typically the latex command will stop indicating the error (e.g. a
29 #  missing \ in front of a _ or a missing { or ] ...
30 #
31 #  The following characters must be preceded by a backslash
32 #    to be entered as printable characters:
33
34 #    # $ % & ~ _ ^ \ { }
35 #
36
37 IMAGES=../../../images
38
39 MANUALSDIR=../..
40 DOC=problems
41 MAINDOC=Bacula_Problem_Resolution_G.html
42 BSYSMANUALDIR=../../../bsysmanual
43 COVERSDIR=../../../covers
44 PDFCOVERSDIR=$(COVERSDIR)/pdf
45 SVGCOVERSDIR=$(COVERSDIR)/svg
46 EPSCOVERSDIR=$(COVERSDIR)/eps
47 LICENSESDIR=$(MANUALSDIR)/licences
48 COVERNAME=coverpage-problems
49 BSYSMANNAME=bsysmanual-coverpagebackground
50 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
51 BSYSCOMPILERFILE=bsys-compiler-mode.tex
52 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
53 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
54 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
55 WWWDIR=../www-$(DOC)
56 DOCDIR=../${DOC}
57 TEXFILES=$(wildcard *.tex)
58 WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
59
60 first_rule: all
61
62 all: tex pdflatex web mini-clean
63
64 .SUFFIXES:     .tex .html
65 .PHONY:
66 .DONTCARE:
67
68 pdfcovers:
69         @echo -n "Linking coverpage and background PDF format..."
70         @(cd $(SVGCOVERSDIR) ; make pdf)
71         @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
72         @echo "Done."
73
74 pdfimages: 
75         @echo "Generating PDF images..."
76         @(cd ${IMAGES}/svg ; make pdf)
77         @echo "Done."
78
79 pngimages:
80         @echo "Generating PNG images..."
81         @(cd ${IMAGES}/svg ; make png)
82         @echo "Done."
83
84 epsimages:
85         @echo "Generating EPS images..."
86         @(cd ${IMAGES}/svg ; make eps)
87         @rm -rf ${IMAGES}/png
88         @rm -rf ${IMAGES}/pdf
89         @echo "Done."
90
91 epscovers:
92         @echo -n "Linking coverpage and background EPS format..."
93         @(cd $(SVGCOVERSDIR) ; make eps)
94         @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
95         @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
96         @echo "Done."
97
98 commonfiles:
99         @../../update_version
100         @echo "Making version `cat version.tex`"
101         @echo -n "Linking shared files..."
102         @(for L in $(LICENCES); do ln -sf $$L .; done)
103         @echo "Done"
104
105 tex: epscovers epsimages commonfiles
106         @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
107         @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
108              ${DOC}i-console.tex ${DOC}i-general.tex
109         latex -interaction=batchmode ${DOC}.tex
110         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
111         latex -interaction=batchmode ${DOC}.tex
112
113
114 pdflatex: pdfcovers pdfimages commonfiles
115         @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
116         pdflatex -interaction=batchmode ${DOC}.tex
117         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
118         pdflatex -interaction=batchmode ${DOC}.tex
119         pdflatex -interaction=batchmode ${DOC}.tex
120
121 html:
122         @echo " "
123         @echo "Making html"
124         @cp -fp ${IMAGES}/*.eps .
125         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
126         @(if [ -f imagename_translations ] ; then \
127             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
128          fi)
129         latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
130                 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
131         @(if [ -f imagename_translations ] ; then \
132             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
133          fi)
134         (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
135         @echo "Done making html"
136
137 web: clean
138         @echo "Making web"
139         @rm -rf $(WWWDIR)
140         @mkdir -p $(WWWDIR)
141         @echo -"Creating tex files..."
142         @(for F in $(TEXFILES) ;\
143         do \
144         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/bsysitemize/itemize/g;s/\\listoffigures//g;s/\\listoftables//g' > $(WWWDIR)/$$F ;\
145         done)
146         @ln -sf $(DOCDIR)/Makefile.web $(WWWDIR)/Makefile
147         @(for F in $(WEBFILESTOLINK);\
148         do \
149         ln -sf $$F $(WWWDIR)/;\
150         done)
151         (cd $(WWWDIR) ; make )
152         @echo "Done making web"
153 # web:
154 #       @echo "Making web"
155 #       @rm -rf ${DOC}
156 #       @mkdir -p ${DOC}
157 #       @cp -fp ${IMAGES}/*.eps .
158 #       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
159 #       @rm -f ${DOC}/xp-*.png
160 #       @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
161 #       latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \
162 #               -toc_stars -contents_in_nav -init_file latex2html-init.pl \
163 #               -no_antialias -no_antialias_text \
164 #               -white -notransparent ${DOC} >tex.out 2>&1
165 #       @(if [ -f imagename_translations ] ; then \
166 #           ./translate_images.pl --from_meaningful_names ${DOC}.html; \
167 #        fi)
168 #       @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
169 #       @echo "Done making web"
170
171 show:
172         xdvi ${DOC}
173
174 texcheck:
175         ./check_tex.pl ${DOC}.tex
176
177 main_configs:
178         pic2graph -density 100 <main_configs.pic >main_configs.png
179
180 mini-clean:
181         @rm -f 1 2 3 *.tex~
182         @rm -f *.gif *.jpg *.eps
183         @rm -f *.aux *.cp *.fn *.ky *.log *.pg
184         @rm -f *.backup *.ilg *.lof *.lot
185         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
186         @rm -f *.dnd *.old *.out 
187         @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
188         @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
189         @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
190         @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
191         @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
192         @rm -f ${DOC}/WARNINGS
193         @rm -f ${DOC}i-*.tex
194
195
196 clean:
197         @find . -type f -name "${DOC}.mtc*" -exec rm {} \;
198         @find . -type l -name "*.tex" -exec rm {} \;
199         @rm -f 1 2 3 *.tex~
200         @rm -f *.png *.gif *.jpg *.eps
201         @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
202         @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
203         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
204         @rm -f *.dnd imagename_translations
205         @rm -f *.old WARNINGS *.out *.toc *.idx
206         @rm -f ${DOC}i-*.tex
207         @rm -rf ${DOC}
208
209 webclean:
210         @rm -rf $(WWWDIR)
211
212 distclean:  webclean clean
213         @rm -f images.pl labels.pl internals.pl
214         @rm -f Makefile version.tex