]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
64042e8390ab841cdf3f66e9c1500883d7627919
[bacula/bacula] / bacula / Makefile.in
1
2 # Version $Id$
3
4 @MCOMMON@
5
6 working_dir=@working_dir@
7
8 srcdir =        @srcdir@
9 VPATH =         @srcdir@
10 .PATH:          @srcdir@
11 topdir = .
12 thisdir = .
13
14
15 first_rule: all
16 dummy:
17
18 # --client-only directories
19 fd_subdirs = src scripts src/lib src/findlib src/filed \
20              @READLINE_SRC@ src/console \
21              @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@
22
23 # Non-client-only directores
24 subdirs =    src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
25
26 all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} 
27
28 DIST =  INSTALL README.configure configure Makefile Makefile.in ChangeLog
29
30 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
31         autoconf/config.h.in  autoconf/acconfig.h  autoconf/Make.common.in \
32         autoconf/install-sh autoconf/mkinstalldirs
33
34 MKDIR = $(srcdir)/autoconf/mkinstalldirs
35
36 #-------------------------------------------------------------------------
37
38 all: Makefile
39         @for I in ${all_subdirs}; \
40           do (cd $$I; echo "==>Entering directory `pwd`"; \
41               $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
42                             echo ""; echo "";)); \
43         done
44
45 depend:
46         @for I in ${all_subdirs}; \
47           do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
48         
49 bacula-fd: Makefile        
50         @for I in ${fd_subdirs}; \
51           do (cd $$I; echo "==>Entering directory `pwd`"; \
52               $(MAKE) all || (echo ""; echo ""; echo "   ====== Error in `pwd` ======; \
53                             echo ""; echo "";)); \
54         done
55
56 #-------------------------------------------------------------------------
57 autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/*
58         cd autoconf && aclocal -I bacula-macros -I gettext-macros
59
60 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
61         cd $(srcdir);
62         ${RMF} -f config.cache config.log config.out config.status src/config.h
63         autoconf --prepend-include=$(srcdir)/autoconf \
64         autoconf/configure.in > configure
65         chmod 755 configure
66
67 old-configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
68         cd $(srcdir);
69         ${RMF} -f config.cache config.log config.out config.status src/config.h
70         autoconf --include=$(srcdir)/autoconf \
71         autoconf/configure.in > configure
72         chmod 755 configure
73         @rm -f config.cache
74
75 config.status:
76         if test -x config.status; then config.status --recheck; \
77         else $(SHELL) configure; fi
78
79 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
80         cd $(srcdir);
81         ${RMF} -f config.cache config.log config.out config.status src/config.h
82         autoheader --prepend-include=$(srcdir)/autoconf \
83         autoconf/configure.in > autoconf/config.h.in
84         chmod 644 autoconf/config.h.in
85
86 installdirs:
87         $(MKDIR) $(DESTDIR)$(sbindir)
88         $(MKDIR) $(DESTDIR)$(sysconfdir)
89         $(MKDIR) $(DESTDIR)$(scriptdir)
90         $(MKDIR) $(DESTDIR)$(working_dir)
91 #       $(MKDIR) $(DESTDIR)$(mandir)
92
93 gnomedirs:
94         $(MKDIR) $(DESTDIR)/usr/share/pixmaps
95         $(MKDIR) $(DESTDIR)/usr/share/gnome/apps/System
96         $(MKDIR) $(DESTDIR)/usr/share/applications
97         $(MKDIR) $(DESTDIR)/etc/security/console.apps
98         $(MKDIR) $(DESTDIR)/etc/pam.d
99
100 install-menu: gnomedirs
101         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
102         ${INSTALL_DATA} scripts/bacula.desktop.gnome1 $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
103         ${INSTALL_DATA} scripts/bacula.desktop.gnome2 $(DESTDIR)/usr/share/applications/bacula.desktop
104
105 install-menu-xsu: gnomedirs
106         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
107         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.xsu $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
108         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.xsu $(DESTDIR)/usr/share/applications/bacula.desktop
109
110 install-menu-consolehelper: gnomedirs
111         ${INSTALL_DATA} scripts/bacula.png $(DESTDIR)/usr/share/pixmaps/bacula.png
112         ${INSTALL_DATA} scripts/bacula.desktop.gnome1.consolehelper $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
113         ${INSTALL_DATA} scripts/bacula.desktop.gnome2.consolehelper $(DESTDIR)/usr/share/applications/bacula.desktop
114         ${INSTALL_DATA} scripts/gnome-console.console_apps $(DESTDIR)/etc/security/console.apps/gnome-console
115         ${INSTALL_DATA} scripts/gnome-console.pamd $(DESTDIR)/etc/pam.d/gnome-console
116         ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
117
118 install: installdirs
119         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
120
121 uninstall:
122         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
123
124 install-autostart:
125         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
126
127 install-autostart-dir:
128         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
129
130 install-autostart-fd:
131         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
132
133 install-autostart-sd:
134         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
135
136 uninstall-autostart:
137         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
138
139 uninstall-autostart-dir:
140         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
141
142 uninstall-autostart-fd:
143         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
144
145 uninstall-autostart-sd:
146         (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
147
148 uninstall-menu:
149         rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
150         rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
151         rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
152
153 uninstall-menu-consolehelper:
154         rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
155         rm -f $(DESTDIR)/usr/share/gnome/apps/System/bacula.desktop
156         rm -f $(DESTDIR)/usr/share/applications/bacula.desktop
157         rm -f $(DESTDIR)/etc/security/console.apps/gnome-console
158         rm -f $(DESTDIR)/etc/pam.d/gnome-console
159         rm -f $(DESTDIR)/usr/bin/gnome-console
160
161
162 Makefile: Makefile.in
163         cd $(topdir) \
164             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
165
166 Makefiles:
167         $(SHELL) config.status
168         (cd scripts; \
169         chmod 755 startmysql stopmysql bacula startit stopit btraceback; \
170         chmod 755 mtx-changer bconsole gconsole devel_bacula; \
171         chmod 755 dvd-handler)
172
173         (cd src/cats; \
174         chmod 755 create_bacula_database      update_bacula_tables     make_bacula_tables; \
175         chmod 755 grant_bacula_privileges     drop_bacula_tables       drop_bacula_database; \
176            \
177         chmod 755 create_@DB_NAME@_database   update_@DB_NAME@_tables  make_@DB_NAME@_tables; \
178         chmod 755 grant_@DB_NAME@_privileges  drop_@DB_NAME@_tables    drop_@DB_NAME@_database; \
179            \
180         chmod 755 make_catalog_backup delete_catalog_backup)
181
182 clean:
183         @for I in ${all_subdirs}; \
184           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
185         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
186         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
187         @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
188         @$(RMF) -r autom4te.cache
189         @find . -name .#* -exec $(RMF) {} \;
190
191
192 # clean for distribution
193 distclean:
194         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
195         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
196         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
197         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
198         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
199         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
200         @$(RMF) bconsole gconsole
201         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
202         @$(RMF) working/* kerns-* 
203         @$(RMF) -rf txt diff src/python src/testprogs
204
205 devclean:
206         @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
207         @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
208         @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
209         @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
210         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
211         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
212         @$(RMF) bconsole gconsole
213         @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
214         @$(RMF) working/*
215
216 distdirs:
217         mkdir ../$(VERNAME);
218         mkdir ../$(VERNAME)/autoconf;
219         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
220
221 distcopy:
222         $(CP) -p $(DIST) ../$(VERNAME);
223         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
224         @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
225
226 distrib: configure autoconf/config.h.in distdirs distcopy
227
228 test:
229
230
231 tar.gz:  ../$(VERNAME).tar.gz
232 ../$(VERNAME).tar.gz:
233         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
234
235 tar.Z: ../$(VERNAME).tar.Z
236 ../$(VERNAME).tar.Z:
237         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
238
239 tar.bz2: ../$(VERNAME).tar.bz2
240 ../$(VERNAME).tar.bz2:
241         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
242
243 uuencode: tar.gz
244         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
245
246 # ------------------------------------------------------------------------