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 BSYSMANUALDIR=../../../bsysmanual
42 COVERSDIR=../../../covers
43 PDFCOVERSDIR=$(COVERSDIR)/pdf
44 SVGCOVERSDIR=$(COVERSDIR)/svg
45 EPSCOVERSDIR=$(COVERSDIR)/eps
46 LICENSESDIR=$(MANUALSDIR)/licences
47 COVERNAME=coverpage-developers
48 BSYSMANNAME=bsysmanual-coverpagebackground
49 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
50 BSYSCOMPILERFILE=bsys-compiler-mode.tex
51 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
52 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
53 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
57 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 -n "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}.idx ${DOC}i-general.tex
104 -latex -interaction=batchmode ${DOC}.tex
105 makeindex ${DOC}.idx >/dev/null 2>/dev/null
106 -latex -interaction=batchmode ${DOC}.tex
108 pdflatex: pdfcovers pdfimages commonfiles
109 @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
110 pdflatex -interaction=batchmode ${DOC}.tex
111 makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
112 makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null
113 makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null
114 makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null
115 makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null
116 pdflatex -interaction=batchmode ${DOC}.tex
117 pdflatex -interaction=batchmode ${DOC}.tex
120 @echo "Making ${DOC} html"
121 # @cp -fp ${IMAGES}/*.eps .
122 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
124 @(if [ -f imagename_translations ] ; then \
125 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
127 latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
129 @(if [ -f imagename_translations ] ; then \
130 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
132 (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
133 @rm -f *.eps *.gif *.jpg *.old
136 @echo "Making ${DOC} web"
140 # @cp -fp ${IMAGES}/*.eps .
141 @rm -f next.eps next.png prev.eps prev.png up.eps up.png
142 @(if [ -f ${DOC}/imagename_translations ] ; then \
143 ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html; \
145 @rm -rf ${DOC}/*.html
146 latex2html -split 4 -local_icons -t "Developer's Guide" -long_titles 4 \
147 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
148 -no_antialias -no_antialias_text \
149 -white -notransparent ${DOC} >tex.out 2>&1
150 @(if [ -f imagename_translations ] ; then \
151 ./translate_images.pl --from_meaningful_names ${DOC}.html; \
153 @cp -f ${DOC}/Bacula_Developer_Notes.html ${DOC}/index.html
154 @rm -f *.eps *.gif *.jpg ${DOC}/*.eps *.old
155 @rm -f ${DOC}/idle.png
156 @rm -f ${DOC}/win32-*.png ${DOC}/wx-console*.png ${DOC}/xp-*.png
157 @rm -f ${DOC}/*.pl ${DOC}/*.log ${DOC}/*.aux ${DOC}/*.idx
158 @rm -f ${DOC}/*.out WARNINGS
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
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 *.pdf *.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 images.pl labels.pl internals.pl
191 @rm -f images.tex ${DOC}i.tex
196 @rm -f ${DOC}.html ${DOC}.pdf
197 @rm -f Makefile version.tex