~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/Makefile.am

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2000-2006 MySQL AB
 
2
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; version 2 of the License.
 
6
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program; if not, write to the Free Software
 
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
 
 
16
#called from the top level Makefile
 
17
 
 
18
MYSQLDATAdir =          $(localstatedir)
 
19
MYSQLSHAREdir =         $(pkgdatadir)
 
20
MYSQLBASEdir=           $(prefix)
 
21
MYSQLLIBdir=            $(pkglibdir)
 
22
pkgplugindir =          $(pkglibdir)/plugin
 
23
INCLUDES =              -I$(top_builddir)/include -I$(top_srcdir)/include \
 
24
                        -I$(srcdir) $(openssl_includes) \
 
25
                        $(libevent_includes)
 
26
SUBDIRS =               share
 
27
libexec_PROGRAMS =      mysqld
 
28
EXTRA_PROGRAMS =        gen_lex_hash
 
29
bin_PROGRAMS =          mysql_tzinfo_to_sql
 
30
DTRACE =                @DTRACE@
 
31
DTRACEFLAGS =           @DTRACEFLAGS@
 
32
DTRACEFILES =           handler.o \
 
33
                        filesort.o \
 
34
                        sql_insert.o \
 
35
                        sql_delete.o \
 
36
                        sql_select.o \
 
37
                        sql_update.o
 
38
 
 
39
noinst_LTLIBRARIES=
 
40
 
 
41
SUPPORTING_LIBS =       $(top_builddir)/vio/libvio.a \
 
42
                        $(top_builddir)/mysys/libmysys.a \
 
43
                        $(top_builddir)/dbug/libdbug.a \
 
44
                        $(top_builddir)/strings/libmystrings.a
 
45
mysqld_DEPENDENCIES=    @mysql_plugin_libs@ $(SUPPORTING_LIBS)
 
46
LDADD = $(SUPPORTING_LIBS) -lz -levent
 
47
mysqld_LDADD =          @MYSQLD_EXTRA_LDFLAGS@ \
 
48
                        @pstack_libs@ $(libevent_libs) \
 
49
                        @mysql_plugin_libs@ \
 
50
                        $(LDADD)  $(CXXLDFLAGS) @LIBDL@ \
 
51
                        @MYSQLD_EXTRA_LIBS@
 
52
 
 
53
noinst_HEADERS =        item.h item_func.h item_sum.h item_cmpfunc.h \
 
54
                        item_strfunc.h item_timefunc.h \
 
55
                        item_create.h item_subselect.h item_row.h \
 
56
                        mysql_priv.h sql_bitmap.h \
 
57
                        sql_class.h sql_lex.h sql_list.h \
 
58
                        sql_map.h sql_string.h unireg.h \
 
59
                        sql_error.h field.h handler.h mysqld_suffix.h \
 
60
                        rpl_constants.h \
 
61
                        opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
 
62
                        rpl_reporting.h \
 
63
                        log.h sql_show.h rpl_rli.h rpl_mi.h \
 
64
                        sql_select.h structs.h table.h sql_udf.h hash_filo.h \
 
65
                        lex.h lex_symbol.h sql_crypt.h  \
 
66
                        sql_repl.h slave.h rpl_filter.h \
 
67
                        log_event.h rpl_record.h \
 
68
                        stacktrace.h sql_sort.h set_var.h \
 
69
                        client_settings.h tzfile.h \
 
70
                        tztime.h my_decimal.h\
 
71
                        sql_array.h scheduler.h \
 
72
                        sql_plugin.h \
 
73
                        probes.h
 
74
 
 
75
mysqld_SOURCES =        sql_lex.cc sql_handler.cc \
 
76
                        item.cc item_sum.cc item_buff.cc item_func.cc \
 
77
                        item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
 
78
                        thr_malloc.cc item_create.cc item_subselect.cc \
 
79
                        item_row.cc \
 
80
                        field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
 
81
                        net_serv.cc protocol.cc sql_state.c \
 
82
                        lock.cc my_lock.c \
 
83
                        sql_string.cc sql_manager.cc sql_map.cc \
 
84
                        mysqld.cc password.c hash_filo.cc \
 
85
                        sql_connect.cc scheduler.cc sql_parse.cc \
 
86
                        set_var.cc sql_yacc.yy \
 
87
                        sql_base.cc table.cc sql_select.cc sql_insert.cc \
 
88
                        sql_error.cc sql_locale.cc \
 
89
                        sql_update.cc sql_delete.cc uniques.cc \
 
90
                        sql_test.cc \
 
91
                        log.cc init.cc derror.cc \
 
92
                        unireg.cc \
 
93
                        log_event.cc rpl_record.cc \
 
94
                        discover.cc time.cc opt_range.cc opt_sum.cc \
 
95
                        records.cc filesort.cc handler.cc \
 
96
                        sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
 
97
                        sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
 
98
                        sql_udf.cc \
 
99
                        slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
 
100
                        rpl_utility.cc rpl_rli.cc rpl_mi.cc \
 
101
                        rpl_reporting.cc \
 
102
                        sql_union.cc sql_derived.cc \
 
103
                        sql_client.cc \
 
104
                        stacktrace.c repl_failsafe.h repl_failsafe.cc \
 
105
                        sql_olap.cc \
 
106
                        tztime.cc my_decimal.cc\
 
107
                        sql_plugin.cc sql_binlog.cc \
 
108
                        sql_builtin.cc
 
109
 
 
110
if HAVE_DTRACE
 
111
  mysqld_SOURCES += probes.d
 
112
endif
 
113
 
 
114
nodist_mysqld_SOURCES = mini_client_errors.c pack.c client.c my_time.c
 
115
 
 
116
gen_lex_hash_SOURCES =  gen_lex_hash.cc
 
117
gen_lex_hash_LDFLAGS =  @NOINST_LDFLAGS@
 
118
 
 
119
mysql_tzinfo_to_sql_SOURCES = tztime.cc
 
120
mysql_tzinfo_to_sql_CXXFLAGS= -DTZINFO2SQL
 
121
 
 
122
DEFS =                  -DMYSQL_SERVER \
 
123
                        -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
 
124
                        -DDATADIR="\"$(MYSQLDATAdir)\"" \
 
125
                        -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
 
126
                        -DPLUGINDIR="\"$(pkgplugindir)\"" \
 
127
                        @DEFS@
 
128
 
 
129
BUILT_MAINT_SRC =       sql_yacc.cc sql_yacc.h
 
130
BUILT_SOURCES =         $(BUILT_MAINT_SRC) lex_hash.h link_sources
 
131
EXTRA_DIST =            $(BUILT_MAINT_SRC) \
 
132
                        message.mc \
 
133
                        probes.d
 
134
CLEANFILES =            lex_hash.h sql_yacc.output link_sources
 
135
DISTCLEANFILES =        $(EXTRA_PROGRAMS)
 
136
MAINTAINERCLEANFILES =  $(BUILT_MAINT_SRC)
 
137
AM_YFLAGS =             -d --verbose
 
138
 
 
139
# These are listed in 'nodist_mysqld_SOURCES'
 
140
link_sources:
 
141
        rm -f mini_client_errors.c
 
142
        @LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c
 
143
        rm -f pack.c
 
144
        @LN_CP_F@ $(top_srcdir)/sql-common/pack.c pack.c
 
145
        rm -f client.c
 
146
        @LN_CP_F@ $(top_srcdir)/sql-common/client.c client.c
 
147
        rm -f my_time.c
 
148
        @LN_CP_F@ $(top_srcdir)/sql-common/my_time.c my_time.c
 
149
        echo timestamp > link_sources
 
150
 
 
151
# This generates lex_hash.h
 
152
# NOTE Built sources should depend on their sources not the tool
 
153
# this avoid the rebuild of the built files in a source dist
 
154
lex_hash.h:     gen_lex_hash.cc lex.h
 
155
                $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
 
156
                ./gen_lex_hash$(EXEEXT) > $@-t
 
157
                $(MV) $@-t $@
 
158
 
 
159
probes.h: probes.d
 
160
        $(DTRACE) $(DTRACEFLAGS) -h -s probes.d
 
161
        mv probes.h probes.h.bak
 
162
        sed "s/#include <unistd.h>//g" probes.h.bak > probes.h
 
163
        rm probes.h.bak
 
164
 
 
165
SUFFIXES : .d
 
166
 
 
167
.d.o : $(DTRACEFILES)
 
168
        $(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES)
 
169
 
 
170
# Don't update the files from bitkeeper
 
171
%::SCCS/s.%