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) $@ || 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 autoconf --localdir=$(srcdir)/autoconf \
59 autoconf/configure.in > configure
63 if test -x config.status; then config.status --recheck; \
64 else $(SHELL) configure; fi
66 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
68 autoheader --localdir=$(srcdir)/autoconf \
69 autoconf/configure.in > autoconf/config.h.in
70 chmod 644 autoconf/config.h.in
73 $(MKDIR) $(DESTDIR)$(sbindir)
74 $(MKDIR) $(DESTDIR)$(sysconfdir)
75 $(MKDIR) $(DESTDIR)$(working_dir)
76 # $(MKDIR) $(DESTDIR)$(mandir)
79 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
82 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
84 install-autostart: install-autostart-dir install-autostart-fd install-autostart-sd
86 install-autostart-dir:
87 (cd platforms; $(MAKE) $@ || exit 1)
90 (cd platforms; $(MAKE) $@ || exit 1)
93 (cd platforms; $(MAKE) $@ || exit 1)
95 uninstall-autostart: uninstall-autostart-dir uninstall-autostart-fd uninstall-autrun-sd
97 uninstall-autostart-dir:
98 (cd platforms; $(MAKE) $@ || exit 1)
100 uninstall-autostart-fd:
101 (cd platforms; $(MAKE) $@ || exit 1)
103 uninstall-autostart-sd:
104 (cd platforms; $(MAKE) $@ || exit 1)
106 Makefile: Makefile.in
108 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
111 $(SHELL) config.status
113 chmod 755 startmysql stopmysql bacula fd startit stopit btraceback; \
114 chmod 755 mtx-changer console gconsole)
115 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
116 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
117 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables
118 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
119 chmod 755 src/cats/create_mysql_database
120 chmod 755 src/cats/alter_mysql_tables
121 chmod 755 src/cats/create_sqlite_database
122 chmod 755 src/cats/alter_sqlite_tables
123 chmod 755 src/cats/create_bdb_database
124 chmod 755 src/cats/grant_mysql_privileges
127 @for I in ${all_subdirs}; \
128 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
129 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
130 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
133 # clean for distribution
135 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
136 @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
137 @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
138 @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
139 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
140 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
141 @$(RMF) console gconsole
142 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
144 @$(RMF) -r CVS testsuite/CVS testsuite/config/CVS testsuite/console.test/CVS
145 @$(RMF) -r examples/devices/CVS autoconf/CVS autoconf/gnome-macros/CVS
146 @$(RMF) -r doc/techlogs/2002/CVS doc/techlogs/2001/CVS doc/techlogs/1.27/CVS
147 @$(RMF) -r examples/CVS intl/CVS scripts/CVS
148 @$(RMF) -r po/CVS src/immortal/CVS rescue/freebsd/CVS rescue/solaris/CVS
152 mkdir ../$(VERNAME)/autoconf;
153 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
156 $(CP) -p $(DIST) ../$(VERNAME);
157 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
158 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
160 distrib: configure autoconf/config.h.in distdirs distcopy
163 $(CP) ./autoconf/config.guess .
169 tar.gz: ../$(VERNAME).tar.gz
170 ../$(VERNAME).tar.gz:
171 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
173 tar.Z: ../$(VERNAME).tar.Z
175 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
177 tar.bz2: ../$(VERNAME).tar.bz2
178 ../$(VERNAME).tar.bz2:
179 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
182 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
184 # ------------------------------------------------------------------------