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