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