Ticket #18775: Makefile.in

File Makefile.in, 9.1 KB (added by ndoc2@…, 16 years ago)

input to build makefile in root source directory

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