2 # Makefile for Bacula LaTeX Manual
4 # To build everything do
14 # for rapid development do:
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:
27 # typically the latex command will stop indicating the error (e.g. a
28 # missing \ in front of a _ or a missing { or ] ...
30 # The following characters must be preceded by a backslash
31 # to be entered as printable characters:
36 IMAGES=../../../images
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)
49 all: tex web dvipdf mini-clean
51 .SUFFIXES: .tex .html .svg
57 @echo -n "Linking coverpage and background PDF format..."
58 @ln -sf `pwd`/${COVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
62 @echo "Generating PDF images..."
63 @(cd ${IMAGES}/svg ; make pdf)
67 @echo "Generating PNG images..."
68 @(cd ${IMAGES}/svg ; make png)
72 @echo "Generating EPS images..."
73 @(cd ${IMAGES}/svg ; make eps)
77 @echo -n "Linking coverpage and background EPS format..."
78 @(if [ ! -e ${COVERNAME}.eps ]; then \
80 pdf2ps ${COVERNAME}.pdf;
81 ps2eps ${COVERNAME}.ps;
84 @ln -sf `pwd`/${COVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
88 @echo -n "Linking shared files..."
89 @(for L in $(LICENCES); do ln -sf $$L .; done)
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
108 @cp -fp ${IMAGES}/hires/*.eps .
109 dvipdfm -p a4 ${DOC}.dvi
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
122 @echo "Making dvi to pdf"
123 @cp -fp ${IMAGES}/hires/*.eps .
124 dvipdf ${DOC}.dvi ${DOC}.pdf
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; \
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; \
139 (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
140 @echo "Done making html"
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; \
155 @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
156 @echo "Done making web"
161 ./check_tex.pl ${DOC}.tex
164 pic2graph -density 100 <main_configs.pic >main_configs.png
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
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
194 @rm -f images.pl labels.pl internals.pl
195 @rm -f Makefile version.tex