]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/Makefile.in
Tweak mutex order for SD
[bacula/bacula] / bacula / src / cats / Makefile.in
1
2 @MCOMMON@
3
4 srcdir =        .
5 .PATH:          .
6
7 # one up
8 basedir = ..
9 # top dir
10 topdir = ../..
11 # this dir relative to top dir
12 thisdir = src/cats
13
14 CPPFLAGS += -DBUILDING_CATS @DBI_DBD_DRIVERDIR@
15
16 DEBUG=@DEBUG@
17 MKDIR=$(topdir)/autoconf/mkinstalldirs
18
19 SQL_INC=@SQL_INCLUDE@
20
21 first_rule: all
22 dummy:
23
24 #
25 # include files installed when using libtool
26 #
27 INCLUDE_FILES = bdb.h cats.h protos.h sql_cmds.h
28
29 LIBSRCS = mysql.c bdb.c dbi.c \
30           sql.c sql_cmds.c sql_create.c sql_delete.c sql_find.c \
31           sql_get.c sql_list.c sql_update.c sqlite.c \
32           postgresql.c bvfs.c
33 LIBOBJS = $(LIBSRCS:.c=$(DEFAULT_OBJECT_TYPE))
34
35 LIBBACSQL_LT_CURRENT = 1
36 LIBBACSQL_LT_REVISION = 0
37 LIBBACSQL_LT_AGE = 0
38
39 .SUFFIXES:      .c .o .lo
40 .PHONY:
41 .DONTCARE:
42
43 # inference rules
44 .c.o:
45         @echo "Compiling $<"
46         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) $(DINCLUDE) $(CFLAGS) $<
47
48 .c.lo:
49         @echo "Compiling $<"
50         $(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) $(DINCLUDE) $(CFLAGS) $<
51 #-------------------------------------------------------------------------
52 all: Makefile libbacsql$(DEFAULT_ARCHIVE_TYPE)
53         @echo "==== Make of sqllib is good ===="
54         @echo " "
55
56 libbacsql.a: $(LIBOBJS)
57         @echo "Making $@ ..."     
58         $(AR) rc  $@ $(LIBOBJS)
59         $(RANLIB) $@
60
61 libbacsql.la: Makefile $(LIBOBJS)
62         @echo "Making $@ ..."     
63         $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBOBJS) -export-dynamic -rpath $(libdir) -version-info $(LIBBACSQL_LT_CURRENT):$(LIBBACSQL_LT_REVISION):$(LIBBACSQL_LT_AGE) $(DB_LIBS)
64
65 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
66         cd $(topdir) \
67           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
68
69 libtool-clean:
70         @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
71         @$(RMF) *.la
72         @$(RMF) -r .libs _libs
73
74 clean:  libtool-clean
75         @$(RMF) core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
76
77 realclean: clean
78         $(RMF) tags
79
80         $(RMF) create_bacula_database      update_bacula_tables     make_bacula_tables
81         $(RMF) grant_bacula_privileges     drop_bacula_tables       drop_bacula_database
82
83         $(RMF) create_bdb_database         update_bdb_tables        make_bdb_tables
84         $(RMF) grant_bdb_privileges        drop_bdb_tables          drop_bdb_database
85
86         $(RMF) create_mysql_database       update_mysql_tables      make_mysql_tables
87         $(RMF) grant_mysql_privileges      drop_mysql_tables        drop_mysql_database
88
89         $(RMF) create_postgresql_database  update_postgresql_tables make_postgresql_tables
90         $(RMF) grant_postgresql_privileges drop_postgresql_tables   drop_postgresql_database
91
92         $(RMF) create_sqlite_database      update_sqlite_tables     make_sqlite_tables
93         $(RMF) grant_sqlite_privileges     drop_sqlite_tables       drop_sqlite_database
94
95         $(RMF) create_sqlite3_database     update_sqlite3_tables     make_sqlite3_tables
96         $(RMF) grant_sqlite3_privileges    drop_sqlite3_tables      drop_sqlite3_database
97
98         $(RMF) mysql sqlite postgresql
99         $(RMF) make_catalog_backup delete_catalog_backup
100
101 distclean: realclean
102         if test $(srcdir) = .; then $(MAKE) realclean; fi
103         (cd $(srcdir); $(RMF) Makefile)
104
105 devclean: realclean
106         if test $(srcdir) = .; then $(MAKE) realclean; fi
107         (cd $(srcdir); $(RMF) Makefile)
108
109 install-includes:
110         $(MKDIR) $(DESTDIR)/$(includedir)/bacula/sql
111         for I in $(INCLUDE_FILES); do \
112            $(INSTALL_DATA) $$I $(DESTDIR)$(includedir)/bacula/sql/`basename $$I`; \
113         done
114
115 uninstall-includes:
116         for I in $(INCLUDE_FILES); do \
117            $(RMF) $(DESTDIR)$(includedir)/bacula/sql/`basename $$I`; \
118         done
119
120 libtool-install: all
121         $(MKDIR) $(DESTDIR)$(libdir)
122         $(LIBTOOL_INSTALL_FINISH) $(INSTALL_PROGRAM) libbacsql$(DEFAULT_ARCHIVE_TYPE) $(DESTDIR)$(libdir)
123
124 libtool-uninstall:
125         $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(libdir)/libbacsql.la
126
127 install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@
128         $(INSTALL_SCRIPT) create_@DB_TYPE@_database $(DESTDIR)$(scriptdir)/create_@DB_TYPE@_database
129         $(INSTALL_SCRIPT) update_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/update_@DB_TYPE@_tables
130         $(INSTALL_SCRIPT) make_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/make_@DB_TYPE@_tables
131         $(INSTALL_SCRIPT) grant_@DB_TYPE@_privileges $(DESTDIR)$(scriptdir)/grant_@DB_TYPE@_privileges
132         $(INSTALL_SCRIPT) drop_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/drop_@DB_TYPE@_tables
133         $(INSTALL_SCRIPT) drop_@DB_TYPE@_database $(DESTDIR)$(scriptdir)/drop_@DB_TYPE@_database
134
135         $(INSTALL_SCRIPT) create_bacula_database $(DESTDIR)$(scriptdir)/create_bacula_database
136         $(INSTALL_SCRIPT) update_bacula_tables $(DESTDIR)$(scriptdir)/update_bacula_tables
137         $(INSTALL_SCRIPT) make_bacula_tables $(DESTDIR)$(scriptdir)/make_bacula_tables
138         $(INSTALL_SCRIPT) grant_bacula_privileges $(DESTDIR)$(scriptdir)/grant_bacula_privileges
139         $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(scriptdir)/drop_bacula_tables
140         $(INSTALL_SCRIPT) drop_bacula_database $(DESTDIR)$(scriptdir)/drop_bacula_database
141
142         @filename=make_catalog_backup; \
143            if  test -f $(DESTDIR)$(scriptdir)/$$filename; then \
144               destname=$$filename.new; \
145               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
146            else \
147               destname=$$filename; \
148            fi; \
149            echo "$(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname"; \
150            $(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname
151         @filename=delete_catalog_backup; \
152            if  test -f $(DESTDIR)$(scriptdir)/$$filename; then \
153               destname=$$filename.new; \
154               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
155            else \
156               destname=$$filename; \
157            fi; \
158            echo "$(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname"; \
159            $(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname
160
161 uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@
162         (cd $(DESTDIR)$(scriptdir); $(RMF) create_@DB_TYPE@_database)
163         (cd $(DESTDIR)$(scriptdir); $(RMF) update_@DB_TYPE@_tables)
164         (cd $(DESTDIR)$(scriptdir); $(RMF) make_@DB_TYPE@_tables)
165         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_@DB_TYPE@_privileges)
166         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_TYPE@_tables)
167         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_TYPE@_database)
168
169         (cd $(DESTDIR)$(scriptdir); $(RMF) create_bacula_database)
170         (cd $(DESTDIR)$(scriptdir); $(RMF) update_bacula_tables)
171         (cd $(DESTDIR)$(scriptdir); $(RMF) make_bacula_tables)
172         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_bacula_privileges)
173         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_tables)
174         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_database)
175
176         (cd $(DESTDIR)$(scriptdir); $(RMF) make_catalog_backup)
177         (cd $(DESTDIR)$(scriptdir); $(RMF) delete_catalog_backup)
178
179 # Semi-automatic generation of dependencies:
180 # Use gcc -M because X11 `makedepend' doesn't work on all systems
181 # and it also includes system headers.
182 # `semi'-automatic since dependencies are generated at distribution time.
183
184 depend:
185         @$(MV) Makefile Makefile.bak
186         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
187         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
188         @for src in $(LIBSRCS); do \
189             $(CXX) -S -M -MT `basename $$src .c`$(DEFAULT_OBJECT_TYPE) $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) $$src >> Makefile; \
190         done
191         @if test -f Makefile ; then \
192             $(RMF) Makefile.bak; \
193         else \
194            $(MV) Makefile.bak Makefile; \
195            echo " ===== Something went wrong in make depend ====="; \
196         fi
197
198 # -----------------------------------------------------------------------
199 # DO NOT DELETE: nice dependency list follows