]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
Tweak Makefile.in
[bacula/bacula] / bacula / Makefile.in
1
2 # Master Makefile
3 #
4 # Author: Kern Sibbald
5 # License: LGPLv3
6 #
7 @MCOMMON@
8
9 working_dir=@working_dir@
10 dir_group=@dir_group@
11 dir_user=@dir_user@
12
13 srcdir =        @srcdir@
14 VPATH =         @srcdir@
15 .PATH:          @srcdir@
16 topdir = .
17 thisdir = .
18
19
20 first_rule: all
21 dummy:
22
23 # --client-only directories
24 fd_subdirs = src scripts src/lib src/findlib src/filed \
25        @READLINE_SRC@ @BAT_DIR@ src/console @FD_PLUGIN_DIR@
26
27 # Non-client-only directores
28 subdirs =    src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
29
30 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
31
32 DIST =  INSTALL README.configure configure Makefile Makefile.in ChangeLog
33
34 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
35         autoconf/config.h.in  autoconf/acconfig.h  autoconf/Make.common.in \
36         autoconf/install-sh autoconf/mkinstalldirs
37
38 doc_files = VERIFYING technotes ChangeLog README ReleaseNotes LICENSE \
39             INSTALL
40
41 MKDIR = $(srcdir)/autoconf/mkinstalldirs
42 LIBTOOL_DEPS = @LIBTOOL_DEPS@
43
44 #-------------------------------------------------------------------------
45
46 all: Makefile
47         @for I in ${all_subdirs}; \
48           do (cd $$I; echo "==>Entering directory `pwd`"; \
49               $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
50                             echo ""; echo ""; false ) || false) || exit 1; \
51         done
52
53 depend:
54         @for I in ${all_subdirs}; \
55           do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
56         
57 bacula-fd: Makefile        
58         @for I in ${fd_subdirs}; \
59           do (cd $$I; echo "==>Entering directory `pwd`"; \
60               $(MAKE) DESTDIR=$(DESTDIR) all || \
61               (echo ""; echo ""; echo "   ====== Error in `pwd` ======"; \
62                echo ""; echo ""; false ) || false) || exit 1; \
63         done
64
65 #-------------------------------------------------------------------------
66
67 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/* autoconf/libtool/*
68
69 #  Note, the following is needed in the above if ever any new macro is added.
70 #   However, at the current time, the -I libtool causes the autoconf/aclocal.m4
71 #   get messed up, so this is commented out
72 #       cd autoconf && aclocal -I bacula-macros -I gettext-macros -I libtool
73
74 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
75         cd $(srcdir);
76         ${RMF} config.cache config.log config.out config.status src/config.h
77         ${RMF} -r autoconf/autom4te.cache autom4te.cache
78         autoconf --prepend-include=$(srcdir)/autoconf \
79         autoconf/configure.in > configure
80         chmod 755 configure
81         ${RMF} -r autoconf/autom4te.cache autom4te.cache
82
83 config.status:
84         if test -x config.status; then config.status --recheck; \
85         else $(SHELL) configure; fi
86
87 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
88         cd $(srcdir);
89         ${RMF} config.cache config.log config.out config.status src/config.h
90         autoheader --prepend-include=$(srcdir)/autoconf \
91         autoconf/configure.in > autoconf/config.h.in
92         chmod 644 autoconf/config.h.in
93
94 libtool: Makefile $(LIBTOOL_DEPS)
95         $(SHELL) ./config.status --recheck
96
97 installdirs:
98         $(MKDIR) $(DESTDIR)$(sbindir)
99         $(MKDIR) $(DESTDIR)$(sysconfdir)
100         chmod 770 $(DESTDIR)$(sysconfdir)
101         -if test "x$(dir_user)" != "x" ; then \
102            chown $(dir_user) $(DESTDIR)$(sysconfdir); \
103         fi
104         -if test "x$(dir_group)" != "x" ; then \
105            chgrp $(dir_group) $(DESTDIR)$(sysconfdir); \
106         fi
107         $(MKDIR) $(DESTDIR)$(scriptdir)
108         $(MKDIR) $(DESTDIR)$(docdir)
109         $(MKDIR) $(DESTDIR)$(archivedir)
110         -if test ! -d $(DESTDIR)$(working_dir) ; then \
111            $(MKDIR) $(DESTDIR)$(working_dir); \
112            chmod 770 $(DESTDIR)$(working_dir); \
113         fi
114         -if test "x$(dir_user)" != "x" ; then \
115            chown $(dir_user) $(DESTDIR)$(working_dir); \
116         fi
117         -if test "x$(dir_group)" != "x" ; then \
118            chgrp $(dir_group) $(DESTDIR)$(working_dir); \
119         fi
120
121 install: installdirs
122         @for I in $(doc_files) ; do $(INSTALL_DATA) $$I $(DESTDIR)${docdir}; done
123         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
124
125 uninstall:
126         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
127
128 install-autostart:
129         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
130
131 install-autostart-dir:
132         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
133
134 install-autostart-fd:
135         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
136
137 install-autostart-sd:
138         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
139
140 uninstall-autostart:
141         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
142
143 uninstall-autostart-dir:
144         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
145
146 uninstall-autostart-fd:
147         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
148
149 uninstall-autostart-sd:
150         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
151
152 Makefile: Makefile.in
153         cd $(topdir) \
154             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
155
156 Makefiles:
157         $(SHELL) config.status
158         (cd scripts; \
159          chmod 755 startmysql stopmysql bacula startit stopit btraceback \
160             mtx-changer bconsole gconsole devel_bacula dvd-handler)
161         (cd src/cats; \
162          chmod 755 create_bacula_database update_bacula_tables \
163            make_bacula_tables grant_bacula_privileges drop_bacula_tables \
164            drop_bacula_database make_catalog_backup delete_catalog_backup)
165         @for I in @DB_BACKENDS@ ; do \
166           (cd src/cats; \
167            chmod 755 create_$${I}_database update_$${I}_tables \
168               make_$${I}_tables grant_$${I}_privileges drop_$${I}_tables \
169               drop_$${I}_database); \
170           done
171         (cd src/qt-console; \
172          chmod 755 install_conf_file build-depkgs-qt-console)
173
174 clean:
175         @for I in ${all_subdirs} ; \
176           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
177         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
178         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
179         @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
180         @$(RMF) -r autom4te.cache
181         @find . -name ".#*" -exec $(RMF) {} \;
182
183
184 # clean for distribution
185 distclean:
186         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
187         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
188         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
189         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
190         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
191         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
192         @$(RMF) bconsole gconsole
193         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
194         @$(RMF) working/* kerns-* 
195         @$(RMF) -rf txt diff src/python src/testprogs
196         @$(RMF) libtool
197
198 devclean:
199         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
200         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
201         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
202         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
203         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
204         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
205         @$(RMF) bconsole gconsole
206         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
207         @$(RMF) working/*
208
209 distdirs:
210         mkdir ../$(VERNAME);
211         mkdir ../$(VERNAME)/autoconf;
212         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
213
214 distcopy:
215         $(CP) -p $(DIST) ../$(VERNAME);
216         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
217         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
218
219 distrib: configure autoconf/config.h.in distdirs distcopy
220
221 test:
222
223
224 tar.gz:  ../$(VERNAME).tar.gz
225 ../$(VERNAME).tar.gz:
226         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
227
228 tar.Z: ../$(VERNAME).tar.Z
229 ../$(VERNAME).tar.Z:
230         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
231
232 tar.bz2: ../$(VERNAME).tar.bz2
233 ../$(VERNAME).tar.bz2:
234         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
235
236 uuencode: tar.gz
237         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
238
239 # ------------------------------------------------------------------------