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/make_catalog_backup src/cats/delete_catalog_backup
121 chmod 755 src/cats/alter_mysql_tables
122 chmod 755 src/cats/create_sqlite_database
123 chmod 755 src/cats/alter_sqlite_tables
124 chmod 755 src/cats/create_bdb_database
125 chmod 755 src/cats/grant_mysql_privileges
128 @for I in ${all_subdirs}; \
129 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
130 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
131 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
134 # clean for distribution
136 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
137 @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
138 @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
139 @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
140 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
141 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
142 @$(RMF) console gconsole
143 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
145 @$(RMF) -r CVS testsuite/CVS testsuite/config/CVS testsuite/console.test/CVS
146 @$(RMF) -r examples/devices/CVS autoconf/CVS autoconf/gnome-macros/CVS
147 @$(RMF) -r doc/techlogs/2002/CVS doc/techlogs/2001/CVS doc/techlogs/1.27/CVS
148 @$(RMF) -r examples/CVS intl/CVS scripts/CVS
149 @$(RMF) -r po/CVS src/immortal/CVS rescue/freebsd/CVS rescue/solaris/CVS
153 mkdir ../$(VERNAME)/autoconf;
154 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
157 $(CP) -p $(DIST) ../$(VERNAME);
158 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
159 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
161 distrib: configure autoconf/config.h.in distdirs distcopy
164 $(CP) ./autoconf/config.guess .
170 tar.gz: ../$(VERNAME).tar.gz
171 ../$(VERNAME).tar.gz:
172 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
174 tar.Z: ../$(VERNAME).tar.Z
176 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
178 tar.bz2: ../$(VERNAME).tar.bz2
179 ../$(VERNAME).tar.bz2:
180 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
183 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
185 # ------------------------------------------------------------------------