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:
38 MAINDOC=Bacula_Miscellaneous_Guide.html
39 IMAGES=@BUILD_DIR@/images
41 TEXFILES=$(wildcard *tex)
42 MAKEFORWEB=$(DOCDIR)/web.makefile
43 WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
45 # Main directory where to find all the documentation
46 DESTDIR=../pdf-and-html
48 # Location of documentation in PDF
49 PDF_DEST_DIR=$(DESTDIR)/$(DOC)
51 # Location of HTML documentation
52 HTML_DEST_DIR=$(DESTDIR)/$(DOC)
54 # Temporary directory to translate tex to HTML
55 WWW_BUILD_DIR=$(DESTDIR)/www-$(DOC)
58 LATEX_TO_PDF= pdflatex --output-directory $(PDF_DEST_DIR)
62 all: pdftex web mini-clean
70 @/bin/bash ../../update_version
74 @echo "Making output directories..."
75 @mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
76 echo "Output directories done"
80 @echo "Making covers for $(DOC)"
81 @(cd $(IMAGES)/svg ; make pdf)
85 external-references: updateversion destdir pdfcovers
87 @echo "Building external references for $(DOC)"
88 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
89 @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC)
90 @rm -f $(PDF_DEST_DIR)/$(DOC).pdf
91 @echo "$(DOC) external references done."
93 pdftex: updateversion destdir pdfcovers
95 @echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
96 @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
97 @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC); makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null ; $(LATEX_TO_PDF) $(DOC); $(LATEX_TO_PDF) $(DOC)
103 @rm -rf $(WWW_BUILD_DIR)
104 @mkdir -p $(WWW_BUILD_DIR)
105 @echo "Adapting $(DOC) tex files for HTML documentation..."
106 @(for F in $(TEXFILES) ;\
108 cat $$F | sed -f ../pattern-to-handle > $(WWW_BUILD_DIR)/$$F ; \
110 @ln -sf $(MAKEFORWEB) $(WWW_BUILD_DIR)/Makefile
111 @(for F in $(WEBFILESTOLINK);\
113 ln -sf $$F $(WWW_BUILD_DIR)/;\
115 (cd $(WWW_BUILD_DIR) ; make )
116 @echo "Done making web"
120 evince $(PDF_DEST_DIR)/${DOC}.pdf
123 ./check_tex.pl ${DOC}.tex
126 pic2graph -density 100 <main_configs.pic >main_configs.png
130 @rm -f *.gif *.jpg *.eps
131 @rm -f *.aux *.cp *.fn *.ky *.log *.pg
132 @rm -f *.backup *.ilg *.lof *.lot
133 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
134 @rm -f *.dnd *.old *.out
135 @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
136 @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
137 @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
138 @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
139 @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
140 @rm -f ${DOC}/WARNINGS
141 @rm -rf ../www-$(DOC)
144 @rm -f graphicspolicy.tex
146 @rm -f *.png *.gif *.jpg *.eps
147 @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
148 @rm -f *.html *.backup *.pdf *.ps *.dvi *.ilg *.lof *.lot
149 @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
150 @rm -f *.dnd imagename_translations
151 @rm -f *.old WARNINGS *.out *.toc *.idx
152 @rm -f images.pl labels.pl internals.pl
153 @rm -f images.tex ${DOC}i.tex
155 @rm -rf $(WWW_BUILD_DIR)
158 @rm -f ${DOC}.html ${DOC}.pdf
159 @rm -f Makefile version.tex
160 @rm -rf $(WWW_BUILD_DIR)
161 @rm -rf $(HTML_DEST_DIR)