]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
2080ba37b96d6aaae4709fefd5a4adb0ba31b3fc
[bacula/bacula] / bacula / Makefile.in
1
2 # Master Makefile
3 #
4 # Author: Kern Sibbald
5 # License: LGPLv3
6 #
7 @MCOMMON@
8
9 working_dir=@working_dir@
10 dir_group=@dir_group@
11 dir_user=@dir_user@
12
13 srcdir =        @srcdir@
14 VPATH =         @srcdir@
15 .PATH:          @srcdir@
16 topdir = .
17 thisdir = .
18
19
20 first_rule: all
21 dummy:
22
23 # --client-only directories
24 fd_subdirs = src scripts src/lib src/findlib src/filed \
25        @READLINE_SRC@ @BAT_DIR@ src/console @FD_PLUGIN_DIR@
26
27 # Non-client-only directores
28 subdirs =    src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
29
30 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
31
32 DIST =  INSTALL README.configure configure Makefile Makefile.in ChangeLog
33
34 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
35         autoconf/config.h.in  autoconf/acconfig.h  autoconf/Make.common.in \
36         autoconf/install-sh autoconf/mkinstalldirs
37
38 doc_files = VERIFYING technotes ChangeLog README ReleaseNotes LICENSE \
39             INSTALL
40
41 MKDIR = $(srcdir)/autoconf/mkinstalldirs
42 LIBTOOL_DEPS = @LIBTOOL_DEPS@
43
44 #-------------------------------------------------------------------------
45
46 all: Makefile
47         @for I in ${all_subdirs}; \
48           do (cd $$I; echo "==>Entering directory `pwd`"; \
49               $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
50                             echo ""; echo ""; false ) || false) || exit 1; \
51         done
52
53 depend:
54         @for I in ${all_subdirs}; \
55           do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
56         
57 bacula-fd: Makefile        
58         @for I in ${fd_subdirs}; \
59           do (cd $$I; echo "==>Entering directory `pwd`"; \
60               $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo "   ====== Error in `pwd` ======"; \
61                             echo ""; echo ""; false ) || false) || exit 1; \
62         done
63
64 #-------------------------------------------------------------------------
65
66 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/* autoconf/libtool/*
67
68 #  Note, the following is needed in the above if ever any new macro is added.
69 #   However, at the current time, the -I libtool causes the autoconf/aclocal.m4
70 #   get messed up, so this is commented out
71 #       cd autoconf && aclocal -I bacula-macros -I gettext-macros -I libtool
72
73 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
74         cd $(srcdir);
75         ${RMF} config.cache config.log config.out config.status src/config.h
76         ${RMF} -r autoconf/autom4te.cache autom4te.cache
77         autoconf --prepend-include=$(srcdir)/autoconf \
78         autoconf/configure.in > configure
79         chmod 755 configure
80         ${RMF} -r autoconf/autom4te.cache autom4te.cache
81
82 config.status:
83         if test -x config.status; then config.status --recheck; \
84         else $(SHELL) configure; fi
85
86 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
87         cd $(srcdir);
88         ${RMF} config.cache config.log config.out config.status src/config.h
89         autoheader --prepend-include=$(srcdir)/autoconf \
90         autoconf/configure.in > autoconf/config.h.in
91         chmod 644 autoconf/config.h.in
92
93 libtool: Makefile $(LIBTOOL_DEPS)
94         $(SHELL) ./config.status --recheck
95
96 installdirs:
97         $(MKDIR) $(DESTDIR)$(sbindir)
98         $(MKDIR) $(DESTDIR)$(sysconfdir)
99         chmod 770 $(DESTDIR)$(sysconfdir)
100         -if test "x$(dir_user)" != "x" ; then \
101            chown $(dir_user) $(DESTDIR)$(sysconfdir); \
102         fi
103         -if test "x$(dir_group)" != "x" ; then \
104            chgrp $(dir_group) $(DESTDIR)$(sysconfdir); \
105         fi
106         $(MKDIR) $(DESTDIR)$(scriptdir)
107         $(MKDIR) $(DESTDIR)$(docdir)
108         $(MKDIR) $(DESTDIR)$(archivedir)
109         -if test ! -d $(DESTDIR)$(working_dir) ; then \
110            $(MKDIR) $(DESTDIR)$(working_dir); \
111            chmod 770 $(DESTDIR)$(working_dir); \
112         fi
113         -if test "x$(dir_user)" != "x" ; then \
114            chown $(dir_user) $(DESTDIR)$(working_dir); \
115         fi
116         -if test "x$(dir_group)" != "x" ; then \
117            chgrp $(dir_group) $(DESTDIR)$(working_dir); \
118         fi
119
120 install: installdirs
121         @for I in $(doc_files) ; do $(INSTALL_DATA) $$I $(DESTDIR)${docdir}; done
122         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
123
124 uninstall:
125         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
126
127 install-autostart:
128         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
129
130 install-autostart-dir:
131         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
132
133 install-autostart-fd:
134         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
135
136 install-autostart-sd:
137         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
138
139 uninstall-autostart:
140         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
141
142 uninstall-autostart-dir:
143         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
144
145 uninstall-autostart-fd:
146         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
147
148 uninstall-autostart-sd:
149         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
150
151 Makefile: Makefile.in
152         cd $(topdir) \
153             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
154
155 Makefiles:
156         $(SHELL) config.status
157         (cd scripts; \
158          chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
159          chmod 755 mtx-changer bconsole gconsole devel_bacula; \
160          chmod 755 dvd-handler)
161
162         (cd src/cats; \
163          chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
164          chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
165          chmod 755 make_catalog_backup delete_catalog_backup)
166
167         @for I in @DB_BACKENDS@ ; do \
168           (cd src/cats; \
169            chmod 755 create_$${I}_database update_$${I}_tables make_$${I}_tables; \
170            chmod 755 grant_$${I}_privileges drop_$${I}_tables drop_$${I}_database); \
171           done
172
173         (cd src/qt-console; \
174          chmod 755 install_conf_file build-depkgs-qt-console)
175
176 clean:
177         @for I in ${all_subdirs} ; \
178           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
179         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
180         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
181         @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
182         @$(RMF) -r autom4te.cache
183         @find . -name ".#*" -exec $(RMF) {} \;
184
185
186 # clean for distribution
187 distclean:
188         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
189         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
190         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
191         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
192         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
193         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
194         @$(RMF) bconsole gconsole
195         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
196         @$(RMF) working/* kerns-* 
197         @$(RMF) -rf txt diff src/python src/testprogs
198         @$(RMF) libtool
199
200 devclean:
201         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
202         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
203         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
204         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
205         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
206         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
207         @$(RMF) bconsole gconsole
208         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
209         @$(RMF) working/*
210
211 distdirs:
212         mkdir ../$(VERNAME);
213         mkdir ../$(VERNAME)/autoconf;
214         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
215
216 distcopy:
217         $(CP) -p $(DIST) ../$(VERNAME);
218         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
219         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
220
221 distrib: configure autoconf/config.h.in distdirs distcopy
222
223 test:
224
225
226 tar.gz:  ../$(VERNAME).tar.gz
227 ../$(VERNAME).tar.gz:
228         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
229
230 tar.Z: ../$(VERNAME).tar.Z
231 ../$(VERNAME).tar.Z:
232         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
233
234 tar.bz2: ../$(VERNAME).tar.bz2
235 ../$(VERNAME).tar.bz2:
236         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
237
238 uuencode: tar.gz
239         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
240
241 # ------------------------------------------------------------------------