]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/misc/Makefile.in
Makefiles have been modified to share the patter-to-handle file which defines itself...
[bacula/docs] / docs / manuals / en / misc / 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 # for rapid development do:
16 #    make tex
17 #    make show
18 #
19 #
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:
23 #
24 #   cd docs/manual
25 #   make tex
26 #   latex bacula.tex
27 #
28 #  typically the latex command will stop indicating the error (e.g. a
29 #  missing \ in front of a _ or a missing { or ] ...
30 #
31 #  The following characters must be preceded by a backslash
32 #    to be entered as printable characters:
33
34 #    # $ % & ~ _ ^ \ { }
35 #
36
37 IMAGES=../../../images
38
39 MANUALSDIR=../..
40 DOC=misc
41 MAINDOC=Bacula_Miscellaneous_Guide.html
42 BSYSMANUALDIR=../../../bsysmanual
43 COVERSDIR=../../../covers
44 PDFCOVERSDIR=$(COVERSDIR)/pdf
45 SVGCOVERSDIR=$(COVERSDIR)/svg
46 EPSCOVERSDIR=$(COVERSDIR)/eps
47 LICENSESDIR=$(MANUALSDIR)/licences
48 COVERNAME=coverpage-misc
49 BSYSMANNAME=bsysmanual-coverpagebackground
50 LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
51 BSYSCOMPILERFILE=bsys-compiler-mode.tex
52 PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
53 TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
54 WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
55 WWWDIR=../www-$(DOC)
56 DOCDIR=../${DOC}
57 TEXFILES=$(wildcard *.tex)
58 WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
59 PDFLATEX=pdflatex
60 PDFLATEXOPTIONS=-interaction=batchmode
61 MAKEFORWEB=$(DOCDIR)/web.makefile
62
63 first_rule: all
64
65 all: pdflatex web mini-clean
66
67 .SUFFIXES:     .tex .html
68 .PHONY:
69 .DONTCARE:
70
71
72 pdfcovers:
73         @echo -n "Linking coverpage and background PDF format..."
74         @(cd $(SVGCOVERSDIR) ; make pdf)
75         @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
76         @echo "Done."
77
78 pdfimages: 
79         @echo "Generating PDF images..."
80         @(cd ${IMAGES}/svg ; make pdf)
81         @echo "Done."
82
83 pngimages:
84         @echo "Generating PNG images..."
85         @(cd ${IMAGES}/svg ; make png)
86         @echo "Done."
87
88 epsimages:
89         @echo "Generating EPS images..."
90         @(cd ${IMAGES}/svg ; make eps)
91         @rm -rf ${IMAGES}/png
92         @rm -rf ${IMAGES}/pdf
93         @echo "Done."
94
95 epscovers:
96         @echo -n "Linking coverpage and background EPS format..."
97         @(cd $(SVGCOVERSDIR) ; make eps)
98         @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
99         @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
100         @echo "Done."
101
102 commonfiles:
103         @../../update_version
104         @echo -n "Making version `cat version.tex`"
105         @echo -n "Linking shared files..."
106         @(for L in $(LICENCES); do ln -sf $$L .; done)
107         @echo "Done"
108
109 tex:    epscovers epsimages commonfiles
110         @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
111         @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
112              ${DOC}i-console.tex ${DOC}i-general.tex
113         latex -interaction=batchmode ${DOC}.tex
114         makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
115         latex -interaction=batchmode ${DOC}.tex
116
117 external-references: pdfcovers pdfimages commonfiles
118         @echo " "
119         @echo "Building external references for $(DOC)"
120         @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
121         @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
122         @echo "$(DOC) external references done."
123
124 pdflatex: external-references
125         @echo " "
126         @echo " Generating the PDF version of $(DOC)"
127         @echo "   building indexes"
128         @makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
129         @echo "   compiling..."
130         @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
131         @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
132         @echo "$(DOC).pdf generated."
133
134 html:
135         @echo " "
136         @echo "Making html"
137         @cp -fp ${IMAGES}/*.eps .
138         @rm -f next.eps next.png prev.eps prev.png up.eps up.png
139         latex2html -white -no_subdir -split 0 -toc_stars -white \
140                 -init_file latex2html-init.pl ${DOC} >tex.out 2>&1
141         @(if [ -f imagename_translations ] ; then \
142             ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \
143          fi)
144         (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
145         @echo "Done making html"
146
147 web: mini-clean
148         @echo "Making web"
149         @rm -rf $(WWWDIR)
150         @mkdir -p $(WWWDIR)
151         @echo -"Creating tex files..."
152         @(for F in $(TEXFILES) ;\
153         do \
154         cat $$F | sed -f ../pattern-to-handle > $(WWWDIR)/$$F ; \
155         done)
156         @ln -sf $(MAKEFORWEB) $(WWWDIR)/Makefile
157         @(for F in $(WEBFILESTOLINK);\
158         do \
159         ln -sf $$F $(WWWDIR)/;\
160         done)
161         (cd $(WWWDIR) ; make )
162         @echo "Done making web"
163
164
165 # web:
166 #       @echo "Making web"
167 #       @rm -rf ${DOC}
168 #       @mkdir -p ${DOC}
169 #       @cp -fp ${IMAGES}/*.eps .
170 #       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
171 #       @rm -f ${DOC}/xp-*.png
172 #       @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
173 #       latex2html -split 3 -local_icons -t "Bacula Miscellaneous Guide" -long_titles 4 \
174 #               -toc_stars -contents_in_nav -init_file latex2html-init.pl \
175 #               -no_antialias -no_antialias_text \
176 #               -white -notransparent ${DOC} >tex.out 2>&1
177 #       @(if [ -f imagename_translations ] ; then \
178 #           ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \
179 #        fi)
180 #       @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
181 #       @echo "Done making web"
182
183 show:
184         xdvi ${DOC}
185
186 texcheck:
187         ./check_tex.pl ${DOC}.tex
188
189 main_configs:
190         pic2graph -density 100 <main_configs.pic >main_configs.png
191
192 mini-clean:
193         @rm -f 1 2 3 *.tex~
194         @rm -f *.gif *.jpg *.eps
195         @rm -f *.cp *.fn *.ky *.log *.pg
196         @rm -f *.backup *.ilg *.lof *.lot
197         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
198         @rm -f *.dnd *.old *.out 
199         @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
200         @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
201         @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
202         @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
203         @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
204         @rm -f ${DOC}/WARNINGS
205
206
207 clean:
208         @find . -type f -name "${DOC}.mtc*" -exec rm {} \;
209         @find . -type l -name "*.tex" -exec rm {} \;
210         @rm -f 1 2 3 *.tex~
211         @rm -f *.png *.gif *.jpg *.eps
212         @rm -f *.aux *.cp *.fn *.ky *.log *.pg
213         @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
214         @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
215         @rm -f *.dnd imagename_translations
216         @rm -f *.old WARNINGS *.out *.toc *.idx
217         @rm -f ${DOC}i-*.tex
218         @rm -rf ${DOC}
219
220 webclean:
221         @rm -rf $(WWWDIR)
222
223 distclean:  webclean clean
224         @rm -f *.pdf
225         @rm -f images.pl labels.pl internals.pl
226         @rm -f Makefile version.tex