]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
Update
[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
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
39 #-------------------------------------------------------------------------
40
41 all: Makefile
42         @for I in ${all_subdirs}; \
43           do (cd $$I; echo "==>Entering directory `pwd`"; \
44               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
45                             echo ""; echo "";)); \
46         done
47
48 depend:
49         @for I in ${all_subdirs}; \
50           do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
51         
52 bacula-fd: Makefile        
53         @for I in ${fd_subdirs}; \
54           do (cd $$I; echo "==>Entering directory `pwd`"; \
55               $(MAKE) all || (echo ""; echo ""; echo "   ====== Error in `pwd` ======; \
56                             echo ""; echo "";)); \
57         done
58
59 #-------------------------------------------------------------------------
60 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/*
61         cd autoconf && aclocal -I bacula-macros -I gettext-macros
62
63 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
64         cd $(srcdir);
65         ${RMF} -f config.cache config.log config.out config.status src/config.h
66         ${RMF} -rf autoconf/autom4te.cache autom4te.cache
67         autoconf --prepend-include=$(srcdir)/autoconf \
68         autoconf/configure.in > configure
69         chmod 755 configure
70
71 config.status:
72         if test -x config.status; then config.status --recheck; \
73         else $(SHELL) configure; fi
74
75 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
76         cd $(srcdir);
77         ${RMF} -f config.cache config.log config.out config.status src/config.h
78         autoheader --prepend-include=$(srcdir)/autoconf \
79         autoconf/configure.in > autoconf/config.h.in
80         chmod 644 autoconf/config.h.in
81
82 installdirs:
83         $(MKDIR) $(DESTDIR)$(sbindir)
84         $(MKDIR) $(DESTDIR)$(sysconfdir)
85         $(MKDIR) $(DESTDIR)$(scriptdir)
86         -if test ! -d $(DESTDIR)$(working_dir) ; then \
87            $(MKDIR) $(DESTDIR)$(working_dir); \
88            chmod 770 $(DESTDIR)$(working_dir); \
89         fi
90         -if test "x$(dir_user)" != "x" ; then \
91            chown $(dir_user) $(DESTDIR)$(working_dir); \
92         fi
93         -if test "x$(dir_group)" != "x" ; then \
94            chgrp $(dir_group) $(DESTDIR)$(working_dir); \
95         fi
96
97 gnomedirs:
98         $(MKDIR) $(DESTDIR)/usr/share/pixmaps
99         $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
100         $(MKDIR) $(DESTDIR)/usr/share/applications
101         $(MKDIR) $(DESTDIR)/etc/security/console.apps
102         $(MKDIR) $(DESTDIR)/etc/pam.d
103
104 install-menu: gnomedirs
105         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
106         ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
107         ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
108
109 install-menu-xsu: gnomedirs
110         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
111         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
112         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
113
114 install-menu-consolehelper: gnomedirs
115         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
116         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
117         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
118         ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
119         ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
120         ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
121
122 install: installdirs
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 uninstall-menu:
153         rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
154         rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
155         rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
156
157 uninstall-menu-consolehelper:
158         rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
159         rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
160         rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
161         rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
162         rm -f $(DESTDIR)/etc/pam.d/gnome-console
163         rm -f $(DESTDIR)/usr/bin/gnome-console
164
165
166 Makefile: Makefile.in
167         cd $(topdir) \
168             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
169
170 Makefiles:
171         $(SHELL) config.status
172         (cd scripts; \
173          chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
174          chmod 755 mtx-changer bconsole gconsole devel_bacula; \
175          chmod 755 dvd-handler)
176
177         (cd src/cats; \
178          chmod 755 create_bacula_database      update_bacula_tables     make_bacula_tables; \
179          chmod 755 grant_bacula_privileges     drop_bacula_tables       drop_bacula_database; \
180          chmod 755 create_@DB_TYPE@_database   update_@DB_TYPE@_tables  make_@DB_TYPE@_tables; \
181          chmod 755 grant_@DB_TYPE@_privileges  drop_@DB_TYPE@_tables    drop_@DB_TYPE@_database; \
182          chmod 755 make_catalog_backup delete_catalog_backup)
183
184 clean:
185         @for I in ${all_subdirs} src/win32; \
186           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
187         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
188         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
189         @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
190         @$(RMF) -r autom4te.cache
191         @find . -name ".#*" -exec $(RMF) {} \;
192
193
194 # clean for distribution
195 distclean:
196         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
197         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
198         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
199         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
200         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
201         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
202         @$(RMF) bconsole gconsole
203         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
204         @$(RMF) working/* kerns-* 
205         @$(RMF) -rf txt diff src/python src/testprogs
206
207 devclean:
208         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
209         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
210         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
211         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
212         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
213         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
214         @$(RMF) bconsole gconsole
215         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
216         @$(RMF) working/*
217
218 distdirs:
219         mkdir ../$(VERNAME);
220         mkdir ../$(VERNAME)/autoconf;
221         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
222
223 distcopy:
224         $(CP) -p $(DIST) ../$(VERNAME);
225         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
226         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
227
228 distrib: configure autoconf/config.h.in distdirs distcopy
229
230 test:
231
232
233 tar.gz:  ../$(VERNAME).tar.gz
234 ../$(VERNAME).tar.gz:
235         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
236
237 tar.Z: ../$(VERNAME).tar.Z
238 ../$(VERNAME).tar.Z:
239         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
240
241 tar.bz2: ../$(VERNAME).tar.bz2
242 ../$(VERNAME).tar.bz2:
243         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
244
245 uuencode: tar.gz
246         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
247
248 # ------------------------------------------------------------------------