6 working_dir=@working_dir@
18 fd_subdirs = src scripts doc src/lib src/findlib src/filed \
22 subdirs = src/cats @READLINE_SRC@ src/console src/dird \
23 src/stored @GNOME_DIR@ src/tools
25 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@}
27 DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
29 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
30 autoconf/config.h.in autoconf/acconfig.h autoconf/Make.common.in \
31 autoconf/install-sh autoconf/mkinstalldirs
33 MKDIR = $(srcdir)/autoconf/mkinstalldirs
35 #-------------------------------------------------------------------------
38 @for I in ${all_subdirs}; \
39 do (cd $$I; echo "==>Entering directory `pwd`"; \
40 $(MAKE) $@ || (echo ""; echo ""; echo -e " \a\a ====== Error in `pwd` ======\a\a"; \
41 echo ""; echo "";)); \
45 @for I in ${all_subdirs}; \
46 do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
49 @for I in ${fd_subdirs}; \
50 do (cd $$I; echo "==>Entering directory `pwd`"; \
51 $(MAKE) all || (echo ""; echo ""; echo -e " \a\a ====== Error in `pwd` ======\a\a"; \
52 echo ""; echo "";)); \
55 #-------------------------------------------------------------------------
56 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
58 ${RMF} -f config.cache config.log config.out config.status src/config.h
59 autoconf --prepend-include=$(srcdir)/autoconf \
60 autoconf/configure.in > configure
63 old-configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
65 ${RMF} -f config.cache config.log config.out config.status src/config.h
66 autoconf --include=$(srcdir)/autoconf \
67 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 $(MKDIR) $(DESTDIR)$(working_dir)
87 # $(MKDIR) $(DESTDIR)$(mandir)
90 $(MKDIR) $(DESTDIR)/usr/share/pixmaps
91 $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
92 $(MKDIR) $(DESTDIR)/usr/share/applications
93 $(MKDIR) $(DESTDIR)/etc/security/console.apps
94 $(MKDIR) $(DESTDIR)/etc/pam.d
96 install-menu: installdirs gnomedirs
97 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
98 ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
99 ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
101 install-menu-xsu: installdirs gnomedirs
102 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
103 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
104 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
106 install-menu-consolehelper: installdirs gnomedirs
107 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
108 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
109 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
110 ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
111 ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
112 ln -s $(DESTDIR)$(sbindir)/consolehelper $(DESTDIR)$(sbindir)/gnome-console
115 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
118 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
121 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
123 install-autostart-dir:
124 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
126 install-autostart-fd:
127 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
129 install-autostart-sd:
130 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
133 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
135 uninstall-autostart-dir:
136 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
138 uninstall-autostart-fd:
139 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
141 uninstall-autostart-sd:
142 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
145 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
146 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
147 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
149 uninstall-menu-consolehelper:
150 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
151 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
152 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
153 rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
154 rm -f $(DESTDIR)/etc/pam.d/gnome-console
155 rm -f $(DESTDIR)/usr/bin/gnome-console
158 Makefile: Makefile.in
160 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
163 $(SHELL) config.status
165 chmod 755 startmysql stopmysql bacula fd startit stopit btraceback; \
166 chmod 755 mtx-changer bconsole gconsole devel_bacula)
169 chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
170 chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
172 chmod 755 create_@DB_NAME@_database update_@DB_NAME@_tables make_@DB_NAME@_tables; \
173 chmod 755 grant_@DB_NAME@_privileges drop_@DB_NAME@_tables drop_@DB_NAME@_database; \
175 chmod 755 make_catalog_backup delete_catalog_backup)
178 @for I in ${all_subdirs}; \
179 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
180 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
181 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
182 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
185 # clean for distribution
187 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
188 @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
189 @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
190 @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
191 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
192 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
193 @$(RMF) bconsole gconsole
194 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
196 @$(RMF) -r examples/devices/CVS autoconf/CVS autoconf/gnome-macros/CVS
197 @$(RMF) -r doc/techlogs/2002/CVS doc/techlogs/2001/CVS doc/techlogs/1.27/CVS
198 @$(RMF) -r examples/CVS intl/CVS scripts/CVS
199 @$(RMF) -r po/CVS src/immortal/CVS rescue/freebsd/CVS rescue/solaris/CVS
200 @$(RMF) -r CVS src/gnome-console/CVS src/tconsole/CVS
203 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
204 @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
205 @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
206 @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
207 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
208 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
209 @$(RMF) bconsole gconsole
210 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
215 mkdir ../$(VERNAME)/autoconf;
216 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
219 $(CP) -p $(DIST) ../$(VERNAME);
220 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
221 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
223 distrib: configure autoconf/config.h.in distdirs distcopy
228 tar.gz: ../$(VERNAME).tar.gz
229 ../$(VERNAME).tar.gz:
230 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
232 tar.Z: ../$(VERNAME).tar.Z
234 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
236 tar.bz2: ../$(VERNAME).tar.bz2
237 ../$(VERNAME).tar.bz2:
238 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
241 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
243 # ------------------------------------------------------------------------