]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/misc/Makefile.in
PDF, DVI and HTML should work now...
[bacula/docs] / docs / manuals / en / misc / 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=misc
41 MAINDOC=Bacula_Miscellaneous_Guide.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-misc
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
69 pdfcovers:
70         @echo -n "Linking coverpage and background PDF format..."
71         @(cd $(SVGCOVERSDIR) ; make pdf)
72         @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
73         @echo "Done."
74
75 pdfimages: 
76         @echo "Generating PDF images..."
77         @(cd ${IMAGES}/svg ; make pdf)
78         @echo "Done."
79
80 pngimages:
81         @echo "Generating PNG images..."
82         @(cd ${IMAGES}/svg ; make png)
83         @echo "Done."
84
85 epsimages:
86         @echo "Generating EPS images..."
87         @(cd ${IMAGES}/svg ; make eps)
88         @rm -rf ${IMAGES}/png
89         @rm -rf ${IMAGES}/pdf
90         @echo "Done."
91
92 epscovers:
93         @echo -n "Linking coverpage and background EPS format..."
94         @(cd $(SVGCOVERSDIR) ; make eps)
95         @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
96         @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
97         @echo "Done."
98
99 commonfiles:
100         @../../update_version
101         @echo -n "Making version `cat version.tex`"
102         @echo -n "Linking shared files..."
103         @(for L in $(LICENCES); do ln -sf $$L .; done)
104         @echo "Done"
105
106 tex:    epscovers epsimages commonfiles
107         @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
108         @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
109              ${DOC}i-console.tex ${DOC}i-general.tex
110         latex -interaction=batchmode ${DOC}.tex
111         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
112         latex -interaction=batchmode ${DOC}.tex
113
114
115 pdflatex: pdfcovers pdfimages commonfiles
116         @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
117         pdflatex -interaction=batchmode ${DOC}.tex
118         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
119         pdflatex -interaction=batchmode ${DOC}.tex
120         pdflatex -interaction=batchmode ${DOC}.tex
121
122 html:
123         @echo " "
124         @echo "Making html"
125         @cp -fp ${IMAGES}/*.eps .
126         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
127         latex2html -white -no_subdir -split 0 -toc_stars -white \
128                 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
129         @(if [ -f imagename_translations ] ; then \
130             ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \
131          fi)
132         (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
133         @echo "Done making html"
134
135 web: clean
136         @echo "Making web"
137         @rm -rf $(WWWDIR)
138         @mkdir -p $(WWWDIR)
139         @echo -"Creating tex files..."
140         @(for F in $(TEXFILES) ;\
141         do \
142         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 ;\
143         done)
144         @ln -sf $(DOCDIR)/Makefile.web $(WWWDIR)/Makefile
145         @(for F in $(WEBFILESTOLINK);\
146         do \
147         ln -sf $$F $(WWWDIR)/;\
148         done)
149         (cd $(WWWDIR) ; make )
150         @echo "Done making web"
151
152
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 Miscellaneous 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}/${MAINDOC}; \
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
194
195 clean:
196         @find . -type f -name "${DOC}.mtc*" -exec rm {} \;
197         @find . -type l -name "*.tex" -exec rm {} \;
198         @rm -f 1 2 3 *.tex~
199         @rm -f *.png *.gif *.jpg *.eps
200         @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
201         @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
202         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
203         @rm -f *.dnd imagename_translations
204         @rm -f *.old WARNINGS *.out *.toc *.idx
205         @rm -f ${DOC}i-*.tex
206         @rm -rf ${DOC}
207
208 webclean:
209         @rm -rf $(WWWDIR)
210
211 distclean:  webclean clean
212         @rm -f images.pl labels.pl internals.pl
213         @rm -f Makefile version.tex