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
43 all: tex pdftex web mini-clean
50 @/bin/bash ../../update_version
53 @(cd ../../../images/svg ; make eps)
57 @echo "Making covers for $(DOC)"
58 @(cd ../../../images/svg ; make pdf)
62 external-references: pdfcovers
64 @echo "Building external references for $(DOC)"
65 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
66 @export TEXINPUTS=.:../../../latex//: ; pdflatex $(DOC)
67 @echo "$(DOC) external references done."
69 pdftex: updateversion pdfcovers
71 @echo "Making PDF manual with PDFLATEX compile..."
72 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}" > graphicspolicy.tex
73 @export TEXINPUTS=.:../../../latex//: ; pdflatex $(DOC); makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null ; pdflatex $(DOC); pdflatex $(DOC)
77 tex: updateversion epscovers
78 @echo "Making version `cat version.tex`"
79 @echo "\DeclareGraphicsExtensions{.png,.jpg,.jpeg,.eps}" > graphicspolicy.tex
80 @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
81 ${DOC}i-console.tex ${DOC}i-general.tex
82 latex -interaction=batchmode ${DOC}.tex
83 makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
84 latex -interaction=batchmode ${DOC}.tex
85 latex -interaction=batchmode ${DOC}.tex
89 @cp -fp ${IMAGES}/hires/*.eps .
90 dvipdfm -p a4 ${DOC}.dvi
93 @echo "Making dvi to pdf"
94 @cp -fp ${IMAGES}/hires/*.eps .
95 dvipdf ${DOC}.dvi ${DOC}.pdf
100 @cp -fp ${IMAGES}/*.eps .
101 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
102 @(if [ -f imagename_translations ] ; then \
103 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
105 latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
106 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
107 @(if [ -f imagename_translations ] ; then \
108 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
110 (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
111 @echo "Done making html"
117 @cp -fp ${IMAGES}/*.eps .
118 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
119 latex2html -split 3 -local_icons -t "Bacula Main Reference" -long_titles 4 \
120 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
121 -no_antialias -no_antialias_text \
122 -white -notransparent ${DOC} >tex.out 2>&1
123 @(if [ -f imagename_translations ] ; then \
124 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
126 @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
127 @echo "Done making web"
132 ./check_tex.pl ${DOC}.tex
135 pic2graph -density 100 <main_configs.pic >main_configs.png
139 @rm -f *.gif *.jpg *.eps
140 @rm -f *.aux *.cp *.fn *.ky *.log *.pg
141 @rm -f *.backup *.ilg *.lof *.lot
142 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
143 @rm -f *.dnd *.old *.out
144 @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
145 @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
146 @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
147 @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
148 @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
149 @rm -f ${DOC}/WARNINGS
153 @rm graphicspolicy.tex
155 @rm -f *.png *.gif *.jpg *.eps
156 @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
157 @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
158 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
159 @rm -f *.dnd imagename_translations
160 @rm -f *.old WARNINGS *.out *.toc *.idx
166 @rm -f images.pl labels.pl internals.pl
167 @rm -f Makefile version.tex