]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/Makefile.in
Correct copy/paste typos
[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 = cats.h protos.h sql_cmds.h
28
29 LIBBACSQL_SRCS = mysql.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 ingres.c myingres.c \
33                  bvfs.c
34 LIBBACSQL_OBJS = $(LIBBACSQL_SRCS:.c=.o)
35 LIBBACSQL_LOBJS = $(LIBBACSQL_SRCS:.c=.lo)
36
37 LIBBACSQL_LT_RELEASE = @LIBBACSQL_LT_RELEASE@
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 #-------------------------------------------------------------------------
53 all: Makefile libbacsql$(DEFAULT_ARCHIVE_TYPE)
54         @echo "==== Make of sqllib is good ===="
55         @echo " "
56
57 esql:
58         @echo "Generating myingres.c from myingres.sc"
59         $(NO_ECHO)$(II_SYSTEM)/ingres/bin/esqlcc -multi -extension=c myingres.sc
60         @echo "Generating myingres.h from myingres.sh"
61         $(NO_ECHO)$(II_SYSTEM)/ingres/bin/esqlcc -extension=h myingres.sh
62
63 libbacsql.a: $(LIBBACSQL_OBJS)
64         @echo "Making $@ ..."     
65         $(AR) rc  $@ $(LIBBACSQL_OBJS)
66         $(RANLIB) $@
67
68 libbacsql.la: Makefile $(LIBBACSQL_LOBJS)
69         @echo "Making $@ ..."     
70         $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACSQL_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACSQL_LT_RELEASE) $(DB_LIBS)
71
72 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
73         cd $(topdir) \
74           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
75
76 libtool-clean:
77         @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
78         @$(RMF) *.la
79         @$(RMF) -r .libs _libs
80
81 clean:  libtool-clean
82         @$(RMF) core a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
83
84 realclean: clean
85         $(RMF) tags
86
87         $(RMF) create_bacula_database      update_bacula_tables     make_bacula_tables
88         $(RMF) grant_bacula_privileges     drop_bacula_tables       drop_bacula_database
89
90         $(RMF) create_bdb_database         update_bdb_tables        make_bdb_tables
91         $(RMF) grant_bdb_privileges        drop_bdb_tables          drop_bdb_database
92
93         $(RMF) create_mysql_database       update_mysql_tables      make_mysql_tables
94         $(RMF) grant_mysql_privileges      drop_mysql_tables        drop_mysql_database
95
96         $(RMF) create_postgresql_database  update_postgresql_tables make_postgresql_tables
97         $(RMF) grant_postgresql_privileges drop_postgresql_tables   drop_postgresql_database
98
99         $(RMF) create_ingres_database update_ingres_tables make_ingres_tables
100         $(RMF) grant_ingres_privileges drop_ingres_tables   drop_ingres_database
101
102         $(RMF) create_sqlite_database      update_sqlite_tables     make_sqlite_tables
103         $(RMF) grant_sqlite_privileges     drop_sqlite_tables       drop_sqlite_database
104
105         $(RMF) create_sqlite3_database     update_sqlite3_tables     make_sqlite3_tables
106         $(RMF) grant_sqlite3_privileges    drop_sqlite3_tables      drop_sqlite3_database
107
108         $(RMF) mysql sqlite postgresql ingres
109         $(RMF) make_catalog_backup make_catalog_backup.pl delete_catalog_backup
110
111 distclean: realclean
112         if test $(srcdir) = .; then $(MAKE) realclean; fi
113         (cd $(srcdir); $(RMF) Makefile)
114
115 devclean: realclean
116         if test $(srcdir) = .; then $(MAKE) realclean; fi
117         (cd $(srcdir); $(RMF) Makefile)
118
119 install-includes:
120         $(MKDIR) $(DESTDIR)/$(includedir)/bacula/sql
121         for I in $(INCLUDE_FILES); do \
122            $(INSTALL_DATA) $$I $(DESTDIR)$(includedir)/bacula/sql/`basename $$I`; \
123         done
124
125 uninstall-includes:
126         for I in $(INCLUDE_FILES); do \
127            $(RMF) $(DESTDIR)$(includedir)/bacula/sql/`basename $$I`; \
128         done
129
130 libtool-install: all
131         $(MKDIR) $(DESTDIR)$(libdir)
132         $(LIBTOOL_INSTALL_FINISH) $(INSTALL_LIB) libbacsql$(DEFAULT_ARCHIVE_TYPE) $(DESTDIR)$(libdir)
133
134 libtool-uninstall:
135         $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(libdir)/libbacsql.la
136
137 install: @LIBTOOL_INSTALL_TARGET@ @INCLUDE_INSTALL_TARGET@
138         $(INSTALL_SCRIPT) create_@DB_TYPE@_database $(DESTDIR)$(scriptdir)/create_@DB_TYPE@_database
139         $(INSTALL_SCRIPT) update_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/update_@DB_TYPE@_tables
140         $(INSTALL_SCRIPT) make_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/make_@DB_TYPE@_tables
141         $(INSTALL_SCRIPT) grant_@DB_TYPE@_privileges $(DESTDIR)$(scriptdir)/grant_@DB_TYPE@_privileges
142         $(INSTALL_SCRIPT) drop_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/drop_@DB_TYPE@_tables
143         $(INSTALL_SCRIPT) drop_@DB_TYPE@_database $(DESTDIR)$(scriptdir)/drop_@DB_TYPE@_database
144
145         $(INSTALL_SCRIPT) create_bacula_database $(DESTDIR)$(scriptdir)/create_bacula_database
146         $(INSTALL_SCRIPT) update_bacula_tables $(DESTDIR)$(scriptdir)/update_bacula_tables
147         $(INSTALL_SCRIPT) make_bacula_tables $(DESTDIR)$(scriptdir)/make_bacula_tables
148         $(INSTALL_SCRIPT) grant_bacula_privileges $(DESTDIR)$(scriptdir)/grant_bacula_privileges
149         $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(scriptdir)/drop_bacula_tables
150         $(INSTALL_SCRIPT) drop_bacula_database $(DESTDIR)$(scriptdir)/drop_bacula_database
151
152         @filename=make_catalog_backup.pl; \
153            if  test -f $(DESTDIR)$(scriptdir)/$$filename; then \
154               destname=$$filename.new; \
155               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
156            else \
157               destname=$$filename; \
158            fi; \
159            echo "$(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname"; \
160            $(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname
161         @filename=make_catalog_backup; \
162            if  test -f $(DESTDIR)$(scriptdir)/$$filename; then \
163               destname=$$filename.new; \
164               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
165            else \
166               destname=$$filename; \
167            fi; \
168            echo "$(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname"; \
169            $(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname
170         @filename=delete_catalog_backup; \
171            if  test -f $(DESTDIR)$(scriptdir)/$$filename; then \
172               destname=$$filename.new; \
173               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
174            else \
175               destname=$$filename; \
176            fi; \
177            echo "$(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname"; \
178            $(INSTALL_SCRIPT) $$filename $(DESTDIR)$(scriptdir)/$$destname
179
180 uninstall: @LIBTOOL_UNINSTALL_TARGET@ @INCLUDE_UNINSTALL_TARGET@
181         (cd $(DESTDIR)$(scriptdir); $(RMF) create_@DB_TYPE@_database)
182         (cd $(DESTDIR)$(scriptdir); $(RMF) update_@DB_TYPE@_tables)
183         (cd $(DESTDIR)$(scriptdir); $(RMF) make_@DB_TYPE@_tables)
184         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_@DB_TYPE@_privileges)
185         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_TYPE@_tables)
186         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_TYPE@_database)
187
188         (cd $(DESTDIR)$(scriptdir); $(RMF) create_bacula_database)
189         (cd $(DESTDIR)$(scriptdir); $(RMF) update_bacula_tables)
190         (cd $(DESTDIR)$(scriptdir); $(RMF) make_bacula_tables)
191         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_bacula_privileges)
192         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_tables)
193         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_database)
194
195         (cd $(DESTDIR)$(scriptdir); $(RMF) make_catalog_backup)
196         (cd $(DESTDIR)$(scriptdir); $(RMF) make_catalog_backup.pl)
197         (cd $(DESTDIR)$(scriptdir); $(RMF) delete_catalog_backup)
198
199 # Semi-automatic generation of dependencies:
200 # Use gcc -M because X11 `makedepend' doesn't work on all systems
201 # and it also includes system headers.
202 # `semi'-automatic since dependencies are generated at distribution time.
203
204 #depend: esql  <-  SRE: if generating from 'real' ingres source
205 depend: 
206         @$(MV) Makefile Makefile.bak
207         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
208         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
209         @for src in $(LIBBACSQL_SRCS); do \
210             $(CXX) -S -M -MT `basename $$src .c`$(DEFAULT_OBJECT_TYPE) $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) $$src >> Makefile; \
211         done
212         @if test -f Makefile ; then \
213             $(RMF) Makefile.bak; \
214         else \
215            $(MV) Makefile.bak Makefile; \
216            echo " ===== Something went wrong in make depend ====="; \
217         fi
218
219 # -----------------------------------------------------------------------
220 # DO NOT DELETE: nice dependency list follows