5 # To build everything do
16 IMAGES=@BUILD_DIR@/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 @/bin/bash ../../update_version
54 @echo "Making output directories..."
55 @mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
56 echo "Output directories done"
60 @echo "Making covers for $(DOC)"
61 @(cd $(IMAGES)/svg ; make pdf)
65 external-references: updateversion destdir pdfcovers
67 @echo "Building external references for $(DOC)"
68 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
69 @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC)
70 @rm -f $(PDF_DEST_DIR)/$(DOC).pdf
71 @echo "$(DOC) external references done."
73 pdftex: updateversion destdir pdfcovers
75 @echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
76 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
77 @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC); makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null ; $(LATEX_TO_PDF) $(DOC); $(LATEX_TO_PDF) $(DOC)
83 @rm -rf $(WWW_BUILD_DIR)
84 @mkdir -p $(WWW_BUILD_DIR)
85 @echo "Adapting $(DOC) tex files for HTML documentation..."
86 @(for F in $(TEXFILES) ;\
88 cat $$F | sed -f ../pattern-to-handle > $(WWW_BUILD_DIR)/$$F ; \
90 @ln -sf $(MAKEFORWEB) $(WWW_BUILD_DIR)/Makefile
91 @(for F in $(WEBFILESTOLINK);\
93 ln -sf $$F $(WWW_BUILD_DIR)/;\
95 (cd $(WWW_BUILD_DIR) ; make )
96 @echo "Done making web"
100 evince $(PDF_DEST_DIR)/${DOC}.pdf
103 ./check_tex.pl ${DOC}.tex
106 pic2graph -density 100 <main_configs.pic >main_configs.png
110 @rm -f *.gif *.jpg *.eps
111 @rm -f *.aux *.cp *.fn *.ky *.log *.pg
112 @rm -f *.backup *.ilg *.lof *.lot
113 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
114 @rm -f *.dnd *.old *.out
115 @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
116 @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
117 @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
118 @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
119 @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
120 @rm -f ${DOC}/WARNINGS
121 @rm -rf ../www-$(DOC)
124 @rm -f graphicspolicy.tex
126 @rm -f *.png *.gif *.jpg *.eps
127 @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
128 @rm -f *.html *.backup *.pdf *.ps *.dvi *.ilg *.lof *.lot
129 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
130 @rm -f *.dnd imagename_translations
131 @rm -f *.old WARNINGS *.out *.toc *.idx
132 @rm -f images.pl labels.pl internals.pl
133 @rm -f images.tex ${DOC}i.tex
135 @rm -rf $(WWW_BUILD_DIR)
138 @rm -f ${DOC}.html ${DOC}.pdf
139 @rm -f Makefile version.tex
140 @rm -rf $(WWW_BUILD_DIR)
141 @rm -rf $(HTML_DEST_DIR)