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