]> git.sur5r.net Git - bacula/docs/blob - docs/Makefile
d97814ba27dd51eb2aa53b3b0361ab2cb321953f
[bacula/docs] / docs / Makefile
1 #
2 #-------------------------------------------------------------------------
3
4 SHELL = /bin/sh
5
6 # Installation target directories & other installation stuff
7 prefix = /usr/local
8 exec_prefix = ${prefix}
9 binprefix =
10 manprefix =
11 sbindir = ${exec_prefix}/sbin
12 sysconfdir = ${prefix}/etc
13 scriptdir = @scriptdir@
14 mandir = ${datarootdir}/man/man1
15 manext = 1
16 datarootdir=${prefix}/share
17
18 # Tools & program stuff
19 MV = /bin/mv
20 RM = /bin/rm
21 RMF = /bin/rm -f
22 CP = /bin/cp
23 SED = @SED@
24 AWK = /usr/bin/gawk
25 ECHO = /bin/echo
26 CMP = @CMP@
27 INSTALL = /usr/bin/install -c
28 # add the -s to the following in PRODUCTION mode
29 INSTALL_PROGRAM = /usr/bin/install -c -m @SBINPERM@
30 INSTALL_DATA = /usr/bin/install -c -m 644
31 INSTALL_SCRIPT = /usr/bin/install -c -m @SBINPERM@
32 INSTALL_CONFIG = /usr/bin/install -c -m 640
33
34
35 # End of common section of the Makefile
36 #-------------------------------------------------------------------------
37
38 srcdir =        .
39
40 .PATH:          .
41 BACULASRC =     /home/kern/bee/bacula/bacula
42
43 basedir = ..
44 topdir = ..
45 thisdir = docs
46
47 #
48 # Distribution variables
49 #
50
51 de_dirs = manuals/de/console manuals/de/developers manuals/de/main \
52   manuals/de/misc manuals/de/problems manuals/de/utility
53
54
55 en_dirs = manuals/en/console manuals/en/developers manuals/en/main \
56   manuals/en/misc manuals/en/problems manuals/en/utility
57
58 es_dirs = manuals/es/console manuals/es/developers manuals/es/main \
59   manuals/es/misc manuals/es/problems manuals/es/utility
60
61 fr_dirs = manuals/fr/console manuals/fr/developers manuals/fr/main \
62   manuals/fr/misc manuals/fr/problems manuals/fr/utility
63
64 all_dirs = ${de_dirs} ${en_dirs} ${es_dirs} ${fr_dirs}
65
66 LANGUAGES= en fr de es
67
68 #-------------------------------------------------------------------------
69
70 #en: pdftex
71
72 all: pdftex web clean
73 #       @for I in ${en_dirs}; \
74 #         do (cd $$I; echo "==>Entering directory `pwd`"; \
75 #             $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
76 #                           echo ""; echo ""; exit 1;)); \
77 #       done
78 #       @echo "All manuals built ..."
79
80
81 external-references:
82         @echo " "
83         @echo -n "Building external references file..."
84         @find ${en_dirs} -mindepth 0 -maxdepth 1 -name "*tex" -exec grep -q '\label' {} \; -print| awk -F/ '{ print "\\externaldocument[" $$3 "-]{../"$$3"/"$$4"}"}'|sed -e 's/.tex//g' > `pwd`/latex/external-references.tex
85         @for I in ${en_dirs}; \
86           do (cd $$I; cp -f ../../version.tex .; cp -f ../../bacula.sty .;); \
87         done
88         @for I in ${en_dirs}; \
89           do (cd $$I; echo "==>Entering directory `pwd`"; \
90               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
91                             echo ""; echo ""; exit 1;)); \
92         done
93         @echo "External references for all manuals built."
94
95 pdftex: external-references
96         @for I in ${en_dirs}; \
97           do (cd $$I; cp -f ../../version.tex .; cp -f ../../bacula.sty .; ); \
98         done
99         @for I in ${en_dirs}; \
100           do (cd $$I; echo "==>Entering directory `pwd`"; \
101               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
102                             echo ""; echo ""; exit 1;)); \
103         done
104         @echo "All manuals built ..."
105
106 web:
107         @for I in ${en_dirs}; \
108           do (cd $$I; cp -f ../../version.tex .; cp -f ../../bacula.sty .;); \
109         done
110         @for I in ${en_dirs}; \
111           do (cd $$I; echo "==>Entering directory `pwd`"; \
112               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
113                             echo ""; echo ""; exit 1;)); \
114         done
115         @(cd tools ; ./htmls.sh)
116         @cp ./images/png/borg-logo.png manuals/en/pdf-and-html/images
117         @cp ./images/png/borg-next.png manuals/en/pdf-and-html/images/next.png
118         @cp ./images/png/borg-next_g.png manuals/en/pdf-and-html/images/next_g.png
119         @cp ./images/png/borg-previous.png manuals/en/pdf-and-html/images/prev.png
120         @cp ./images/png/borg-previous_g.png manuals/en/pdf-and-html/images/prev_g.png
121         @cp ./images/png/borg-up.png manuals/en/pdf-and-html/images/up.png
122         @cp ./images/png/borg-up_g.png manuals/en/pdf-and-html/images/up_g.png
123         @cp ./images/png/borg-contents.png manuals/en/pdf-and-html/images/contents.png
124         @cp ./images/png/borg-index.png manuals/en/pdf-and-html/images/index.png
125         @echo "All manuals built ..."
126
127
128 fr:     french
129
130 french:
131         @for I in ${fr_dirs}; do (cd $$I; cp -f ../../version.tex .; cp -f ../../bacula.sty .;); done
132         @for I in ${fr_dirs}; \
133           do (cd $$I; echo "==>Entering directory `pwd`"; \
134               $(MAKE) all || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
135                             echo ""; echo ""; exit 1;)); \
136         done
137
138 de:     german
139
140 german:
141         @for I in ${de_dirs}; do (cd $$I; cp -f ../.. .; cp -f ../../bacula.sty .;); done
142         @for I in ${de_dirs}; \
143           do (cd $$I; echo "==>Entering directory `pwd`"; \
144               $(MAKE) all || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
145                             echo ""; echo ""; exit 1;)); \
146         done
147
148 es:     spanish
149
150 spanish:
151         @for I in ${es_dirs}; do (cd $$I; cp -f ../../version.tex .; cp -f ../../bacula.sty .;); done
152         @for I in ${es_dirs}; \
153           do (cd $$I; echo "==>Entering directory `pwd`"; \
154               $(MAKE) all || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
155                             echo ""; echo ""; exit 1;)); \
156         done
157
158
159 $(basedir)/$(VERNAME).lsm: LSM.in $(srcdir)/../autoconf/Make.common.in $(srcdir)/../src/version.h
160         $(SED) $(SEDREPLACE) < $(srcdir)/LSM.in > $@
161
162 clean:
163         $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
164         find . -type l -exec rm {} \;
165         @for I in ${all_dirs}; \
166           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
167         (cd manuals/en/pdf-and-html; $(RMF) -r *.aux *.out *.idx *.toc *.cdx *.ddx *.fdx *.log *.sdx)
168
169 mini-clean:
170         $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
171         find . -type l -exec rm {} \;
172         @for I in ${all_dirs}; \
173           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
174
175 realclean: clean
176
177 distclean: clean
178         $(RMF) Makefile
179         $(RMF) -r CVS html-manual/CVS home-page/CVS techlogs/CVS
180         $(RMF) -rf autom4te.cache bacula-doc-* config.log config.out
181         $(RMF) -f config.status kernsconfig
182         @for I in ${all_dirs}; \
183           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
184         @echo "Removing the HTML directories..."
185         @for L in $(LANGUAGES) ; \
186         do rm -rf manuals/$$L/pdf-and-html ; done
187         @echo "HTML directories removed."
188         @echo "Cleaning the latex directory..."
189         @rm -f latex/external-references
190         @echo "latex directory cleaned up"
191
192
193 devclean:
194         $(RMF) Makefile
195
196 depend:
197
198 install:
199 #       $(INSTALL_DATA) bacula.1 $(DESTDIR)$(mandir)/$(manprefix)bacula.$(manext)
200
201 uninstall:
202 #       -cd $(mandir); $(RMF) $(manprefix)bacula.$(manext)