]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/Makefile.in
kes Implement DB Driver = string for the DBI driver.
[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
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 SVRSRCS = cats.c sql.c
26 SVROBJS = cats.o sql.o
27
28 LIBSRCS = mysql.c bdb.c \
29           sql.c sql_cmds.c sql_create.c sql_delete.c sql_find.c \
30           sql_get.c sql_list.c sql_update.c sqlite.c \
31           postgresql.c
32 LIBOBJS = mysql.o bdb.o \
33           sql.o sql_cmds.o sql_create.o sql_delete.o sql_find.o \
34           sql_get.o sql_list.o sql_update.o sqlite.o \
35           postgresql.o
36
37 .SUFFIXES:      .c .o
38 .PHONY:
39 .DONTCARE:
40
41 # inference rules
42 .c.o:
43         @echo "Compiling $<"
44         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) $(DINCLUDE) $(CFLAGS) $<
45 #-------------------------------------------------------------------------
46 all: Makefile libsql.a
47         @echo "==== Make of cats is good ===="
48         @echo " "
49
50 libsql.a: $(LIBOBJS)
51         @echo "Making $@ ..."     
52         $(AR) rc  $@ $(LIBOBJS)
53         $(RANLIB) $@
54
55 cats: $(SVROBJS) ../findlib/libfind.a
56         $(CC) $(WLDFLAGS) $(LDFLAGS) -L../findlib -L../lib -o $@ $(SVROBJS) $(LIBS) $(DB_LIBS) -lfind -lbac
57
58 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
59         cd $(topdir) \
60           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
61
62
63 clean:
64         $(RMF) cats core a.out *.o *.a *.bak *~ *.intpro *.extpro 1 2 3
65
66 realclean: clean
67         $(RMF) tags
68
69         $(RMF) create_bacula_database      update_bacula_tables     make_bacula_tables
70         $(RMF) grant_bacula_privileges     drop_bacula_tables       drop_bacula_database
71
72         $(RMF) create_bdb_database         update_bdb_tables        make_bdb_tables
73         $(RMF) grant_bdb_privileges        drop_bdb_tables          drop_bdb_database
74
75         $(RMF) create_mysql_database       update_mysql_tables      make_mysql_tables
76         $(RMF) grant_mysql_privileges      drop_mysql_tables        drop_mysql_database
77
78         $(RMF) create_postgresql_database  update_postgresql_tables make_postgresql_tables
79         $(RMF) grant_postgresql_privileges drop_postgresql_tables   drop_postgresql_database
80
81         $(RMF) create_sqlite_database      update_sqlite_tables     make_sqlite_tables
82         $(RMF) grant_sqlite_privileges     drop_sqlite_tables       drop_sqlite_database
83
84         $(RMF) create_sqlite3_database     update_sqlite3_tables     make_sqlite3_tables
85         $(RMF) grant_sqlite3_privileges    drop_sqlite3_tables      drop_sqlite3_database
86
87         $(RMF) mysql sqlite postgresql
88         $(RMF) make_catalog_backup delete_catalog_backup
89
90 distclean: realclean
91         if test $(srcdir) = .; then $(MAKE) realclean; fi
92         (cd $(srcdir); $(RMF) Makefile)
93
94 devclean: realclean
95         if test $(srcdir) = .; then $(MAKE) realclean; fi
96         (cd $(srcdir); $(RMF) Makefile)
97
98 install:
99         $(INSTALL_SCRIPT) create_@DB_TYPE@_database $(DESTDIR)$(scriptdir)/create_@DB_TYPE@_database
100         $(INSTALL_SCRIPT) update_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/update_@DB_TYPE@_tables
101         $(INSTALL_SCRIPT) make_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/make_@DB_TYPE@_tables
102         $(INSTALL_SCRIPT) grant_@DB_TYPE@_privileges $(DESTDIR)$(scriptdir)/grant_@DB_TYPE@_privileges
103         $(INSTALL_SCRIPT) drop_@DB_TYPE@_tables $(DESTDIR)$(scriptdir)/drop_@DB_TYPE@_tables
104         $(INSTALL_SCRIPT) drop_@DB_TYPE@_database $(DESTDIR)$(scriptdir)/drop_@DB_TYPE@_database
105
106         $(INSTALL_SCRIPT) create_bacula_database $(DESTDIR)$(scriptdir)/create_bacula_database
107         $(INSTALL_SCRIPT) update_bacula_tables $(DESTDIR)$(scriptdir)/update_bacula_tables
108         $(INSTALL_SCRIPT) make_bacula_tables $(DESTDIR)$(scriptdir)/make_bacula_tables
109         $(INSTALL_SCRIPT) grant_bacula_privileges $(DESTDIR)$(scriptdir)/grant_bacula_privileges
110         $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(scriptdir)/drop_bacula_tables
111         $(INSTALL_SCRIPT) drop_bacula_database $(DESTDIR)$(scriptdir)/drop_bacula_database
112
113         @filename=make_catalog_backup; \
114            if  test -f ${DESTDIR}${scriptdir}/$$filename; then \
115               destname=$$filename.new; \
116               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
117            else \
118               destname=$$filename; \
119            fi; \
120            echo "${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname"; \
121            ${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname
122         @filename=delete_catalog_backup; \
123            if  test -f ${DESTDIR}${scriptdir}/$$filename; then \
124               destname=$$filename.new; \
125               echo "  ==> Found existing $$filename, installing new file as $$destname"; \
126            else \
127               destname=$$filename; \
128            fi; \
129            echo "${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname"; \
130            ${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname
131
132 uninstall:
133         (cd $(DESTDIR)$(scriptdir); $(RMF) create_@DB_TYPE@_database)
134         (cd $(DESTDIR)$(scriptdir); $(RMF) update_@DB_TYPE@_tables)
135         (cd $(DESTDIR)$(scriptdir); $(RMF) make_@DB_TYPE@_tables)
136         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_@DB_TYPE@_privileges)
137         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_TYPE@_tables)
138         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_TYPE@_database)
139
140         (cd $(DESTDIR)$(scriptdir); $(RMF) create_bacula_database)
141         (cd $(DESTDIR)$(scriptdir); $(RMF) update_bacula_tables)
142         (cd $(DESTDIR)$(scriptdir); $(RMF) make_bacula_tables)
143         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_bacula_privileges)
144         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_tables)
145         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_database)
146
147         (cd $(DESTDIR)$(scriptdir); $(RMF) make_catalog_backup)
148         (cd $(DESTDIR)$(scriptdir); $(RMF) delete_catalog_backup)
149
150
151 # Semi-automatic generation of dependencies:
152 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
153 # and it also includes system headers.
154 # `semi'-automatic since dependencies are generated at distribution time.
155
156 depend:
157         @$(MV) Makefile Makefile.bak
158         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
159         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
160         @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
161         @if test -f Makefile ; then \
162             $(RMF) Makefile.bak; \
163         else \
164            $(MV) Makefile.bak Makefile; \
165            echo " ===== Something went wrong in make depend ====="; \
166         fi
167
168 # -----------------------------------------------------------------------
169 # DO NOT DELETE: nice dependency list follows