9 working_dir=@working_dir@
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@
27 # Non-client-only directores
28 subdirs = src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
30 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
32 DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
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
38 doc_files = VERIFYING technotes ChangeLog README ReleaseNotes LICENSE \
41 MKDIR = $(srcdir)/autoconf/mkinstalldirs
42 LIBTOOL_DEPS = @LIBTOOL_DEPS@
44 #-------------------------------------------------------------------------
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; \
54 @for I in ${all_subdirs}; \
55 do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
58 @for I in ${fd_subdirs}; \
59 do (cd $$I; echo "==>Entering directory `pwd`"; \
60 $(MAKE) DESTDIR=$(DESTDIR) all || \
61 (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
62 echo ""; echo ""; false ) || false) || exit 1; \
65 #-------------------------------------------------------------------------
67 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/* autoconf/libtool/*
69 # Note, the following is needed in the above if ever any new macro is added.
70 # However, at the current time, the -I libtool causes the autoconf/aclocal.m4
71 # get messed up, so this is commented out
72 # cd autoconf && aclocal -I bacula-macros -I gettext-macros -I libtool
74 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
76 ${RMF} config.cache config.log config.out config.status src/config.h
77 ${RMF} -r autoconf/autom4te.cache autom4te.cache
78 autoconf --prepend-include=$(srcdir)/autoconf \
79 autoconf/configure.in > configure
81 ${RMF} -r autoconf/autom4te.cache autom4te.cache
84 if test -x config.status; then config.status --recheck; \
85 else $(SHELL) configure; fi
87 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
89 ${RMF} config.cache config.log config.out config.status src/config.h
90 autoheader --prepend-include=$(srcdir)/autoconf \
91 autoconf/configure.in > autoconf/config.h.in
92 chmod 644 autoconf/config.h.in
94 libtool: Makefile $(LIBTOOL_DEPS)
95 $(SHELL) ./config.status --recheck
98 $(MKDIR) $(DESTDIR)$(sbindir)
99 $(MKDIR) $(DESTDIR)$(sysconfdir)
100 chmod 770 $(DESTDIR)$(sysconfdir)
101 -if test "x$(dir_user)" != "x" ; then \
102 chown $(dir_user) $(DESTDIR)$(sysconfdir); \
104 -if test "x$(dir_group)" != "x" ; then \
105 chgrp $(dir_group) $(DESTDIR)$(sysconfdir); \
107 $(MKDIR) $(DESTDIR)$(scriptdir)
108 $(MKDIR) $(DESTDIR)$(docdir)
109 $(MKDIR) $(DESTDIR)$(archivedir)
110 -if test ! -d $(DESTDIR)$(working_dir) ; then \
111 $(MKDIR) $(DESTDIR)$(working_dir); \
112 chmod 770 $(DESTDIR)$(working_dir); \
114 -if test "x$(dir_user)" != "x" ; then \
115 chown $(dir_user) $(DESTDIR)$(working_dir); \
117 -if test "x$(dir_group)" != "x" ; then \
118 chgrp $(dir_group) $(DESTDIR)$(working_dir); \
122 @for I in $(doc_files) ; do $(INSTALL_DATA) $$I $(DESTDIR)${docdir}; done
123 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
126 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
129 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
131 install-autostart-dir:
132 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
134 install-autostart-fd:
135 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
137 install-autostart-sd:
138 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
141 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
143 uninstall-autostart-dir:
144 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
146 uninstall-autostart-fd:
147 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
149 uninstall-autostart-sd:
150 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
152 Makefile: Makefile.in
154 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
157 $(SHELL) config.status
159 chmod 755 startmysql stopmysql bacula startit stopit btraceback \
160 mtx-changer bconsole gconsole devel_bacula dvd-handler)
162 chmod 755 create_bacula_database update_bacula_tables \
163 make_bacula_tables grant_bacula_privileges drop_bacula_tables \
164 drop_bacula_database make_catalog_backup delete_catalog_backup)
165 @for I in @DB_BACKENDS@ ; do \
167 chmod 755 create_$${I}_database update_$${I}_tables \
168 make_$${I}_tables grant_$${I}_privileges drop_$${I}_tables \
169 drop_$${I}_database); \
171 (cd src/qt-console; \
172 chmod 755 install_conf_file build-depkgs-qt-console)
175 @for I in ${all_subdirs} ; \
176 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
177 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
178 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
179 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
180 @$(RMF) -r autom4te.cache
181 @find . -name ".#*" -exec $(RMF) {} \;
184 # clean for distribution
186 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
187 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
188 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
189 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
190 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
191 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
192 @$(RMF) bconsole gconsole
193 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
194 @$(RMF) working/* kerns-*
195 @$(RMF) -rf txt diff src/python src/testprogs
199 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
200 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
201 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
202 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
203 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
204 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
205 @$(RMF) bconsole gconsole
206 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
211 mkdir ../$(VERNAME)/autoconf;
212 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
215 $(CP) -p $(DIST) ../$(VERNAME);
216 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
217 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
219 distrib: configure autoconf/config.h.in distdirs distcopy
224 tar.gz: ../$(VERNAME).tar.gz
225 ../$(VERNAME).tar.gz:
226 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
228 tar.Z: ../$(VERNAME).tar.Z
230 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
232 tar.bz2: ../$(VERNAME).tar.bz2
233 ../$(VERNAME).tar.bz2:
234 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
237 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
239 # ------------------------------------------------------------------------