6 working_dir=@working_dir@
18 # --client-only directories
19 fd_subdirs = src scripts doc src/lib src/findlib src/filed \
20 @READLINE_SRC@ src/console rescue rescue/linux \
21 @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@
23 # Non-client-only directores
24 subdirs = src/cats src/dird src/stored src/tools
26 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@}
28 DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
30 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
31 autoconf/config.h.in autoconf/acconfig.h autoconf/Make.common.in \
32 autoconf/install-sh autoconf/mkinstalldirs
34 MKDIR = $(srcdir)/autoconf/mkinstalldirs
36 #-------------------------------------------------------------------------
39 @for I in ${all_subdirs}; \
40 do (cd $$I; echo "==>Entering directory `pwd`"; \
41 $(MAKE) $@ || (echo ""; echo ""; echo -e " \a\a ====== Error in `pwd` ======\a\a"; \
42 echo ""; echo "";)); \
46 @for I in ${all_subdirs}; \
47 do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
50 @for I in ${fd_subdirs}; \
51 do (cd $$I; echo "==>Entering directory `pwd`"; \
52 $(MAKE) all || (echo ""; echo ""; echo -e " \a\a ====== Error in `pwd` ======\a\a"; \
53 echo ""; echo "";)); \
56 #-------------------------------------------------------------------------
57 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
59 ${RMF} -f config.cache config.log config.out config.status src/config.h
60 WANT_AUTOCONF=2.5 autoconf --prepend-include=$(srcdir)/autoconf \
61 autoconf/configure.in > configure
64 old-configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
66 ${RMF} -f config.cache config.log config.out config.status src/config.h
67 autoconf --include=$(srcdir)/autoconf \
68 autoconf/configure.in > configure
73 if test -x config.status; then config.status --recheck; \
74 else $(SHELL) configure; fi
76 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
78 ${RMF} -f config.cache config.log config.out config.status src/config.h
79 WANT_AUTOCONF=2.5 autoheader --prepend-include=$(srcdir)/autoconf \
80 autoconf/configure.in > autoconf/config.h.in
81 chmod 644 autoconf/config.h.in
84 $(MKDIR) $(DESTDIR)$(sbindir)
85 $(MKDIR) $(DESTDIR)$(sysconfdir)
86 $(MKDIR) $(DESTDIR)$(scriptdir)
87 $(MKDIR) $(DESTDIR)$(working_dir)
88 # $(MKDIR) $(DESTDIR)$(mandir)
91 $(MKDIR) $(DESTDIR)/usr/share/pixmaps
92 $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
93 $(MKDIR) $(DESTDIR)/usr/share/applications
94 $(MKDIR) $(DESTDIR)/etc/security/console.apps
95 $(MKDIR) $(DESTDIR)/etc/pam.d
97 install-menu: gnomedirs
98 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
99 ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
100 ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
102 install-menu-xsu: gnomedirs
103 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
104 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
105 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
107 install-menu-consolehelper: gnomedirs
108 ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
109 ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
110 ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
111 ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
112 ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
113 ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
116 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
119 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
122 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
124 install-autostart-dir:
125 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
127 install-autostart-fd:
128 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
130 install-autostart-sd:
131 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
134 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
136 uninstall-autostart-dir:
137 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
139 uninstall-autostart-fd:
140 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
142 uninstall-autostart-sd:
143 (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
146 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
147 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
148 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
150 uninstall-menu-consolehelper:
151 rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
152 rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
153 rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
154 rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
155 rm -f $(DESTDIR)/etc/pam.d/gnome-console
156 rm -f $(DESTDIR)/usr/bin/gnome-console
159 Makefile: Makefile.in
161 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
164 $(SHELL) config.status
166 chmod 755 startmysql stopmysql bacula fd startit stopit btraceback; \
167 chmod 755 mtx-changer bconsole gconsole devel_bacula)
170 chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
171 chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
173 chmod 755 create_@DB_NAME@_database update_@DB_NAME@_tables make_@DB_NAME@_tables; \
174 chmod 755 grant_@DB_NAME@_privileges drop_@DB_NAME@_tables drop_@DB_NAME@_database; \
176 chmod 755 make_catalog_backup delete_catalog_backup)
179 @for I in ${all_subdirs}; \
180 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
181 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
182 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
183 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
186 # clean for distribution
188 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
189 @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
190 @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
191 @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
192 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
193 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
194 @$(RMF) bconsole gconsole
195 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
197 @$(RMF) -r examples/devices/CVS autoconf/CVS autoconf/gnome-macros/CVS
198 @$(RMF) -r doc/techlogs/2002/CVS doc/techlogs/2001/CVS doc/techlogs/1.27/CVS
199 @$(RMF) -r examples/CVS intl/CVS scripts/CVS
200 @$(RMF) -r po/CVS src/immortal/CVS rescue/freebsd/CVS rescue/solaris/CVS
201 @$(RMF) -r CVS src/gnome-console/CVS src/tconsole/CVS
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
216 mkdir ../$(VERNAME)/autoconf;
217 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
220 $(CP) -p $(DIST) ../$(VERNAME);
221 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
222 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
224 distrib: configure autoconf/config.h.in distdirs distcopy
229 tar.gz: ../$(VERNAME).tar.gz
230 ../$(VERNAME).tar.gz:
231 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
233 tar.Z: ../$(VERNAME).tar.Z
235 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
237 tar.bz2: ../$(VERNAME).tar.bz2
238 ../$(VERNAME).tar.bz2:
239 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
242 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
244 # ------------------------------------------------------------------------