]> git.sur5r.net Git - bacula/bacula/blob - bacula/Makefile.in
First cut AutoPrune
[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 subdirs = src doc src/lib src/findlib src/cats \
19           @READLINE_SRC@ src/console src/dird src/filed \
20           src/stored @GNOME_DIR@
21
22 FDsubdirs = src/lib src/findlib src/filed
23
24 DIST =  INSTALL README.configure configure Makefile Makefile.in ChangeLog
25
26 DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
27         autoconf/config.h.in  autoconf/acconfig.h  autoconf/Make.common.in \
28         autoconf/install-sh autoconf/mkinstalldirs
29
30 MKDIR = $(srcdir)/autoconf/mkinstalldirs
31
32 #-------------------------------------------------------------------------
33
34 all: Makefile
35         @for I in ${subdirs}; \
36           do (cd $$I; echo "==>Entering directory `pwd`"; \
37               $(MAKE) $@ || (echo ""; echo ""; echo "   ====== Error in `pwd` ======"; \
38                             echo ""; echo "";)); \
39         done
40
41 depend:
42         @for I in ${subdirs}; \
43           do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) $@ || exit 1); done
44         
45 bacula-fd: Makefile        
46         @for I in ${FDsubdirs}; \
47           do (cd $$I; echo "==>Entering directory `pwd`"; \
48               $(MAKE) all || (echo ""; echo ""; echo "   ====== Error in `pwd` ======"; \
49                             echo ""; echo "";)); \
50         done
51
52 #-------------------------------------------------------------------------
53 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
54         cd $(srcdir);
55         autoconf --localdir=$(srcdir)/autoconf \
56         autoconf/configure.in > configure
57         chmod 755 configure
58
59 config.status:
60         if test -x config.status; then config.status --recheck; \
61         else $(SHELL) configure; fi
62
63 autoconf/config.h.in: autoconf/configure.in autoconf/acconfig.h
64         cd $(srcdir);
65         autoheader --localdir=$(srcdir)/autoconf \
66         autoconf/configure.in > autoconf/config.h.in
67         chmod 644 autoconf/config.h.in
68
69 installdirs:
70         $(MKDIR) $(DESTDIR)$(sbindir)
71         $(MKDIR) $(DESTDIR)$(sysconfdir)
72         $(MKDIR) $(DESTDIR)$(working_dir)
73 #       $(MKDIR) $(DESTDIR)$(mandir)
74
75 install: installdirs
76         $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(sysconfdir)/startmysql
77         $(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(sysconfdir)/stopmysql
78         $(INSTALL_SCRIPT) console $(DESTDIR)$(sysconfdir)/console
79         $(INSTALL_SCRIPT) bacula $(DESTDIR)$(sysconfdir)/bacula
80         $(INSTALL_SCRIPT) fd $(DESTDIR)$(sysconfdir)/fd
81         $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sysconfdir)/btraceback
82         $(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(sysconfdir)/btraceback.gdb
83         @for I in $(subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
84
85 uninstall:
86         (cd $(DESTDIR)$(sysconfdir); $(RMF) startmysql)
87         (cd $(DESTDIR)$(sysconfdir); $(RMF) stopmysql)
88         (cd $(DESTDIR)$(sysconfdir); $(RMF) console)
89         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula)
90         (cd $(DESTDIR)$(sysconfdir); $(RMF) fd)
91         @for I in $(subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
92
93 install-autostart: install-autostart-dir install-autostart-fd install-autostart-sd
94
95 install-autostart-dir:
96         (cd platforms; $(MAKE) $@ || exit 1) 
97
98 install-autostart-fd:
99         (cd platforms; $(MAKE) $@ || exit 1) 
100
101 install-autostart-sd:
102         (cd platforms; $(MAKE) $@ || exit 1) 
103
104 uninstall-autostart: uninstall-autostart-dir uninstall-autostart-fd uninstall-autrun-sd
105
106 uninstall-autostart-dir:
107         (cd platforms; $(MAKE) $@ || exit 1)
108
109 uninstall-autostart-fd:
110         (cd platforms; $(MAKE) $@ || exit 1)
111
112 uninstall-autostart-sd:
113         (cd platforms; $(MAKE) $@ || exit 1)
114
115 Makefile: Makefile.in
116         cd $(topdir) \
117             && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
118
119 Makefiles:
120         $(SHELL) config.status
121         chmod 755 startmysql stopmysql bacula fd startit stopit btraceback
122         chmod 755 src/console/btraceback src/lib/btraceback            
123         chmod 755 src/dird/btraceback src/filed/btraceback
124         chmod 755 src/stored/btraceback
125         chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
126         chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
127         chmod 755 src/cats/create_mysql_database
128         chmod 755 src/cats/grant_mysql_privileges
129         chmod 755 src/cats/make_sqlite_tables
130
131 clean:
132         @for I in ${subdirs}; \
133           do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
134         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
135         @$(RMF) *~ 1 2 3 core core.*
136
137 # distclean goal is for making a clean source tree, but if you have run
138 # configure from a different directory, then doesn't destroy all your
139 # hardly compiled and linked stuff. That's why there is always $(srcdir)/
140 # In that case most of those commands do nothing, except cleaning *~
141 # and cleaning source links.
142 distclean:
143         @for I in $(subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
144         @for I in $(subdirs); do (cd $$I; $(RMF) startit stopit btraceback btraceback.gdb); done
145         @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status)
146         @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
147         @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
148         @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
149         @$(RMF) *~ 1 2 3 core core.*
150         @$(RMF) working/*
151
152 distdirs:
153         mkdir ../$(VERNAME);
154         mkdir ../$(VERNAME)/autoconf;
155         @for I in $(subdirs); do (cd $$I; $(MAKE) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
156
157 distcopy:
158         $(CP) -p $(DIST) ../$(VERNAME);
159         $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
160         @for I in $(subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
161
162 distrib: configure autoconf/config.h.in distdirs distcopy
163
164 tar.gz:  ../$(VERNAME).tar.gz
165 ../$(VERNAME).tar.gz:
166         (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
167
168 tar.Z: ../$(VERNAME).tar.Z
169 ../$(VERNAME).tar.Z:
170         (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
171
172 tar.bz2: ../$(VERNAME).tar.bz2
173 ../$(VERNAME).tar.bz2:
174         (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
175
176 uuencode: tar.gz
177         uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
178
179 # ------------------------------------------------------------------------