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