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