]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
a308e147ac237155943bd6a00040ca7869d08249
[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         chmod 760 $(DESTDIR)$(sysconfdir)
98         -if test "x$(dir_user)" != "x" ; then \
99            chown $(dir_user) $(DESTDIR)$(sysconfdir); \
100         fi
101         -if test "x$(dir_group)" != "x" ; then \
102            chgrp $(dir_group) $(DESTDIR)$(sysconfdir); \
103         fi
104         $(MKDIR) $(DESTDIR)$(scriptdir)
105         $(MKDIR) $(DESTDIR)$(docdir)
106         $(MKDIR) $(DESTDIR)$(archivedir)
107         -if test ! -d $(DESTDIR)$(working_dir) ; then \
108            $(MKDIR) $(DESTDIR)$(working_dir); \
109            chmod 770 $(DESTDIR)$(working_dir); \
110         fi
111         -if test "x$(dir_user)" != "x" ; then \
112            chown $(dir_user) $(DESTDIR)$(working_dir); \
113         fi
114         -if test "x$(dir_group)" != "x" ; then \
115            chgrp $(dir_group) $(DESTDIR)$(working_dir); \
116         fi
117
118 gnomedirs:
119         $(MKDIR) $(DESTDIR)/usr/share/pixmaps
120         $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
121         $(MKDIR) $(DESTDIR)/usr/share/applications
122         $(MKDIR) $(DESTDIR)/etc/security/console.apps
123         $(MKDIR) $(DESTDIR)/etc/pam.d
124
125 install-menu: gnomedirs
126         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
127         ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
128         ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
129
130 install-menu-xsu: gnomedirs
131         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
132         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
133         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
134
135 install-menu-consolehelper: gnomedirs
136         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
137         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
138         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
139         ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
140         ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
141         ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
142
143 install: installdirs
144         @for I in $(doc_files) ; do $(INSTALL_DATA) $$I $(DESTDIR)${docdir}; done
145         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
146
147 uninstall:
148         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
149
150 install-autostart:
151         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
152
153 install-autostart-dir:
154         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
155
156 install-autostart-fd:
157         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
158
159 install-autostart-sd:
160         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
161
162 uninstall-autostart:
163         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
164
165 uninstall-autostart-dir:
166         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
167
168 uninstall-autostart-fd:
169         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
170
171 uninstall-autostart-sd:
172         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
173
174 uninstall-menu:
175         $(RMF) $(DESTDIR)/usr/share/pixmaps/bacula.png
176         $(RMF) $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
177         $(RMF) $(DESTDIR)/usr/share/applications/bacula.desktop
178
179 uninstall-menu-consolehelper:
180         $(RMF) $(DESTDIR)/usr/share/pixmaps/bacula.png
181         $(RMF) $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
182         $(RMF) $(DESTDIR)/usr/share/applications/bacula.desktop
183         $(RMF) $(DESTDIR)/etc/security/console.apps/gnome-console
184         $(RMF) $(DESTDIR)/etc/pam.d/gnome-console
185         $(RMF) $(DESTDIR)/usr/bin/gnome-console
186
187 Makefile: Makefile.in
188         cd $(topdir) \
189             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
190
191 Makefiles:
192         $(SHELL) config.status
193         (cd scripts; \
194          chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
195          chmod 755 mtx-changer bconsole gconsole devel_bacula; \
196          chmod 755 dvd-handler)
197
198         (cd src/cats; \
199          chmod 755 create_bacula_database update_bacula_tables make_bacula_tables; \
200          chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database; \
201          chmod 755 make_catalog_backup delete_catalog_backup)
202
203         @for I in @DB_BACKENDS@ ; do \
204           (cd src/cats; \
205            chmod 755 create_$${I}_database update_$${I}_tables make_$${I}_tables; \
206            chmod 755 grant_$${I}_privileges drop_$${I}_tables drop_$${I}_database); \
207           done
208
209         (cd src/qt-console; \
210          chmod 755 install_conf_file build-depkgs-qt-console)
211
212 clean:
213         @for I in ${all_subdirs} ; \
214           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
215         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
216         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
217         @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
218         @$(RMF) -r autom4te.cache
219         @find . -name ".#*" -exec $(RMF) {} \;
220
221
222 # clean for distribution
223 distclean:
224         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
225         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
226         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
227         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
228         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
229         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
230         @$(RMF) bconsole gconsole
231         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
232         @$(RMF) working/* kerns-* 
233         @$(RMF) -rf txt diff src/python src/testprogs
234         @$(RMF) libtool
235
236 devclean:
237         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
238         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
239         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
240         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
241         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
242         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
243         @$(RMF) bconsole gconsole
244         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
245         @$(RMF) working/*
246
247 distdirs:
248         mkdir ../$(VERNAME);
249         mkdir ../$(VERNAME)/autoconf;
250         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
251
252 distcopy:
253         $(CP) -p $(DIST) ../$(VERNAME);
254         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
255         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
256
257 distrib: configure autoconf/config.h.in distdirs distcopy
258
259 test:
260
261
262 tar.gz:  ../$(VERNAME).tar.gz
263 ../$(VERNAME).tar.gz:
264         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
265
266 tar.Z: ../$(VERNAME).tar.Z
267 ../$(VERNAME).tar.Z:
268         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
269
270 tar.bz2: ../$(VERNAME).tar.bz2
271 ../$(VERNAME).tar.bz2:
272         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
273
274 uuencode: tar.gz
275         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
276
277 # ------------------------------------------------------------------------