]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/problems/Makefile.in
Makefiles have been modified to share the patter-to-handle file which defines itself...
[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 PDFLATEX=pdflatex
60 PDFLATEXOPTIONS=-interaction=batchmode
61 MAKEFORWEB=$(DOCDIR)/web.makefile
62
63 first_rule: all
64
65 all: pdflatex web mini-clean
66
67 .SUFFIXES:     .tex .html
68 .PHONY:
69 .DONTCARE:
70
71 pdfcovers:
72         @echo -n "Linking coverpage and background PDF format..."
73         @(cd $(SVGCOVERSDIR) ; make pdf)
74         @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
75         @echo "Done."
76
77 pdfimages: 
78         @echo "Generating PDF images..."
79         @(cd ${IMAGES}/svg ; make pdf)
80         @echo "Done."
81
82 pngimages:
83         @echo "Generating PNG images..."
84         @(cd ${IMAGES}/svg ; make png)
85         @echo "Done."
86
87 epsimages:
88         @echo "Generating EPS images..."
89         @(cd ${IMAGES}/svg ; make eps)
90         @rm -rf ${IMAGES}/png
91         @rm -rf ${IMAGES}/pdf
92         @echo "Done."
93
94 epscovers:
95         @echo -n "Linking coverpage and background EPS format..."
96         @(cd $(SVGCOVERSDIR) ; make eps)
97         @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
98         @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
99         @echo "Done."
100
101 commonfiles:
102         @../../update_version
103         @echo "Making version `cat version.tex`"
104         @echo -n "Linking shared files..."
105         @(for L in $(LICENCES); do ln -sf $$L .; done)
106         @echo "Done"
107
108 tex: epscovers epsimages commonfiles
109         @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
110         @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
111              ${DOC}i-console.tex ${DOC}i-general.tex
112         latex -interaction=batchmode ${DOC}.tex
113         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
114         latex -interaction=batchmode ${DOC}.tex
115
116 external-references: pdfcovers pdfimages commonfiles
117         @echo " "
118         @echo "Building external references for $(DOC)"
119         @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
120         @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
121         @echo "$(DOC) external references done."
122
123 pdflatex: external-references
124         @echo " "
125         @echo " Generating the PDF version of $(DOC)"
126         @echo "   building indexes"
127         @makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
128         @echo "   compiling..."
129         $(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
130         $(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
131         @echo "$(DOC).pdf generated."
132
133 html:
134         @echo " "
135         @echo "Making html"
136         @cp -fp ${IMAGES}/*.eps .
137         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
138         @(if [ -f imagename_translations ] ; then \
139             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
140          fi)
141         latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
142                 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
143         @(if [ -f imagename_translations ] ; then \
144             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
145          fi)
146         (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
147         @echo "Done making html"
148
149 web: mini-clean
150         @echo "Making web"
151         @rm -rf $(WWWDIR)
152         @mkdir -p $(WWWDIR)
153         @echo -"Creating tex files..."
154         @(for F in $(TEXFILES) ;\
155         do \
156         cat $$F | sed -f ../pattern-to-handle > $(WWWDIR)/$$F ; \
157         done)
158         @ln -sf $(MAKEFORWEB) $(WWWDIR)/Makefile
159         @(for F in $(WEBFILESTOLINK);\
160         do \
161         ln -sf $$F $(WWWDIR)/;\
162         done)
163         (cd $(WWWDIR) ; make )
164         @echo "Done making web"
165 # web:
166 #       @echo "Making web"
167 #       @rm -rf ${DOC}
168 #       @mkdir -p ${DOC}
169 #       @cp -fp ${IMAGES}/*.eps .
170 #       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
171 #       @rm -f ${DOC}/xp-*.png
172 #       @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
173 #       latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \
174 #               -toc_stars -contents_in_nav -init_file latex2html-init.pl \
175 #               -no_antialias -no_antialias_text \
176 #               -white -notransparent ${DOC} >tex.out 2>&1
177 #       @(if [ -f imagename_translations ] ; then \
178 #           ./translate_images.pl --from_meaningful_names ${DOC}.html; \
179 #        fi)
180 #       @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
181 #       @echo "Done making web"
182
183 show:
184         xdvi ${DOC}
185
186 texcheck:
187         ./check_tex.pl ${DOC}.tex
188
189 main_configs:
190         pic2graph -density 100 <main_configs.pic >main_configs.png
191
192 mini-clean:
193         @rm -f 1 2 3 *.tex~
194         @rm -f *.gif *.jpg *.eps
195         @rm -f *.cp *.fn *.ky *.log *.pg
196         @rm -f *.backup *.ilg *.lof *.lot
197         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
198         @rm -f *.dnd *.old *.out 
199         @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
200         @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
201         @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
202         @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
203         @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
204         @rm -f ${DOC}/WARNINGS
205         @rm -f ${DOC}i-*.tex
206
207
208 clean:
209         @find . -type f -name "${DOC}.mtc*" -exec rm {} \;
210         @find . -type l -name "*.tex" -exec rm {} \;
211         @rm -f 1 2 3 *.tex~
212         @rm -f *.png *.gif *.jpg *.eps
213         @rm -f *.aux *.cp *.fn *.ky *.log *.pg
214         @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
215         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
216         @rm -f *.dnd imagename_translations
217         @rm -f *.old WARNINGS *.out *.toc *.idx
218         @rm -f ${DOC}i-*.tex
219         @rm -rf ${DOC}
220
221 webclean:
222         @rm -rf $(WWWDIR)
223
224 distclean:  webclean clean
225         @rm -f *.pdf
226         @rm -f images.pl labels.pl internals.pl
227         @rm -f Makefile version.tex