]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/main/Makefile.in
Main should now compile with both tex and pdflatex options
[bacula/docs] / docs / manuals / en / main / Makefile.in
1 #
2 #  Makefile for Bacula LaTeX  Manual
3 #
4 # To build everything do
5 #    make tex
6 #    make web
7 #    make html
8 #    make dvipdf
9 #
10 # or simply
11 #
12 #    make
13 #
14 # for rapid development do:
15 #    make tex
16 #    make show
17 #
18 #
19 # If you are having problems getting "make" to work, debugging it is
20 #  easier if can see the output from latex, which is normally redirected
21 #  to /dev/null.  To see it, do the following:
22 #
23 #   cd docs/manual
24 #   make tex
25 #   latex bacula.tex
26 #
27 #  typically the latex command will stop indicating the error (e.g. a
28 #  missing \ in front of a _ or a missing { or ] ...
29 #
30 #  The following characters must be preceded by a backslash
31 #    to be entered as printable characters:
32
33 #    # $ % & ~ _ ^ \ { }
34 #
35
36 IMAGES=../../../images
37 MANUALSDIR=../..
38 DOC=main
39 MAINDOC=Bacula_Main_Reference.html
40 BSYSMANUALDIR=../../../bsysmanual
41 COVERSDIR=../../../covers
42 PDFCOVERSDIR=$(COVERSDIR)/pdf
43 SVGCOVERSDIR=$(COVERSDIR)/svg
44 EPSCOVERSDIR=$(COVERSDIR)/eps
45 LICENSESDIR=$(MANUALSDIR)/licences
46 COVERNAME=coverpage-main
47 BSYSMANNAME=bsysmanual-coverpagebackground
48 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
49 BSYSCOMPILERFILE=bsys-compiler-mode.tex
50 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
51 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
52 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
53 first_rule: all
54
55 all: tex web dvipdf mini-clean
56
57 .SUFFIXES:     .tex .html
58 .PHONY:
59 .DONTCARE:
60
61
62 pdfcovers:
63         @echo -n "Linking coverpage and background PDF format..."
64         @(cd $(SVGCOVERSDIR) ; make pdf)
65         @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
66         @echo "Done."
67
68 pdfimages: 
69         @echo "Generating PDF images..."
70         @(cd ${IMAGES}/svg ; make pdf)
71         @echo "Done."
72
73 pngimages:
74         @echo "Generating PNG images..."
75         @(cd ${IMAGES}/svg ; make png)
76         @echo "Done."
77
78 epsimages:
79         @echo "Generating EPS images..."
80         @(cd ${IMAGES}/svg ; make eps)
81         @rm -rf ${IMAGES}/png
82         @rm -rf ${IMAGES}/pdf
83         @echo "Done."
84
85 epscovers:
86         @echo -n "Linking coverpage and background EPS format..."
87         @(cd $(SVGCOVERSDIR) ; make eps)
88         @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
89         @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
90         @echo "Done."
91
92 commonfiles:
93         @echo -n "Linking shared files..."
94         @(for L in $(LICENCES); do ln -sf $$L .; done)
95         @echo "Done"
96
97 tex:    epscovers epsimages
98         @../../update_version
99         @echo "Making version `cat version.tex`"
100 #       @cp -fp ${IMAGES}/hires/*.eps .
101         @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
102         @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
103              ${DOC}i-console.tex ${DOC}i-general.tex
104         latex -interaction=batchmode ${DOC}.tex
105         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
106         makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null
107         makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null
108         makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null
109         makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null
110         latex -interaction=batchmode ${DOC}.tex
111
112 pdf:
113         @echo "Making pdfm"
114         @cp -fp ${IMAGES}/hires/*.eps .
115         dvipdfm -p a4 ${DOC}.dvi
116
117 pdflatex: pdfcovers pdfimages commonfiles
118         @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
119         pdflatex -interaction=batchmode ${DOC}.tex
120         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
121         makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null
122         makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null
123         makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null
124         makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null
125         pdflatex -interaction=batchmode ${DOC}.tex
126         pdflatex -interaction=batchmode ${DOC}.tex
127
128 dvipdf:
129         @echo "Making dvi to pdf"
130         @cp -fp ${IMAGES}/hires/*.eps .
131         dvipdf ${DOC}.dvi ${DOC}.pdf
132
133 html:
134         @echo " "
135         @echo "Making html"
136         @ln -sf $(WEBCOMPILERFILE) $(BSYSCOMPILERFILE)
137 #       @cp -fp ${IMAGES}/*.eps .
138 #       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
139         @(if [ -f imagename_translations ] ; then \
140             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
141          fi)
142         latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
143                 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
144         @(if [ -f imagename_translations ] ; then \
145             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
146          fi)
147         (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
148         @echo "Done making html"
149
150 web:
151         @echo "Making web"
152         @rm -rf ${DOC}
153         @mkdir -p ${DOC}
154         @cp -fp ${IMAGES}/*.eps .
155         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
156         latex2html -split 3 -local_icons -t "Bacula Main Reference" -long_titles 4 \
157                 -toc_stars -contents_in_nav -init_file latex2html-init.pl \
158                 -no_antialias -no_antialias_text \
159                 -white -notransparent ${DOC} >tex.out 2>&1
160         @(if [ -f imagename_translations ] ; then \
161             ./translate_images.pl --from_meaningful_names ${DOC}.html; \
162          fi)
163         @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
164         @echo "Done making web"
165 show:
166         xdvi ${DOC}
167
168 texcheck:
169         ./check_tex.pl ${DOC}.tex
170
171 main_configs:
172         pic2graph -density 100 <main_configs.pic >main_configs.png
173
174 mini-clean:
175         @rm -f 1 2 3 *.tex~
176         @rm -f *.gif *.jpg *.eps
177         @rm -f *.aux *.cp *.fn *.ky *.log *.pg
178         @rm -f *.backup *.ilg *.lof *.lot
179         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
180         @rm -f *.dnd *.old *.out 
181         @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
182         @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
183         @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
184         @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
185         @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
186         @rm -f ${DOC}/WARNINGS
187
188
189 clean:
190         @rm -f 1 2 3 *.tex~
191         @rm -f *.png *.gif *.jpg *.eps
192         @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
193         @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
194         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
195         @rm -f *.dnd imagename_translations
196         @rm -f *.old WARNINGS *.out *.toc *.idx
197         @rm -f ${DOC}i-*.tex
198         @rm -rf ${DOC}
199
200
201 distclean: clean
202         @rm -f images.pl labels.pl internals.pl
203         @rm -f Makefile version.tex