6 working_dir=@working_dir@
20 # --client-only directories
21 fd_subdirs = src scripts src/lib src/findlib src/filed \
22 @READLINE_SRC@ @BAT_DIR@ @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@ \
25 # Non-client-only directores
26 subdirs = src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
28 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
30 DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
32 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
33 autoconf/config.h.in autoconf/acconfig.h autoconf/Make.common.in \
34 autoconf/install-sh autoconf/mkinstalldirs
36 MKDIR = $(srcdir)/autoconf/mkinstalldirs
38 #-------------------------------------------------------------------------
41 @for I in ${all_subdirs}; \
42 do (cd $$I; echo "==>Entering directory `pwd`"; \
43 $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
44 echo ""; echo "";)); \
48 @for I in ${all_subdirs}; \
49 do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
52 @for I in ${fd_subdirs}; \
53 do (cd $$I; echo "==>Entering directory `pwd`"; \
54 $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======; \
55 echo ""; echo "";)); \
58 #-------------------------------------------------------------------------
59 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/*
60 cd autoconf && aclocal -I bacula-macros -I gettext-macros
62 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
64 ${RMF} -f config.cache config.log config.out config.status src/config.h
65 ${RMF} -rf autoconf/autom4te.cache autom4te.cache
66 autoconf --prepend-include=$(srcdir)/autoconf \
67 autoconf/configure.in > configure
71 if test -x config.status; then config.status --recheck; \
72 else $(SHELL) configure; fi
74 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
76 ${RMF} -f config.cache config.log config.out config.status src/config.h
77 autoheader --prepend-include=$(srcdir)/autoconf \
78 autoconf/configure.in > autoconf/config.h.in
79 chmod 644 autoconf/config.h.in
82 $(MKDIR) $(DESTDIR)$(sbindir)
83 $(MKDIR) $(DESTDIR)$(sysconfdir)
84 $(MKDIR) $(DESTDIR)$(scriptdir)
85 -if test ! -d $(DESTDIR)$(working_dir) ; then \
86 $(MKDIR) $(DESTDIR)$(working_dir); \
87 chmod 770 $(DESTDIR)$(working_dir); \
89 -if test "x$(dir_user)" != "x" ; then \
90 chown $(dir_user) $(DESTDIR)$(working_dir); \
92 -if test "x$(dir_group)" != "x" ; then \
93 chgrp $(dir_group) $(DESTDIR)$(working_dir); \
97 $(MKDIR) $(DESTDIR)/usr/share/pixmaps
98 $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
99 $(MKDIR) $(DESTDIR)/usr/share/applications
100 $(MKDIR) $(DESTDIR)/etc/security/console.apps
101 $(MKDIR) $(DESTDIR)/etc/pam.d
103 install-menu: gnomedirs
104 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
105 ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
106 ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
108 install-menu-xsu: gnomedirs
109 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
110 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
111 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
113 install-menu-consolehelper: gnomedirs
114 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
115 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
116 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
117 ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
118 ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
119 ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
122 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
125 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
128 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
130 install-autostart-dir:
131 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
133 install-autostart-fd:
134 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
136 install-autostart-sd:
137 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
140 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
142 uninstall-autostart-dir:
143 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
145 uninstall-autostart-fd:
146 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
148 uninstall-autostart-sd:
149 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
152 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
153 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
154 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
156 uninstall-menu-consolehelper:
157 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
158 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
159 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
160 rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
161 rm -f $(DESTDIR)/etc/pam.d/gnome-console
162 rm -f $(DESTDIR)/usr/bin/gnome-console
165 Makefile: Makefile.in
167 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
170 $(SHELL) config.status
172 chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
173 chmod 755 mtx-changer bconsole gconsole devel_bacula; \
174 chmod 755 dvd-handler)
177 chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
178 chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
179 chmod 755 create_@DB_TYPE@_database update_@DB_TYPE@_tables make_@DB_TYPE@_tables; \
180 chmod 755 grant_@DB_TYPE@_privileges drop_@DB_TYPE@_tables drop_@DB_TYPE@_database; \
181 chmod 755 make_catalog_backup delete_catalog_backup)
184 @for I in ${all_subdirs} src/win32; \
185 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
186 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
187 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
188 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
189 @$(RMF) -r autom4te.cache
190 @find . -name ".#*" -exec $(RMF) {} \;
193 # clean for distribution
195 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
196 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
197 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
198 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
199 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
200 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
201 @$(RMF) bconsole gconsole
202 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
203 @$(RMF) working/* kerns-*
204 @$(RMF) -rf txt diff src/python src/testprogs
207 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
208 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
209 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
210 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
211 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
212 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
213 @$(RMF) bconsole gconsole
214 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
219 mkdir ../$(VERNAME)/autoconf;
220 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
223 $(CP) -p $(DIST) ../$(VERNAME);
224 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
225 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
227 distrib: configure autoconf/config.h.in distdirs distcopy
232 tar.gz: ../$(VERNAME).tar.gz
233 ../$(VERNAME).tar.gz:
234 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
236 tar.Z: ../$(VERNAME).tar.Z
238 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
240 tar.bz2: ../$(VERNAME).tar.bz2
241 ../$(VERNAME).tar.bz2:
242 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
245 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
247 # ------------------------------------------------------------------------