6 working_dir=@working_dir@
20 # --client-only directories
21 fd_subdirs = src scripts src/lib src/findlib src/filed \
22 @READLINE_SRC@ src/console \
23 @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@}
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
70 old-configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
72 ${RMF} -f config.cache config.log config.out config.status src/config.h
73 autoconf --include=$(srcdir)/autoconf \
74 autoconf/configure.in > configure
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} -f 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
90 $(MKDIR) $(DESTDIR)$(sbindir)
91 $(MKDIR) $(DESTDIR)$(sysconfdir)
92 $(MKDIR) $(DESTDIR)$(scriptdir)
93 -if test ! -d $(DESTDIR)$(working_dir) ; then \
94 $(MKDIR) $(DESTDIR)$(working_dir); \
95 chmod 770 $(DESTDIR)$(working_dir); \
97 -if test "x$(dir_user)" != "x" ; then \
98 chown $(dir_user) $(DESTDIR)$(working_dir); \
100 -if test "x$(dir_group)" != "x" ; then \
101 chgrp $(dir_group) $(DESTDIR)$(working_dir); \
103 # $(MKDIR) $(DESTDIR)$(mandir)
106 $(MKDIR) $(DESTDIR)/usr/share/pixmaps
107 $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
108 $(MKDIR) $(DESTDIR)/usr/share/applications
109 $(MKDIR) $(DESTDIR)/etc/security/console.apps
110 $(MKDIR) $(DESTDIR)/etc/pam.d
112 install-menu: gnomedirs
113 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
114 ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
115 ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
117 install-menu-xsu: gnomedirs
118 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
119 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
120 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
122 install-menu-consolehelper: gnomedirs
123 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
124 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
125 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
126 ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
127 ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
128 ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
131 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
134 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
137 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
139 install-autostart-dir:
140 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
142 install-autostart-fd:
143 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
145 install-autostart-sd:
146 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
149 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
151 uninstall-autostart-dir:
152 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
154 uninstall-autostart-fd:
155 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
157 uninstall-autostart-sd:
158 (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
161 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
162 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
163 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
165 uninstall-menu-consolehelper:
166 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
167 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
168 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
169 rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
170 rm -f $(DESTDIR)/etc/pam.d/gnome-console
171 rm -f $(DESTDIR)/usr/bin/gnome-console
174 Makefile: Makefile.in
176 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
179 $(SHELL) config.status
181 chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
182 chmod 755 mtx-changer bconsole gconsole devel_bacula; \
183 chmod 755 dvd-handler)
186 chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
187 chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
188 chmod 755 create_@DB_NAME@_database update_@DB_NAME@_tables make_@DB_NAME@_tables; \
189 chmod 755 grant_@DB_NAME@_privileges drop_@DB_NAME@_tables drop_@DB_NAME@_database; \
190 chmod 755 make_catalog_backup delete_catalog_backup)
193 @for I in ${all_subdirs}; \
194 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
195 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
196 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
197 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
198 @$(RMF) -r autom4te.cache
199 @find . -name .#* -exec $(RMF) {} \;
202 # clean for distribution
204 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
205 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
206 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
207 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
208 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
209 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
210 @$(RMF) bconsole gconsole
211 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
212 @$(RMF) working/* kerns-*
213 @$(RMF) -rf txt diff src/python src/testprogs
216 @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
217 @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
218 @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
219 @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
220 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
221 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
222 @$(RMF) bconsole gconsole
223 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
228 mkdir ../$(VERNAME)/autoconf;
229 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
232 $(CP) -p $(DIST) ../$(VERNAME);
233 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
234 @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
236 distrib: configure autoconf/config.h.in distdirs distcopy
241 tar.gz: ../$(VERNAME).tar.gz
242 ../$(VERNAME).tar.gz:
243 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
245 tar.Z: ../$(VERNAME).tar.Z
247 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
249 tar.bz2: ../$(VERNAME).tar.bz2
250 ../$(VERNAME).tar.bz2:
251 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
254 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
256 # ------------------------------------------------------------------------