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