5 # To build everything do
16 IMAGES=../../../images
19 MAINDOC=Developer_s_Guide.html
21 TEXFILES=$(wildcard *tex)
22 MAKEFORWEB=$(DOCDIR)/web.makefile
23 WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
25 # Main directory where to find all the documentation
26 DESTDIR=../pdf-and-html
28 # Location of documentation in PDF
29 PDF_DEST_DIR=$(DESTDIR)/$(DOC)
31 # Location of HTML documentation
32 HTML_DEST_DIR=$(DESTDIR)/$(DOC)
34 # Temporary directory to translate tex to HTML
35 WWW_BUILD_DIR=$(DESTDIR)/www-$(DOC)
38 LATEX_TO_PDF= pdflatex --output-directory $(PDF_DEST_DIR)
42 all: pdftex web mini-clean
50 @echo "Generating PDF images..."
51 @(cd ${IMAGES}/svg ; make pdf)
55 @echo "Generating PNG images..."
56 @(cd ${IMAGES}/svg ; make png)
60 @echo "Generating EPS images..."
61 @(cd ${IMAGES}/svg ; make eps)
67 @echo -n "Linking coverpage and background EPS format..."
68 @(cd $(SVGCOVERSDIR) ; make eps)
69 @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
70 @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
74 @echo -n "Making version `cat version.tex`"
75 @echo -n "Linking shared files..."
76 @(for L in $(LICENCES); do ln -sf $$L .; done)
79 tex: epscovers epsimages commonfiles
80 @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
81 touch ${DOC}.idx ${DOC}i-general.tex
82 -latex -interaction=batchmode ${DOC}.tex
83 makeindex ${DOC}.idx >/dev/null 2>/dev/null
84 -latex -interaction=batchmode ${DOC}.tex
88 @echo "Making output directories..."
89 @mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
90 echo "Output directories done"
94 @echo "Making covers for $(DOC)"
95 @(cd $(IMAGES)/svg ; make pdf)
99 external-references: destdir
101 @echo "Building external references for $(DOC)"
102 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
103 @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC)
104 @rm -f $(PDF_DEST_DIR)/$(DOC).pdf
105 @echo "$(DOC) external references done."
109 @echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
110 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
111 @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC); makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null ; $(LATEX_TO_PDF) $(DOC); $(LATEX_TO_PDF) $(DOC)
117 @rm -rf $(WWW_BUILD_DIR)
118 @mkdir -p $(WWW_BUILD_DIR)
119 @echo "Adapting $(DOC) tex files for HTML documentation..."
120 @(for F in $(TEXFILES) ;\
122 cat $$F | sed -f ../pattern-to-handle > $(WWW_BUILD_DIR)/$$F ; \
124 @ln -sf $(MAKEFORWEB) $(WWW_BUILD_DIR)/Makefile
125 @(for F in $(WEBFILESTOLINK);\
127 ln -sf $$F $(WWW_BUILD_DIR)/;\
129 (cd $(WWW_BUILD_DIR) ; make )
130 @echo "Done making web"
134 evince $(PDF_DEST_DIR)/${DOC}.pdf
137 ./check_tex.pl ${DOC}.tex
140 pic2graph -density 100 <main_configs.pic >main_configs.png
144 @rm -f *.gif *.jpg *.eps
145 @rm -f *.aux *.cp *.fn *.ky *.log *.pg
146 @rm -f *.backup *.ilg *.lof *.lot
147 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
148 @rm -f *.dnd *.old *.out
149 @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
150 @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
151 @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
152 @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
153 @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
154 @rm -f ${DOC}/WARNINGS
155 @rm -rf ../www-$(DOC)
158 @rm -f graphicspolicy.tex
160 @rm -f *.png *.gif *.jpg *.eps
161 @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
162 @rm -f *.html *.backup *.pdf *.ps *.dvi *.ilg *.lof *.lot
163 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
164 @rm -f *.dnd imagename_translations
165 @rm -f *.old WARNINGS *.out *.toc *.idx
166 @rm -f images.pl labels.pl internals.pl
167 @rm -f images.tex ${DOC}i.tex
169 @rm -rf $(WWW_BUILD_DIR)
172 @rm -f ${DOC}.html ${DOC}.pdf
173 @rm -f Makefile version.tex
174 @rm -rf $(WWW_BUILD_DIR)
175 @rm -rf $(HTML_DEST_DIR)