]> git.sur5r.net Git - bacula/docs/blob - docs/Makefile
0475518c9c266ac13f2a1dce8481c93e2e85f78b
[bacula/docs] / docs / Makefile
1 #
2 # $Id$
3 #
4 # autoconf/Make.common.in        -*- Makefile -*-
5 # release date (man), LSM date, version number/name, current maintainer
6 DATE="02 March 2014"
7 LSMDATE=@LSMDATE@
8 VERSION=5.3.2
9 VERNAME=bacula-$(VERSION)#
10 MAINT=Kern Sibbald#
11 MAINTEMAIL=<kern@sibbald.com>#
12 #-------------------------------------------------------------------------
13
14 SHELL = /bin/sh
15
16 # Installation target directories & other installation stuff
17 prefix = /usr/local
18 exec_prefix = ${prefix}
19 binprefix =
20 manprefix =
21 sbindir = ${exec_prefix}/sbin
22 sysconfdir = ${prefix}/etc
23 scriptdir = @scriptdir@
24 mandir = ${datarootdir}/man/man1
25 manext = 1
26 datarootdir=${prefix}/share
27
28 # Tools & program stuff
29 MV = /bin/mv
30 RM = /bin/rm
31 RMF = /bin/rm -f
32 CP = /bin/cp
33 SED = @SED@
34 AWK = /usr/bin/gawk
35 ECHO = /bin/echo
36 CMP = @CMP@
37 INSTALL = /usr/bin/install -c
38 # add the -s to the following in PRODUCTION mode
39 INSTALL_PROGRAM = /usr/bin/install -c -m @SBINPERM@
40 INSTALL_DATA = /usr/bin/install -c -m 644
41 INSTALL_SCRIPT = /usr/bin/install -c -m @SBINPERM@
42 INSTALL_CONFIG = /usr/bin/install -c -m 640
43
44
45 # End of common section of the Makefile
46 #-------------------------------------------------------------------------
47
48 srcdir =        .
49
50 .PATH:          .
51 BACULASRC =     /home/kern/bacula/k/bacula
52
53 basedir = ..
54 topdir = ..
55 thisdir = docs
56
57 #
58 # Distribution variables
59 #
60
61 de_dirs = manuals/de/console manuals/de/developers manuals/de/main \
62   manuals/de/misc manuals/de/problems manuals/de/utility
63
64
65 en_dirs = manuals/en/console manuals/en/developers manuals/en/main \
66   manuals/en/misc manuals/en/problems manuals/en/utility
67
68 es_dirs = manuals/es/console manuals/es/developers manuals/es/main \
69   manuals/es/misc manuals/es/problems manuals/es/utility
70
71 fr_dirs = manuals/fr/console manuals/fr/developers manuals/fr/main \
72   manuals/fr/misc manuals/fr/problems manuals/fr/utility
73
74 all_dirs = ${de_dirs} ${en_dirs} ${es_dirs} ${fr_dirs}
75
76 DIST      = Makefile.in
77 LANGUAGES= en fr de es
78
79 #-------------------------------------------------------------------------
80
81 #en: pdftex
82
83 all: pdftex web clean
84 #       @for I in ${en_dirs}; \
85 #         do (cd $$I; echo "==>Entering directory `pwd`"; \
86 #             $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
87 #                           echo ""; echo ""; exit 1;)); \
88 #       done
89 #       @echo "All manuals built ..."
90
91
92 external-references:
93         @echo " "
94         @echo -n "Building external references file..."
95         @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
96         @for I in ${en_dirs}; \
97           do (cd $$I; echo "==>Entering directory `pwd`"; \
98               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
99                             echo ""; echo ""; exit 1;)); \
100         done
101         @echo "External references for all manuals built."
102
103 pdftex: external-references
104         @for I in ${en_dirs}; \
105           do (cd $$I; echo "==>Entering directory `pwd`"; \
106               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
107                             echo ""; echo ""; exit 1;)); \
108         done
109         @echo "All manuals built ..."
110
111 web:
112         @for I in ${en_dirs}; \
113           do (cd $$I; echo "==>Entering directory `pwd`"; \
114               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
115                             echo ""; echo ""; exit 1;)); \
116         done
117         @(cd tools ; ./htmls.sh)
118         @cp ./images/png/borg-logo.png manuals/en/pdf-and-html/images
119         @cp ./images/png/borg-next.png manuals/en/pdf-and-html/images/next.png
120         @cp ./images/png/borg-next_g.png manuals/en/pdf-and-html/images/next_g.png
121         @cp ./images/png/borg-previous.png manuals/en/pdf-and-html/images/prev.png
122         @cp ./images/png/borg-previous_g.png manuals/en/pdf-and-html/images/prev_g.png
123         @cp ./images/png/borg-up.png manuals/en/pdf-and-html/images/up.png
124         @cp ./images/png/borg-up_g.png manuals/en/pdf-and-html/images/up_g.png
125         @cp ./images/png/borg-contents.png manuals/en/pdf-and-html/images/contents.png
126         @cp ./images/png/borg-index.png manuals/en/pdf-and-html/images/index.png
127         @echo "All manuals built ..."
128
129
130 bacula-web:
131         (cd bacula-web; make)
132
133 fr:     french
134
135 french:
136         @for I in ${fr_dirs}; \
137           do (cd $$I; echo "==>Entering directory `pwd`"; \
138               $(MAKE) all || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
139                             echo ""; echo ""; exit 1;)); \
140         done
141
142 de:     german
143
144 german:
145         @for I in ${de_dirs}; \
146           do (cd $$I; echo "==>Entering directory `pwd`"; \
147               $(MAKE) all || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
148                             echo ""; echo ""; exit 1;)); \
149         done
150
151 es:     spanish
152
153 spanish:
154         @for I in ${es_dirs}; \
155           do (cd $$I; echo "==>Entering directory `pwd`"; \
156               $(MAKE) all || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
157                             echo ""; echo ""; exit 1;)); \
158         done
159
160
161 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
162         cd $(srcdir);
163         ${RMF} -f config.cache config.log config.out config.status src/config.h
164         autoconf --prepend-include=$(srcdir)/autoconf \
165             autoconf/configure.in > configure
166         chmod 755 configure
167
168 Makefile: Makefile.in
169         cd $(topdir) \
170             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
171
172 Makefiles:
173         $(SHELL) config.status
174
175
176 SEDREPLACE = -e 's%@BACULA_VERSION@%$(VERSION)%g;'\
177              -e 's%@BACULA_LSMDATE@%$(LSMDATE)%g;'\
178              -e 's%@BACULA_DATE@%$(DATE)%g;'\
179              -e 's%@BACULA_MAINTEMAIL@%$(MAINTEMAIL)%g;'\
180              -e 's%@BACULA_MAINT@%$(MAINT)%g;'\
181              -e 's%@BACULA_WEBPAGE@%$(WEBPAGE)%g;'\
182              -e 's%@BACULA_WEBMAINTEMAIL@%$(WEBMAINTEMAIL)%g;'\
183              -e 's%@BACULA_WEBMAINT@%$(WEBMAINT)%g;'\
184              -e 's%@BACULA_FTPSITENAME@%$(FTPSITENAME)%g;'\
185              -e 's%@BACULA_FTPSITEDIR@%$(FTPSITEDIR)%g;'
186
187
188 $(basedir)/$(VERNAME).lsm: LSM.in $(srcdir)/../autoconf/Make.common.in $(srcdir)/../src/version.h
189         $(SED) $(SEDREPLACE) < $(srcdir)/LSM.in > $@
190
191 clean:
192         $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
193         (cd bacula-web; make clean)
194         find . -type l -exec rm {} \;
195         @for I in ${all_dirs}; \
196           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
197
198 mini-clean:
199         $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
200         (cd bacula-web; make clean)
201         find . -type l -exec rm {} \;
202         @for I in ${all_dirs}; \
203           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
204
205 realclean: clean
206
207 distclean: clean
208         $(RMF) Makefile
209         $(RMF) -r CVS html-manual/CVS home-page/CVS techlogs/CVS
210         $(RMF) -rf autom4te.cache bacula-doc-* config.log config.out
211         $(RMF) -f config.status kernsconfig
212         (cd bacula-web; make distclean)
213         @for I in ${all_dirs}; \
214           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
215         @echo "Removing the HTML directories..."
216         @for L in $(LANGUAGES) ; \
217         do rm -rf manuals/$$L/pdf-and-html ; done
218         @echo "HTML directories removed."
219         @echo "Cleaning the latex directory..."
220         @rm -f latex/external-references
221         @echo "latex directory cleaned up"
222
223
224 devclean:
225         $(RMF) Makefile
226
227 depend:
228
229 install:
230 #       $(INSTALL_DATA) bacula.1 $(DESTDIR)$(mandir)/$(manprefix)bacula.$(manext)
231
232 uninstall:
233 #       -cd $(mandir); $(RMF) $(manprefix)bacula.$(manext)