]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
Merge branch 'master' into basejobv3
[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@ @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 doc_files = VERIFYING technotes ChangeLog README ReleaseNotes LICENSE \
38             INSTALL
39
40 MKDIR = $(srcdir)/autoconf/mkinstalldirs
41 LIBTOOL_DEPS = @LIBTOOL_DEPS@
42
43 #-------------------------------------------------------------------------
44
45 all: Makefile
46         @for I in ${all_subdirs}; \
47           do (cd $$I; echo "==>Entering directory `pwd`"; \
48               $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
49                             echo ""; echo ""; exit 1;)); \
50         done
51
52 depend:
53         @for I in ${all_subdirs}; \
54           do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
55         
56 bacula-fd: Makefile        
57         @for I in ${fd_subdirs}; \
58           do (cd $$I; echo "==>Entering directory `pwd`"; \
59               $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo "   ====== Error in `pwd` ======; \
60                             echo ""; echo ""; exit 1;)); \
61         done
62
63 #-------------------------------------------------------------------------
64
65 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/* autoconf/libtool/*
66
67 #  Note, the following is needed in the above if ever any new macro is added.
68 #   However, at the current time, the -I libtool causes the autoconf/aclocal.m4
69 #   get messed up, so this is commented out
70 #       cd autoconf && aclocal -I bacula-macros -I gettext-macros -I libtool
71
72 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
73         cd $(srcdir);
74         ${RMF} config.cache config.log config.out config.status src/config.h
75         ${RMF} -r autoconf/autom4te.cache autom4te.cache
76         autoconf --prepend-include=$(srcdir)/autoconf \
77         autoconf/configure.in > configure
78         chmod 755 configure
79         ${RMF} -r autoconf/autom4te.cache autom4te.cache
80
81 config.status:
82         if test -x config.status; then config.status --recheck; \
83         else $(SHELL) configure; fi
84
85 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
86         cd $(srcdir);
87         ${RMF} config.cache config.log config.out config.status src/config.h
88         autoheader --prepend-include=$(srcdir)/autoconf \
89         autoconf/configure.in > autoconf/config.h.in
90         chmod 644 autoconf/config.h.in
91
92 libtool: Makefile $(LIBTOOL_DEPS)
93         $(SHELL) ./config.status --recheck
94
95 installdirs:
96         $(MKDIR) $(DESTDIR)$(sbindir)
97         $(MKDIR) $(DESTDIR)$(sysconfdir)
98         $(MKDIR) $(DESTDIR)$(scriptdir)
99         $(MKDIR) $(DESTDIR)$(docdir)
100         $(MKDIR) $(DESTDIR)$(archivedir)
101         -if test ! -d $(DESTDIR)$(working_dir) ; then \
102            $(MKDIR) $(DESTDIR)$(working_dir); \
103            chmod 770 $(DESTDIR)$(working_dir); \
104         fi
105         -if test "x$(dir_user)" != "x" ; then \
106            chown $(dir_user) $(DESTDIR)$(working_dir); \
107         fi
108         -if test "x$(dir_group)" != "x" ; then \
109            chgrp $(dir_group) $(DESTDIR)$(working_dir); \
110         fi
111
112 gnomedirs:
113         $(MKDIR) $(DESTDIR)/usr/share/pixmaps
114         $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
115         $(MKDIR) $(DESTDIR)/usr/share/applications
116         $(MKDIR) $(DESTDIR)/etc/security/console.apps
117         $(MKDIR) $(DESTDIR)/etc/pam.d
118
119 install-menu: gnomedirs
120         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
121         ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
122         ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
123
124 install-menu-xsu: gnomedirs
125         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
126         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
127         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
128
129 install-menu-consolehelper: gnomedirs
130         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
131         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
132         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
133         ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
134         ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
135         ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
136
137 install: installdirs
138         @for I in $(doc_files) ; do $(INSTALL_DATA) $$I $(DESTDIR)${docdir}; done
139         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
140
141 uninstall:
142         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
143
144 install-autostart:
145         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
146
147 install-autostart-dir:
148         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
149
150 install-autostart-fd:
151         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
152
153 install-autostart-sd:
154         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
155
156 uninstall-autostart:
157         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
158
159 uninstall-autostart-dir:
160         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
161
162 uninstall-autostart-fd:
163         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
164
165 uninstall-autostart-sd:
166         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
167
168 uninstall-menu:
169         $(RMF) $(DESTDIR)/usr/share/pixmaps/bacula.png
170         $(RMF) $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
171         $(RMF) $(DESTDIR)/usr/share/applications/bacula.desktop
172
173 uninstall-menu-consolehelper:
174         $(RMF) $(DESTDIR)/usr/share/pixmaps/bacula.png
175         $(RMF) $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
176         $(RMF) $(DESTDIR)/usr/share/applications/bacula.desktop
177         $(RMF) $(DESTDIR)/etc/security/console.apps/gnome-console
178         $(RMF) $(DESTDIR)/etc/pam.d/gnome-console
179         $(RMF) $(DESTDIR)/usr/bin/gnome-console
180
181 Makefile: Makefile.in
182         cd $(topdir) \
183             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
184
185 Makefiles:
186         $(SHELL) config.status
187         (cd scripts; \
188          chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
189          chmod 755 mtx-changer bconsole gconsole devel_bacula; \
190          chmod 755 dvd-handler)
191
192         (cd src/cats; \
193          chmod 755 create_bacula_database      update_bacula_tables     make_bacula_tables; \
194          chmod 755 grant_bacula_privileges     drop_bacula_tables       drop_bacula_database; \
195          chmod 755 create_@DB_TYPE@_database   update_@DB_TYPE@_tables  make_@DB_TYPE@_tables; \
196          chmod 755 grant_@DB_TYPE@_privileges  drop_@DB_TYPE@_tables    drop_@DB_TYPE@_database; \
197          chmod 755 make_catalog_backup delete_catalog_backup)
198         (cd src/qt-console; \
199          chmod 755 install_conf_file build-depkgs-qt-console)
200
201 clean:
202         @for I in ${all_subdirs} ; \
203           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
204         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
205         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
206         @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
207         @$(RMF) -r autom4te.cache
208         @find . -name ".#*" -exec $(RMF) {} \;
209
210
211 # clean for distribution
212 distclean:
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/* kerns-* 
222         @$(RMF) -rf txt diff src/python src/testprogs
223         @$(RMF) libtool
224
225 devclean:
226         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
227         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
228         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
229         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
230         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
231         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
232         @$(RMF) bconsole gconsole
233         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
234         @$(RMF) working/*
235
236 distdirs:
237         mkdir ../$(VERNAME);
238         mkdir ../$(VERNAME)/autoconf;
239         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
240
241 distcopy:
242         $(CP) -p $(DIST) ../$(VERNAME);
243         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
244         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
245
246 distrib: configure autoconf/config.h.in distdirs distcopy
247
248 test:
249
250
251 tar.gz:  ../$(VERNAME).tar.gz
252 ../$(VERNAME).tar.gz:
253         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
254
255 tar.Z: ../$(VERNAME).tar.Z
256 ../$(VERNAME).tar.Z:
257         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
258
259 tar.bz2: ../$(VERNAME).tar.bz2
260 ../$(VERNAME).tar.bz2:
261         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
262
263 uuencode: tar.gz
264         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
265
266 # ------------------------------------------------------------------------