]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/developers/Makefile.in
Add manuals/bacula.sty
[bacula/docs] / docs / manuals / en / developers / Makefile.in
1 #
2 #
3 #  Makefile for LaTeX  
4 #
5 # To build everything do
6 #    make tex
7 #    make web
8 #    make html
9 #    make dvipdf
10 #
11 # or simply
12 #
13 #    make
14 #
15
16 IMAGES=@BUILD_DIR@/images
17
18 DOC=developers
19 MAINDOC=Developer_s_Guide.html
20 DOCDIR=`pwd`
21 TEXFILES=$(wildcard *tex)
22 MAKEFORWEB=$(DOCDIR)/web.makefile
23 WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
24 #
25 # Main directory where to find all the documentation
26 DESTDIR=../pdf-and-html
27 #
28 # Location of documentation in PDF
29 PDF_DEST_DIR=$(DESTDIR)/$(DOC)
30 #
31 # Location of HTML documentation
32 HTML_DEST_DIR=$(DESTDIR)/$(DOC)
33 #
34 # Temporary directory to translate tex to HTML
35 WWW_BUILD_DIR=$(DESTDIR)/www-$(DOC)
36 #
37 # LATEX compiler
38 LATEX_TO_PDF= pdflatex --output-directory $(PDF_DEST_DIR)
39
40 first_rule: all
41
42 all: pdftex web mini-clean
43
44 .SUFFIXES:     .tex .html
45 .PHONY:
46 .DONTCARE:
47
48
49 updateversion:
50         @/bin/bash ../../update_version
51
52 destdir:
53         @echo
54         @echo "Making output directories..."
55         @mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
56         echo "Output directories done"
57
58 pdfcovers:
59         @echo ""
60         @echo "Making covers for $(DOC)"
61         @(cd $(IMAGES)/svg ; make pdf)
62         @echo "Covers done."
63         @echo ""
64
65 external-references: updateversion destdir pdfcovers
66         @echo " "
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."
72
73 pdftex: updateversion destdir pdfcovers
74         @echo ""
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)
78         @echo "Done"
79
80
81 web: mini-clean
82         @echo "Making web"
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) ;\
87         do \
88         cat $$F | sed -f ../pattern-to-handle > $(WWW_BUILD_DIR)/$$F ; \
89         done)
90         @ln -sf $(MAKEFORWEB) $(WWW_BUILD_DIR)/Makefile
91         @(for F in $(WEBFILESTOLINK);\
92         do \
93         ln -sf $$F $(WWW_BUILD_DIR)/;\
94         done)
95         (cd $(WWW_BUILD_DIR) ; make )
96         @echo "Done making web"
97
98
99 show:
100         evince $(PDF_DEST_DIR)/${DOC}.pdf
101
102 texcheck:
103         ./check_tex.pl ${DOC}.tex
104
105 main_configs:
106         pic2graph -density 100 <main_configs.pic >main_configs.png
107
108 mini-clean:
109         @rm -f 1 2 3 *.tex~
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)
122
123 clean:
124         @rm -f graphicspolicy.tex
125         @rm -f 1 2 3
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
134         @rm -f ${DOC}i-*.tex
135         @rm -rf $(WWW_BUILD_DIR)
136
137 distclean:  clean
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)
142