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@ \
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
39 #-------------------------------------------------------------------------
42 @for I in ${all_subdirs}; \
43 do (cd $$I; echo "==>Entering directory `pwd`"; \
44 $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
45 echo ""; echo "";)); \
49 @for I in ${all_subdirs}; \
50 do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
53 @for I in ${fd_subdirs}; \
54 do (cd $$I; echo "==>Entering directory `pwd`"; \
55 $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======; \
56 echo ""; echo "";)); \
59 #-------------------------------------------------------------------------
60 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/*
61 cd autoconf && aclocal -I bacula-macros -I gettext-macros
63 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
65 ${RMF} -f config.cache config.log config.out config.status src/config.h
66 ${RMF} -rf autoconf/autom4te.cache autom4te.cache
67 autoconf --prepend-include=$(srcdir)/autoconf \
68 autoconf/configure.in > configure
72 if test -x config.status; then config.status --recheck; \
73 else $(SHELL) configure; fi
75 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
77 ${RMF} -f config.cache config.log config.out config.status src/config.h
78 autoheader --prepend-include=$(srcdir)/autoconf \
79 autoconf/configure.in > autoconf/config.h.in
80 chmod 644 autoconf/config.h.in
83 $(MKDIR) $(DESTDIR)$(sbindir)
84 $(MKDIR) $(DESTDIR)$(sysconfdir)
85 $(MKDIR) $(DESTDIR)$(scriptdir)
86 -if test ! -d $(DESTDIR)$(working_dir) ; then \
87 $(MKDIR) $(DESTDIR)$(working_dir); \
88 chmod 770 $(DESTDIR)$(working_dir); \
90 -if test "x$(dir_user)" != "x" ; then \
91 chown $(dir_user) $(DESTDIR)$(working_dir); \
93 -if test "x$(dir_group)" != "x" ; then \
94 chgrp $(dir_group) $(DESTDIR)$(working_dir); \
98 $(MKDIR) $(DESTDIR)/usr/share/pixmaps
99 $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
100 $(MKDIR) $(DESTDIR)/usr/share/applications
101 $(MKDIR) $(DESTDIR)/etc/security/console.apps
102 $(MKDIR) $(DESTDIR)/etc/pam.d
104 install-menu: gnomedirs
105 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
106 ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
107 ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
109 install-menu-xsu: gnomedirs
110 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
111 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
112 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
114 install-menu-consolehelper: gnomedirs
115 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
116 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
117 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
118 ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
119 ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
120 ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
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)
153 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
154 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
155 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
157 uninstall-menu-consolehelper:
158 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
159 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
160 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
161 rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
162 rm -f $(DESTDIR)/etc/pam.d/gnome-console
163 rm -f $(DESTDIR)/usr/bin/gnome-console
166 Makefile: Makefile.in
168 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
171 $(SHELL) config.status
173 chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
174 chmod 755 mtx-changer bconsole gconsole devel_bacula; \
175 chmod 755 dvd-handler)
178 chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
179 chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
180 chmod 755 create_@DB_TYPE@_database update_@DB_TYPE@_tables make_@DB_TYPE@_tables; \
181 chmod 755 grant_@DB_TYPE@_privileges drop_@DB_TYPE@_tables drop_@DB_TYPE@_database; \
182 chmod 755 make_catalog_backup delete_catalog_backup)
185 @for I in ${all_subdirs} src/win32; \
186 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
187 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
188 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
189 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
190 @$(RMF) -r autom4te.cache
191 @find . -name ".#*" -exec $(RMF) {} \;
194 # clean for distribution
196 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
197 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
198 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
199 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
200 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
201 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
202 @$(RMF) bconsole gconsole
203 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
204 @$(RMF) working/* kerns-*
205 @$(RMF) -rf txt diff src/python src/testprogs
208 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
209 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
210 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
211 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
212 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
213 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
214 @$(RMF) bconsole gconsole
215 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
220 mkdir ../$(VERNAME)/autoconf;
221 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
224 $(CP) -p $(DIST) ../$(VERNAME);
225 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
226 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
228 distrib: configure autoconf/config.h.in distdirs distcopy
233 tar.gz: ../$(VERNAME).tar.gz
234 ../$(VERNAME).tar.gz:
235 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
237 tar.Z: ../$(VERNAME).tar.Z
239 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
241 tar.bz2: ../$(VERNAME).tar.bz2
242 ../$(VERNAME).tar.bz2:
243 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
246 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
248 # ------------------------------------------------------------------------