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