7 working_dir=@working_dir@
21 # --client-only directories
22 fd_subdirs = src scripts src/lib src/findlib src/filed \
23 @READLINE_SRC@ @BAT_DIR@ @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@ \
24 src/console src/plugins/fd
26 # Non-client-only directores
27 subdirs = src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
29 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
31 DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
33 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
34 autoconf/config.h.in autoconf/acconfig.h autoconf/Make.common.in \
35 autoconf/install-sh autoconf/mkinstalldirs
37 MKDIR = $(srcdir)/autoconf/mkinstalldirs
38 LIBTOOL_DEPS = @LIBTOOL_DEPS@
40 #-------------------------------------------------------------------------
43 @for I in ${all_subdirs}; \
44 do (cd $$I; echo "==>Entering directory `pwd`"; \
45 $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
46 echo ""; echo "";)); \
50 @for I in ${all_subdirs}; \
51 do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
54 @for I in ${fd_subdirs}; \
55 do (cd $$I; echo "==>Entering directory `pwd`"; \
56 $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======; \
57 echo ""; echo "";)); \
60 #-------------------------------------------------------------------------
62 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/* autoconf/libtool/*
64 # Note, the following is needed in the above if ever any new macro is added.
65 # However, at the current time, the -I libtool causes the autoconf/aclocal.m4
66 # get messed up, so this is commented out
67 # cd autoconf && aclocal -I bacula-macros -I gettext-macros -I libtool
69 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
71 ${RMF} config.cache config.log config.out config.status src/config.h
72 ${RMF} -r autoconf/autom4te.cache autom4te.cache
73 autoconf --prepend-include=$(srcdir)/autoconf \
74 autoconf/configure.in > configure
76 ${RMF} -r autoconf/autom4te.cache autom4te.cache
79 if test -x config.status; then config.status --recheck; \
80 else $(SHELL) configure; fi
82 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
84 ${RMF} config.cache config.log config.out config.status src/config.h
85 autoheader --prepend-include=$(srcdir)/autoconf \
86 autoconf/configure.in > autoconf/config.h.in
87 chmod 644 autoconf/config.h.in
89 libtool: Makefile $(LIBTOOL_DEPS)
90 $(SHELL) ./config.status --recheck
93 $(MKDIR) $(DESTDIR)$(sbindir)
94 $(MKDIR) $(DESTDIR)$(sysconfdir)
95 $(MKDIR) $(DESTDIR)$(scriptdir)
96 -if test ! -d $(DESTDIR)$(working_dir) ; then \
97 $(MKDIR) $(DESTDIR)$(working_dir); \
98 chmod 770 $(DESTDIR)$(working_dir); \
100 -if test "x$(dir_user)" != "x" ; then \
101 chown $(dir_user) $(DESTDIR)$(working_dir); \
103 -if test "x$(dir_group)" != "x" ; then \
104 chgrp $(dir_group) $(DESTDIR)$(working_dir); \
108 $(MKDIR) $(DESTDIR)/usr/share/pixmaps
109 $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
110 $(MKDIR) $(DESTDIR)/usr/share/applications
111 $(MKDIR) $(DESTDIR)/etc/security/console.apps
112 $(MKDIR) $(DESTDIR)/etc/pam.d
114 install-menu: gnomedirs
115 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
116 ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
117 ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
119 install-menu-xsu: gnomedirs
120 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
121 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
122 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
124 install-menu-consolehelper: gnomedirs
125 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
126 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
127 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
128 ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
129 ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
130 ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
133 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
136 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
139 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
141 install-autostart-dir:
142 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
144 install-autostart-fd:
145 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
147 install-autostart-sd:
148 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
151 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
153 uninstall-autostart-dir:
154 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
156 uninstall-autostart-fd:
157 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
159 uninstall-autostart-sd:
160 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
163 $(RMF) $(DESTDIR)/usr/share/pixmaps/bacula.png
164 $(RMF) $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
165 $(RMF) $(DESTDIR)/usr/share/applications/bacula.desktop
167 uninstall-menu-consolehelper:
168 $(RMF) $(DESTDIR)/usr/share/pixmaps/bacula.png
169 $(RMF) $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
170 $(RMF) $(DESTDIR)/usr/share/applications/bacula.desktop
171 $(RMF) $(DESTDIR)/etc/security/console.apps/gnome-console
172 $(RMF) $(DESTDIR)/etc/pam.d/gnome-console
173 $(RMF) $(DESTDIR)/usr/bin/gnome-console
175 Makefile: Makefile.in
177 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
180 $(SHELL) config.status
182 chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
183 chmod 755 mtx-changer bconsole gconsole devel_bacula; \
184 chmod 755 dvd-handler)
187 chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
188 chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
189 chmod 755 create_@DB_TYPE@_database update_@DB_TYPE@_tables make_@DB_TYPE@_tables; \
190 chmod 755 grant_@DB_TYPE@_privileges drop_@DB_TYPE@_tables drop_@DB_TYPE@_database; \
191 chmod 755 make_catalog_backup delete_catalog_backup)
194 @for I in ${all_subdirs} src/win32; \
195 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
196 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
197 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
198 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
199 @$(RMF) -r autom4te.cache
200 @find . -name ".#*" -exec $(RMF) {} \;
203 # clean for distribution
205 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
206 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
207 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
208 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
209 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
210 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
211 @$(RMF) bconsole gconsole
212 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
213 @$(RMF) working/* kerns-*
214 @$(RMF) -rf txt diff src/python src/testprogs
218 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
219 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
220 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
221 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
222 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
223 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
224 @$(RMF) bconsole gconsole
225 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
230 mkdir ../$(VERNAME)/autoconf;
231 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
234 $(CP) -p $(DIST) ../$(VERNAME);
235 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
236 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
238 distrib: configure autoconf/config.h.in distdirs distcopy
243 tar.gz: ../$(VERNAME).tar.gz
244 ../$(VERNAME).tar.gz:
245 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
247 tar.Z: ../$(VERNAME).tar.Z
249 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
251 tar.bz2: ../$(VERNAME).tar.bz2
252 ../$(VERNAME).tar.bz2:
253 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
256 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
258 # ------------------------------------------------------------------------