]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/misc/Makefile.in
all manuals pdf and dvi. No web at this point
[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
56
57 first_rule: all
58
59 all: tex pdflatex mini-clean
60
61 .SUFFIXES:     .tex .html
62 .PHONY:
63 .DONTCARE:
64
65
66 pdfcovers:
67         @echo -n "Linking coverpage and background PDF format..."
68         @(cd $(SVGCOVERSDIR) ; make pdf)
69         @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
70         @echo "Done."
71
72 pdfimages: 
73         @echo "Generating PDF images..."
74         @(cd ${IMAGES}/svg ; make pdf)
75         @echo "Done."
76
77 pngimages:
78         @echo "Generating PNG images..."
79         @(cd ${IMAGES}/svg ; make png)
80         @echo "Done."
81
82 epsimages:
83         @echo "Generating EPS images..."
84         @(cd ${IMAGES}/svg ; make eps)
85         @rm -rf ${IMAGES}/png
86         @rm -rf ${IMAGES}/pdf
87         @echo "Done."
88
89 epscovers:
90         @echo -n "Linking coverpage and background EPS format..."
91         @(cd $(SVGCOVERSDIR) ; make eps)
92         @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
93         @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
94         @echo "Done."
95
96 commonfiles:
97         @../../update_version
98         @echo -n "Making version `cat version.tex`"
99         @echo -n "Linking shared files..."
100         @(for L in $(LICENCES); do ln -sf $$L .; done)
101         @echo "Done"
102
103 tex:    epscovers epsimages commonfiles
104         @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
105         @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
106              ${DOC}i-console.tex ${DOC}i-general.tex
107         latex -interaction=batchmode ${DOC}.tex
108         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
109         latex -interaction=batchmode ${DOC}.tex
110
111
112 pdflatex: pdfcovers pdfimages commonfiles
113         @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
114         pdflatex -interaction=batchmode ${DOC}.tex
115         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
116         pdflatex -interaction=batchmode ${DOC}.tex
117         pdflatex -interaction=batchmode ${DOC}.tex
118
119 html:
120         @echo " "
121         @echo "Making html"
122         @cp -fp ${IMAGES}/*.eps .
123         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
124         latex2html -white -no_subdir -split 0 -toc_stars -white \
125                 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
126         @(if [ -f imagename_translations ] ; then \
127             ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \
128          fi)
129         (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
130         @echo "Done making html"
131
132 web:
133         @echo "Making web"
134         @rm -rf ${DOC}
135         @mkdir -p ${DOC}
136         @cp -fp ${IMAGES}/*.eps .
137         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
138         @rm -f ${DOC}/xp-*.png
139         @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
140         latex2html -split 3 -local_icons -t "Bacula Miscellaneous Guide" -long_titles 4 \
141                 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
142                 -no_antialias -no_antialias_text \
143                 -white -notransparent ${DOC} >tex.out 2>&1
144         @(if [ -f imagename_translations ] ; then \
145             ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \
146          fi)
147         @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
148         @echo "Done making web"
149 show:
150         xdvi ${DOC}
151
152 texcheck:
153         ./check_tex.pl ${DOC}.tex
154
155 main_configs:
156         pic2graph -density 100 <main_configs.pic >main_configs.png
157
158 mini-clean:
159         @rm -f 1 2 3 *.tex~
160         @rm -f *.gif *.jpg *.eps
161         @rm -f *.aux *.cp *.fn *.ky *.log *.pg
162         @rm -f *.backup *.ilg *.lof *.lot
163         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
164         @rm -f *.dnd *.old *.out 
165         @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
166         @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
167         @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
168         @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
169         @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
170         @rm -f ${DOC}/WARNINGS
171
172
173 clean:
174         @find . -type f -name ${DOC}.mtc* -exec rm {} \;
175         @find . -type l -name "*.tex" -exec rm {} \;
176         @rm -f 1 2 3 *.tex~
177         @rm -f *.png *.gif *.jpg *.eps
178         @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
179         @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
180         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
181         @rm -f *.dnd imagename_translations
182         @rm -f *.old WARNINGS *.out *.toc *.idx
183         @rm -f ${DOC}i-*.tex
184         @rm -rf ${DOC}
185
186
187 distclean: clean
188         @rm -f images.pl labels.pl internals.pl
189         @rm -f Makefile version.tex