5 # To build everything do
15 # for rapid development do:
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:
28 # typically the latex command will stop indicating the error (e.g. a
29 # missing \ in front of a _ or a missing { or ] ...
31 # The following characters must be preceded by a backslash
32 # to be entered as printable characters:
37 IMAGES=../../../images
41 MAINDOC=Bacula_Problem_Resolution_G.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-problems
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
58 all: tex pdflatex mini-clean
65 @echo -n "Linking coverpage and background PDF format..."
66 @(cd $(SVGCOVERSDIR) ; make pdf)
67 @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
71 @echo "Generating PDF images..."
72 @(cd ${IMAGES}/svg ; make pdf)
76 @echo "Generating PNG images..."
77 @(cd ${IMAGES}/svg ; make png)
81 @echo "Generating EPS images..."
82 @(cd ${IMAGES}/svg ; make eps)
88 @echo -n "Linking coverpage and background EPS format..."
89 @(cd $(SVGCOVERSDIR) ; make eps)
90 @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
91 @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
96 @echo "Making version `cat version.tex`"
97 @echo -n "Linking shared files..."
98 @(for L in $(LICENCES); do ln -sf $$L .; done)
101 tex: epscovers epsimages commonfiles
102 @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
103 @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
104 ${DOC}i-console.tex ${DOC}i-general.tex
105 latex -interaction=batchmode ${DOC}.tex
106 makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
107 latex -interaction=batchmode ${DOC}.tex
110 pdflatex: pdfcovers pdfimages commonfiles
111 @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
112 pdflatex -interaction=batchmode ${DOC}.tex
113 makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
114 pdflatex -interaction=batchmode ${DOC}.tex
115 pdflatex -interaction=batchmode ${DOC}.tex
120 @cp -fp ${IMAGES}/*.eps .
121 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
122 @(if [ -f imagename_translations ] ; then \
123 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
125 latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
126 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
127 @(if [ -f imagename_translations ] ; then \
128 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
130 (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
131 @echo "Done making html"
137 @cp -fp ${IMAGES}/*.eps .
138 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
139 @rm -f ${DOC}/xp-*.png
140 @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
141 latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \
142 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
143 -no_antialias -no_antialias_text \
144 -white -notransparent ${DOC} >tex.out 2>&1
145 @(if [ -f imagename_translations ] ; then \
146 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
148 @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
149 @echo "Done making web"
154 ./check_tex.pl ${DOC}.tex
157 pic2graph -density 100 <main_configs.pic >main_configs.png
161 @rm -f *.gif *.jpg *.eps
162 @rm -f *.aux *.cp *.fn *.ky *.log *.pg
163 @rm -f *.backup *.ilg *.lof *.lot
164 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
165 @rm -f *.dnd *.old *.out
166 @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
167 @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
168 @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
169 @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
170 @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
171 @rm -f ${DOC}/WARNINGS
176 @find . -type f -name ${DOC}.mtc* -exec rm {} \;
177 @find . -type l -name "*.tex" -exec rm {} \;
179 @rm -f *.png *.gif *.jpg *.eps
180 @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
181 @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
182 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
183 @rm -f *.dnd imagename_translations
184 @rm -f *.old WARNINGS *.out *.toc *.idx
190 @rm -f images.pl labels.pl internals.pl
191 @rm -f Makefile version.tex