2006-12-31 01:02:27 +01:00
|
|
|
# Copyright (C) 2000-2006 MySQL AB
|
2000-07-31 21:29:14 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2006-12-23 20:17:15 +01:00
|
|
|
# the Free Software Foundation; version 2 of the License.
|
2000-07-31 21:29:14 +02:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
#called from the top level Makefile
|
|
|
|
|
|
|
|
MYSQLDATAdir = $(localstatedir)
|
|
|
|
MYSQLSHAREdir = $(pkgdatadir)
|
|
|
|
MYSQLBASEdir= $(prefix)
|
2005-11-06 13:13:06 +01:00
|
|
|
MYSQLLIBdir= $(pkglibdir)
|
2005-03-16 16:22:56 -08:00
|
|
|
INCLUDES = @ZLIB_INCLUDES@ \
|
2005-07-05 23:24:48 +02:00
|
|
|
-I$(top_builddir)/include -I$(top_srcdir)/include \
|
2006-06-06 14:21:07 +03:00
|
|
|
-I$(top_srcdir)/regex -I$(srcdir) \
|
2005-10-18 15:43:59 +02:00
|
|
|
$(openssl_includes)
|
2000-07-31 21:29:14 +02:00
|
|
|
WRAPLIBS= @WRAPLIBS@
|
|
|
|
SUBDIRS = share
|
|
|
|
libexec_PROGRAMS = mysqld
|
2006-10-14 20:03:49 +02:00
|
|
|
noinst_PROGRAMS = gen_lex_hash
|
2004-06-23 13:07:00 +04:00
|
|
|
bin_PROGRAMS = mysql_tzinfo_to_sql
|
2001-10-08 04:58:07 +03:00
|
|
|
gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@
|
2006-11-02 14:26:54 -05:00
|
|
|
SUPPORTING_LIBS = $(top_builddir)/vio/libvio.a \
|
WL#1518, "make bundled zlib usable for unix builds":
required autotools macro written and deployed in all apropriate Makefile.ams.
Use cases checked:
- linux, standard location of zlib, no ndb
- linux, standard locatoin of zlib, with ndb
- linux, non-standard location of zlib, no ndb
- hpux11, use of bundled zlib, no ndb
The only non-checked case is non-standard location of zlib (or use of bundled
zlib) + ndb. I wasn't able to check it as ndb/ just won't compile on beasts
like AIX52 or HPUX11, where such a check is possible. It didn't compile
there before as these systems dont't have installed zlib, so nothing got broken ;)
2004-07-24 03:30:11 -07:00
|
|
|
$(top_builddir)/mysys/libmysys.a \
|
|
|
|
$(top_builddir)/dbug/libdbug.a \
|
|
|
|
$(top_builddir)/regex/libregex.a \
|
2006-11-02 14:26:54 -05:00
|
|
|
$(top_builddir)/strings/libmystrings.a
|
|
|
|
mysqld_DEPENDENCIES= @mysql_plugin_libs@ $(SUPPORTING_LIBS)
|
|
|
|
LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@
|
2001-02-19 20:13:17 -05:00
|
|
|
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
|
2005-11-07 16:25:06 +01:00
|
|
|
@pstack_libs@ \
|
2006-04-13 13:49:29 -07:00
|
|
|
@mysql_plugin_libs@ \
|
2005-10-18 15:43:59 +02:00
|
|
|
$(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
|
|
|
|
@yassl_libs@ @openssl_libs@
|
2000-07-31 21:29:14 +02:00
|
|
|
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
Bug#22687 (Functions UNIQUE_USERS, GROUP_UNIQUE_USERS)
According to some internal communication, these two functions are place
holders for future enhancements. Because they use a variable number of
parameters, the implementation defined a reserved keyword for them in the
parser grammar.
Unfortunately, doing so creates a bug similar to Bug 21114 reported for the
function FORMAT.
In the 5.1 code base, due to improvements in the code implemented with bug
21114, having a reserved keyword for functions with a variable number of
arguments is not needed any more by the implementation.
As a result, this fix removes the place-holder implementation, and removes
the unnecessary reserved keywords. Should the functions UNIQUE_USERS and
GROUP_UNIQUE_USERS be finally implemented in a later release, the
implementation should sub class Create_native_func in sql/item_create.cc.
For example, see the class Create_func_concat.
2007-01-11 14:58:05 -07:00
|
|
|
item_strfunc.h item_timefunc.h \
|
2005-12-21 17:13:52 +04:00
|
|
|
item_xmlfunc.h \
|
2002-11-15 20:32:09 +02:00
|
|
|
item_create.h item_subselect.h item_row.h \
|
2003-11-12 12:32:51 +01:00
|
|
|
mysql_priv.h item_geofunc.h sql_bitmap.h \
|
2000-07-31 21:29:14 +02:00
|
|
|
procedure.h sql_class.h sql_lex.h sql_list.h \
|
2006-08-10 18:29:25 -07:00
|
|
|
sql_map.h sql_string.h unireg.h \
|
2005-04-01 15:04:50 +03:00
|
|
|
sql_error.h field.h handler.h mysqld_suffix.h \
|
2006-08-19 17:38:42 -07:00
|
|
|
ha_partition.h \
|
2006-04-13 13:49:29 -07:00
|
|
|
ha_ndbcluster.h ha_ndbcluster_binlog.h \
|
2006-04-29 09:33:34 -07:00
|
|
|
ha_ndbcluster_tables.h \
|
2006-05-03 15:00:38 +02:00
|
|
|
opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
|
2006-10-31 16:51:51 +01:00
|
|
|
log.h sql_show.h rpl_rli.h rpl_mi.h \
|
2006-04-29 09:33:34 -07:00
|
|
|
sql_select.h structs.h table.h sql_udf.h hash_filo.h \
|
2001-09-19 14:30:43 -06:00
|
|
|
lex.h lex_symbol.h sql_acl.h sql_crypt.h \
|
2005-03-21 22:09:42 +01:00
|
|
|
log_event.h sql_repl.h slave.h rpl_filter.h \
|
2006-01-12 19:51:02 +01:00
|
|
|
rpl_injector.h \
|
2002-08-30 12:40:40 +03:00
|
|
|
stacktrace.h sql_sort.h sql_cache.h set_var.h \
|
2004-06-18 10:11:31 +04:00
|
|
|
spatial.h gstream.h client_settings.h tzfile.h \
|
2006-04-13 13:49:29 -07:00
|
|
|
tztime.h my_decimal.h\
|
2004-05-11 23:23:49 +03:00
|
|
|
sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \
|
2004-09-09 19:52:10 +04:00
|
|
|
parse_file.h sql_view.h sql_trigger.h \
|
2006-06-28 01:28:03 +02:00
|
|
|
sql_array.h sql_cursor.h events.h \
|
2006-07-13 16:24:55 +02:00
|
|
|
event_db_repository.h event_queue.h \
|
2006-06-27 08:48:50 +02:00
|
|
|
sql_plugin.h authors.h sql_partition.h event_data_objects.h \
|
2006-05-24 09:28:37 +02:00
|
|
|
partition_info.h partition_element.h event_scheduler.h \
|
2006-12-01 19:47:45 -05:00
|
|
|
contributors.h sql_servers.h
|
2005-11-07 16:25:06 +01:00
|
|
|
mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
|
2000-07-31 21:29:14 +02:00
|
|
|
item.cc item_sum.cc item_buff.cc item_func.cc \
|
|
|
|
item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
|
2002-11-15 20:32:09 +02:00
|
|
|
thr_malloc.cc item_create.cc item_subselect.cc \
|
2005-12-21 17:13:52 +04:00
|
|
|
item_row.cc item_geofunc.cc item_xmlfunc.cc \
|
2003-11-03 14:01:59 +02:00
|
|
|
field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
|
2003-06-04 18:28:51 +03:00
|
|
|
net_serv.cc protocol.cc sql_state.c \
|
|
|
|
lock.cc my_lock.c \
|
2000-11-27 18:14:49 -05:00
|
|
|
sql_string.cc sql_manager.cc sql_map.cc \
|
2000-07-31 21:29:14 +02:00
|
|
|
mysqld.cc password.c hash_filo.cc hostname.cc \
|
2003-05-23 14:02:27 +05:00
|
|
|
set_var.cc sql_parse.cc sql_yacc.yy \
|
2000-07-31 21:29:14 +02:00
|
|
|
sql_base.cc table.cc sql_select.cc sql_insert.cc \
|
2006-07-26 23:33:25 +04:00
|
|
|
sql_prepare.cc sql_error.cc sql_locale.cc \
|
2001-12-17 20:47:20 +02:00
|
|
|
sql_update.cc sql_delete.cc uniques.cc sql_do.cc \
|
Bug#22687 (Functions UNIQUE_USERS, GROUP_UNIQUE_USERS)
According to some internal communication, these two functions are place
holders for future enhancements. Because they use a variable number of
parameters, the implementation defined a reserved keyword for them in the
parser grammar.
Unfortunately, doing so creates a bug similar to Bug 21114 reported for the
function FORMAT.
In the 5.1 code base, due to improvements in the code implemented with bug
21114, having a reserved keyword for functions with a variable number of
arguments is not needed any more by the implementation.
As a result, this fix removes the place-holder implementation, and removes
the unnecessary reserved keywords. Should the functions UNIQUE_USERS and
GROUP_UNIQUE_USERS be finally implemented in a later release, the
implementation should sub class Create_native_func in sql/item_create.cc.
For example, see the class Create_func_concat.
2007-01-11 14:58:05 -07:00
|
|
|
procedure.cc sql_test.cc \
|
2001-05-14 01:12:40 +03:00
|
|
|
log.cc log_event.cc init.cc derror.cc sql_acl.cc \
|
2001-12-10 11:02:26 +02:00
|
|
|
unireg.cc des_key_file.cc \
|
2004-04-15 09:14:14 +02:00
|
|
|
discover.cc time.cc opt_range.cc opt_sum.cc \
|
2000-07-31 21:29:14 +02:00
|
|
|
records.cc filesort.cc handler.cc \
|
2006-09-07 08:23:58 -07:00
|
|
|
ha_partition.cc \
|
2006-04-13 13:49:29 -07:00
|
|
|
ha_ndbcluster.cc ha_ndbcluster_binlog.cc \
|
2000-08-21 03:00:52 +03:00
|
|
|
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
|
2000-07-31 21:29:14 +02:00
|
|
|
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
|
|
|
|
sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
|
2005-12-22 06:39:02 +01:00
|
|
|
slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
|
2006-10-31 16:51:51 +01:00
|
|
|
rpl_utility.cc rpl_injector.cc rpl_rli.cc rpl_mi.cc \
|
2005-03-21 22:09:42 +01:00
|
|
|
sql_union.cc sql_derived.cc \
|
2003-06-14 11:37:42 +03:00
|
|
|
client.c sql_client.cc mini_client_errors.c pack.c\
|
2004-05-20 00:54:52 +03:00
|
|
|
stacktrace.c repl_failsafe.h repl_failsafe.cc \
|
2004-07-16 01:15:55 +03:00
|
|
|
sql_olap.cc sql_view.cc \
|
2005-09-22 02:11:21 +04:00
|
|
|
gstream.cc spatial.cc sql_help.cc sql_cursor.cc \
|
2006-01-11 02:07:40 +03:00
|
|
|
tztime.cc my_time.c my_user.c my_decimal.cc\
|
2003-09-16 14:26:08 +02:00
|
|
|
sp_head.cc sp_pcontext.cc sp_rcontext.cc sp.cc \
|
2004-09-09 19:52:10 +04:00
|
|
|
sp_cache.cc parse_file.cc sql_trigger.cc \
|
2006-08-17 14:22:59 +02:00
|
|
|
event_scheduler.cc event_data_objects.cc \
|
|
|
|
event_queue.cc event_db_repository.cc events.cc \
|
2005-12-22 06:39:02 +01:00
|
|
|
sql_plugin.cc sql_binlog.cc \
|
2006-12-01 19:47:45 -05:00
|
|
|
sql_builtin.cc sql_tablespace.cc partition_info.cc \
|
|
|
|
sql_servers.cc
|
2006-04-13 13:49:29 -07:00
|
|
|
|
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
gen_lex_hash_SOURCES = gen_lex_hash.cc
|
|
|
|
gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
|
2004-06-27 20:07:21 +03:00
|
|
|
mysql_tzinfo_to_sql_SOURCES = mysql_tzinfo_to_sql.cc
|
2004-07-30 13:52:44 +02:00
|
|
|
mysql_tzinfo_to_sql_LDADD = @MYSQLD_EXTRA_LDFLAGS@ $(LDADD) $(CXXLDFLAGS)
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
DEFS = -DMYSQL_SERVER \
|
|
|
|
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
|
|
|
-DDATADIR="\"$(MYSQLDATAdir)\"" \
|
|
|
|
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
|
2005-11-06 13:13:06 +01:00
|
|
|
-DLIBDIR="\"$(MYSQLLIBdir)\"" \
|
2000-07-31 21:29:14 +02:00
|
|
|
@DEFS@
|
2005-06-20 18:03:30 +02:00
|
|
|
|
2006-10-14 20:03:49 +02:00
|
|
|
BUILT_DIST_SRC = sql_yacc.cc sql_yacc.h
|
|
|
|
BUILT_SOURCES = $(BUILT_DIST_SRC) lex_hash.h
|
|
|
|
EXTRA_DIST = udf_example.c udf_example.def $(BUILT_DIST_SRC) \
|
2006-09-23 07:54:40 +02:00
|
|
|
nt_servc.cc nt_servc.h message.mc CMakeLists.txt \
|
2006-09-22 14:42:43 +02:00
|
|
|
udf_example.c udf_example.def
|
2006-08-30 03:00:19 +04:00
|
|
|
CLEANFILES = lex_hash.h sql_yacc.cc sql_yacc.h sql_yacc.output
|
2006-08-18 19:16:07 -07:00
|
|
|
AM_YFLAGS = -d --debug --verbose
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2004-06-27 20:17:32 +02:00
|
|
|
mysql_tzinfo_to_sql.cc:
|
|
|
|
rm -f mysql_tzinfo_to_sql.cc
|
2005-09-24 15:51:45 +02:00
|
|
|
@LN_CP_F@ $(srcdir)/tztime.cc mysql_tzinfo_to_sql.cc
|
2004-06-27 20:17:32 +02:00
|
|
|
|
|
|
|
link_sources: mysql_tzinfo_to_sql.cc
|
2000-07-31 21:29:14 +02:00
|
|
|
rm -f mini_client_errors.c
|
2005-09-24 15:51:45 +02:00
|
|
|
@LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c
|
2003-04-23 19:37:33 +05:00
|
|
|
rm -f pack.c
|
2005-09-24 15:51:45 +02:00
|
|
|
@LN_CP_F@ $(top_srcdir)/sql-common/pack.c pack.c
|
2003-05-31 15:15:46 +05:00
|
|
|
rm -f client.c
|
2005-09-24 15:51:45 +02:00
|
|
|
@LN_CP_F@ $(top_srcdir)/sql-common/client.c client.c
|
2004-06-24 19:08:36 +04:00
|
|
|
rm -f my_time.c
|
2005-09-24 15:51:45 +02:00
|
|
|
@LN_CP_F@ $(top_srcdir)/sql-common/my_time.c my_time.c
|
2006-01-11 02:07:40 +03:00
|
|
|
rm -f my_user.c
|
|
|
|
@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2004-06-27 20:07:21 +03:00
|
|
|
mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES)
|
|
|
|
$(CXXCOMPILE) -c $(INCLUDES) -DTZINFO2SQL $<
|
2004-06-23 13:07:00 +04:00
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
# Try to get better dependencies for the grammar. Othervise really bad
|
|
|
|
# things like different grammars for different pars of MySQL can
|
|
|
|
# happen if you are unlucky.
|
|
|
|
sql_yacc.cc: sql_yacc.yy
|
2006-11-01 19:41:09 +02:00
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
sql_yacc.h: sql_yacc.yy
|
|
|
|
|
2006-11-28 18:08:30 +01:00
|
|
|
# Be careful here, note that we use VPATH and might or might not have
|
|
|
|
# a pregenerated "sql_yacc.cc" in $(srcdir) or one we just built in
|
|
|
|
# $(builddir). And it has to work if $(srcdir) == $(builddir).
|
2003-07-06 19:09:57 +03:00
|
|
|
sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS)
|
2006-11-28 18:08:30 +01:00
|
|
|
@SED@ -e 's/__attribute__ ((__unused__))//' $< > sql_yacc.cc-new
|
2006-11-01 19:41:09 +02:00
|
|
|
@MV@ sql_yacc.cc-new sql_yacc.cc
|
2000-08-22 04:36:43 -05:00
|
|
|
@echo "Note: The following compile may take a long time."
|
2000-07-31 21:29:14 +02:00
|
|
|
@echo "If it fails, re-run configure with --with-low-memory"
|
2006-11-28 18:08:30 +01:00
|
|
|
$(CXXCOMPILE) $(LM_CFLAGS) -c sql_yacc.cc
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2006-10-14 20:03:49 +02:00
|
|
|
# FIXME seems like now "lex_hash.h" differs depending on configure
|
|
|
|
# flags, so can't pregenerate and include in source TAR. Revert to
|
|
|
|
# dist pregenerated if this changes, so the file doesn't differ.
|
|
|
|
lex_hash.h: gen_lex_hash$(EXEEXT)
|
2003-06-20 15:19:51 +02:00
|
|
|
./gen_lex_hash$(EXEEXT) > $@
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2006-04-13 13:49:29 -07:00
|
|
|
# the following three should eventually be moved out of this directory
|
2005-11-07 16:25:06 +01:00
|
|
|
ha_ndbcluster.o:ha_ndbcluster.cc ha_ndbcluster.h
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
|
|
|
2006-01-12 19:51:02 +01:00
|
|
|
ha_ndbcluster_binlog.o:ha_ndbcluster_binlog.cc ha_ndbcluster_binlog.h
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
|
|
|
2005-11-07 16:25:06 +01:00
|
|
|
#Until we can get rid of dependencies on ha_ndbcluster.h
|
|
|
|
handler.o: handler.cc ha_ndbcluster.h
|
|
|
|
$(CXXCOMPILE) @ndbcluster_includes@ $(CXXFLAGS) -c $<
|
|
|
|
|
2006-03-10 10:41:04 +01:00
|
|
|
# For testing of udf_example.so
|
|
|
|
noinst_LTLIBRARIES= udf_example.la
|
2006-07-29 04:41:50 +02:00
|
|
|
udf_example_la_SOURCES= udf_example.c
|
2006-03-10 10:41:04 +01:00
|
|
|
udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)
|
|
|
|
|
2002-09-05 16:17:08 +03:00
|
|
|
|
2000-08-16 05:14:02 +03:00
|
|
|
# Don't update the files from bitkeeper
|
|
|
|
%::SCCS/s.%
|