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
42 PDFCOVERSDIR=$(COVERSDIR)/pdf
43 SVGCOVERSDIR=$(COVERSDIR)/svg
44 EPSCOVERSDIR=$(COVERSDIR)/eps
45 LICENSESDIR=$(MANUALSDIR)/licences
46 COVERNAME=coverpage-main
47 BSYSMANNAME=bsysmanual-coverpagebackground
48 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
49 BSYSCOMPILERFILE=bsys-compiler-mode.tex
50 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
51 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
52 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
55 all: tex pdflatex mini-clean
63 @echo -n "Linking coverpage and background PDF format..."
64 @(cd $(SVGCOVERSDIR) ; make pdf)
65 @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
69 @echo "Generating PDF images..."
70 @(cd ${IMAGES}/svg ; make pdf)
74 @echo "Generating PNG images..."
75 @(cd ${IMAGES}/svg ; make png)
79 @echo "Generating EPS images..."
80 @(cd ${IMAGES}/svg ; make eps)
86 @echo -n "Linking coverpage and background EPS format..."
87 @(cd $(SVGCOVERSDIR) ; make eps)
88 @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
89 @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
94 @echo "Making version `cat version.tex`"
95 @echo -n "Linking shared files..."
96 @(for L in $(LICENCES); do ln -sf $$L .; done)
99 tex: epscovers epsimages commonfiles
100 @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
101 @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
102 ${DOC}i-console.tex ${DOC}i-general.tex
103 latex -interaction=batchmode ${DOC}.tex
104 makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
105 makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null
106 makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null
107 makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null
108 makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null
109 latex -interaction=batchmode ${DOC}.tex
111 pdflatex: pdfcovers pdfimages commonfiles
112 @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
113 pdflatex -interaction=batchmode ${DOC}.tex
114 makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
115 makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null
116 makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null
117 makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null
118 makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null
119 pdflatex -interaction=batchmode ${DOC}.tex
120 pdflatex -interaction=batchmode ${DOC}.tex
125 @ln -sf $(WEBCOMPILERFILE) $(BSYSCOMPILERFILE)
126 # @cp -fp ${IMAGES}/*.eps .
127 # @rm -f next.eps next.png prev.eps prev.png up.eps up.png
128 @(if [ -f imagename_translations ] ; then \
129 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
131 latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
132 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
133 @(if [ -f imagename_translations ] ; then \
134 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
136 (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
137 @echo "Done making html"
143 @cp -fp ${IMAGES}/*.eps .
144 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
145 latex2html -split 3 -local_icons -t "Bacula Main Reference" -long_titles 4 \
146 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
147 -no_antialias -no_antialias_text \
148 -white -notransparent ${DOC} >tex.out 2>&1
149 @(if [ -f imagename_translations ] ; then \
150 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
152 @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
153 @echo "Done making web"
158 ./check_tex.pl ${DOC}.tex
161 pic2graph -density 100 <main_configs.pic >main_configs.png
166 @rm -f *.gif *.jpg *.eps
167 @rm -f *.aux *.cp *.fn *.ky *.log *.pg
168 @rm -f *.backup *.ilg *.lof *.lot
169 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
170 @rm -f *.dnd *.old *.out
171 @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
172 @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
173 @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
174 @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
175 @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
176 @rm -f ${DOC}/WARNINGS
181 @find . -type l -name "*.tex" -exec rm {} \;
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