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)$(scriptdir)
76 $(MKDIR) $(DESTDIR)$(working_dir)
77 # $(MKDIR) $(DESTDIR)$(mandir)
80 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
83 @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
85 install-autostart: install-autostart-dir install-autostart-fd install-autostart-sd
87 install-autostart-dir:
88 (cd platforms; $(MAKE) $@ || exit 1)
91 (cd platforms; $(MAKE) $@ || exit 1)
94 (cd platforms; $(MAKE) $@ || exit 1)
96 uninstall-autostart: uninstall-autostart-dir uninstall-autostart-fd uninstall-autrun-sd
98 uninstall-autostart-dir:
99 (cd platforms; $(MAKE) $@ || exit 1)
101 uninstall-autostart-fd:
102 (cd platforms; $(MAKE) $@ || exit 1)
104 uninstall-autostart-sd:
105 (cd platforms; $(MAKE) $@ || exit 1)
107 Makefile: Makefile.in
109 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
112 $(SHELL) config.status
114 chmod 755 startmysql stopmysql bacula fd startit stopit btraceback; \
115 chmod 755 mtx-changer console gconsole)
116 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
117 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
118 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables
119 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
120 chmod 755 src/cats/create_mysql_database
121 chmod 755 src/cats/make_catalog_backup src/cats/delete_catalog_backup
122 chmod 755 src/cats/alter_mysql_tables
123 chmod 755 src/cats/create_sqlite_database
124 chmod 755 src/cats/alter_sqlite_tables
125 chmod 755 src/cats/create_bdb_database
126 chmod 755 src/cats/grant_mysql_privileges
129 @for I in ${all_subdirs}; \
130 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
131 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
132 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
133 @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
136 # clean for distribution
138 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
139 @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
140 @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
141 @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
142 @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
143 @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
144 @$(RMF) console gconsole
145 @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
147 @$(RMF) -r CVS testsuite/CVS testsuite/config/CVS testsuite/console.test/CVS
148 @$(RMF) -r examples/devices/CVS autoconf/CVS autoconf/gnome-macros/CVS
149 @$(RMF) -r doc/techlogs/2002/CVS doc/techlogs/2001/CVS doc/techlogs/1.27/CVS
150 @$(RMF) -r examples/CVS intl/CVS scripts/CVS
151 @$(RMF) -r po/CVS src/immortal/CVS rescue/freebsd/CVS rescue/solaris/CVS
155 mkdir ../$(VERNAME)/autoconf;
156 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
159 $(CP) -p $(DIST) ../$(VERNAME);
160 $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
161 @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
163 distrib: configure autoconf/config.h.in distdirs distcopy
166 $(CP) ./autoconf/config.guess .
172 tar.gz: ../$(VERNAME).tar.gz
173 ../$(VERNAME).tar.gz:
174 (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
176 tar.Z: ../$(VERNAME).tar.Z
178 (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
180 tar.bz2: ../$(VERNAME).tar.bz2
181 ../$(VERNAME).tar.bz2:
182 (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
185 uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
187 # ------------------------------------------------------------------------