diff options
Diffstat (limited to 'sql/Makefile.am')
-rw-r--r-- | sql/Makefile.am | 122 |
1 files changed, 55 insertions, 67 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am index d3e1f2c197e..63b164b16b4 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -1,9 +1,8 @@ -# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +# Copyright (C) 2000-2006 MySQL AB # # 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 -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,54 +21,56 @@ MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) INCLUDES = @ZLIB_INCLUDES@ \ -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/regex -I$(srcdir) \ - $(openssl_includes) + -I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes) WRAPLIBS= @WRAPLIBS@ SUBDIRS = share libexec_PROGRAMS = mysqld -noinst_PROGRAMS = gen_lex_hash +EXTRA_PROGRAMS = gen_lex_hash bin_PROGRAMS = mysql_tzinfo_to_sql -gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@ -SUPPORTING_LIBS = $(top_builddir)/vio/libvio.a \ +SUPPORTING_LIBS = $(top_builddir)/vio/libvio.a \ $(top_builddir)/mysys/libmysys.a \ $(top_builddir)/dbug/libdbug.a \ $(top_builddir)/regex/libregex.a \ $(top_builddir)/strings/libmystrings.a mysqld_DEPENDENCIES= @mysql_plugin_libs@ $(SUPPORTING_LIBS) -LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ +LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ @NDB_SCI_LIBS@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ @pstack_libs@ \ @mysql_plugin_libs@ \ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \ - @yassl_libs@ @openssl_libs@ + $(yassl_libs) $(openssl_libs) + noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ - item_strfunc.h item_timefunc.h item_uniq.h \ + item_strfunc.h item_timefunc.h \ item_xmlfunc.h \ item_create.h item_subselect.h item_row.h \ mysql_priv.h item_geofunc.h sql_bitmap.h \ procedure.h sql_class.h sql_lex.h sql_list.h \ sql_map.h sql_string.h unireg.h \ sql_error.h field.h handler.h mysqld_suffix.h \ - ha_partition.h \ - ha_ndbcluster.h ha_ndbcluster_binlog.h \ - ha_ndbcluster_tables.h \ + ha_ndbcluster.h ha_ndbcluster_cond.h \ + ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \ + ha_partition.h rpl_constants.h \ opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \ rpl_reporting.h \ log.h sql_show.h rpl_rli.h rpl_mi.h \ sql_select.h structs.h table.h sql_udf.h hash_filo.h \ lex.h lex_symbol.h sql_acl.h sql_crypt.h \ - log_event.h sql_repl.h slave.h rpl_filter.h \ - rpl_injector.h \ + sql_repl.h slave.h rpl_filter.h rpl_injector.h \ + log_event.h rpl_record.h \ + log_event_old.h rpl_record_old.h \ stacktrace.h sql_sort.h sql_cache.h set_var.h \ spatial.h gstream.h client_settings.h tzfile.h \ tztime.h my_decimal.h\ sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \ parse_file.h sql_view.h sql_trigger.h \ - sql_array.h sql_cursor.h events.h \ + sql_array.h sql_cursor.h events.h scheduler.h \ event_db_repository.h event_queue.h \ - sql_plugin.h authors.h sql_partition.h event_data_objects.h \ - partition_info.h partition_element.h event_scheduler.h \ - contributors.h + sql_plugin.h authors.h \ + event_data_objects.h event_scheduler.h \ + sql_partition.h partition_info.h partition_element.h \ + contributors.h sql_servers.h + mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ item.cc item_sum.cc item_buff.cc item_func.cc \ item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \ @@ -80,17 +81,20 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ lock.cc my_lock.c \ sql_string.cc sql_manager.cc sql_map.cc \ mysqld.cc password.c hash_filo.cc hostname.cc \ - set_var.cc sql_parse.cc sql_yacc.yy \ + sql_connect.cc scheduler.cc sql_parse.cc \ + set_var.cc sql_yacc.yy \ sql_base.cc table.cc sql_select.cc sql_insert.cc \ sql_prepare.cc sql_error.cc sql_locale.cc \ sql_update.cc sql_delete.cc uniques.cc sql_do.cc \ - procedure.cc item_uniq.cc sql_test.cc \ - log.cc log_event.cc init.cc derror.cc sql_acl.cc \ + procedure.cc sql_test.cc \ + log.cc init.cc derror.cc sql_acl.cc \ unireg.cc des_key_file.cc \ + log_event.cc rpl_record.cc \ + log_event_old.cc rpl_record_old.cc \ discover.cc time.cc opt_range.cc opt_sum.cc \ records.cc filesort.cc handler.cc \ - ha_partition.cc \ - ha_ndbcluster.cc ha_ndbcluster_binlog.cc \ + ha_ndbcluster.cc ha_ndbcluster_cond.cc \ + ha_ndbcluster_binlog.cc ha_partition.cc \ sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \ sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \ sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \ @@ -108,13 +112,14 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ event_scheduler.cc event_data_objects.cc \ event_queue.cc event_db_repository.cc events.cc \ sql_plugin.cc sql_binlog.cc \ - sql_builtin.cc sql_tablespace.cc partition_info.cc - + sql_builtin.cc sql_tablespace.cc partition_info.cc \ + sql_servers.cc gen_lex_hash_SOURCES = gen_lex_hash.cc -gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS) -mysql_tzinfo_to_sql_SOURCES = mysql_tzinfo_to_sql.cc -mysql_tzinfo_to_sql_LDADD = @MYSQLD_EXTRA_LDFLAGS@ $(LDADD) $(CXXLDFLAGS) +gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@ + +mysql_tzinfo_to_sql_SOURCES = tztime.cc +mysql_tzinfo_to_sql_CXXFLAGS= -DTZINFO2SQL DEFS = -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ @@ -123,19 +128,17 @@ DEFS = -DMYSQL_SERVER \ -DLIBDIR="\"$(MYSQLLIBdir)\"" \ @DEFS@ -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) \ +BUILT_MAINT_SRC = sql_yacc.cc sql_yacc.h +BUILT_SOURCES = $(BUILT_MAINT_SRC) lex_hash.h link_sources +EXTRA_DIST = udf_example.c udf_example.def $(BUILT_MAINT_SRC) \ nt_servc.cc nt_servc.h message.mc CMakeLists.txt \ udf_example.c udf_example.def -CLEANFILES = lex_hash.h sql_yacc.cc sql_yacc.h sql_yacc.output -AM_YFLAGS = -d --debug --verbose - -mysql_tzinfo_to_sql.cc: - rm -f mysql_tzinfo_to_sql.cc - @LN_CP_F@ $(srcdir)/tztime.cc mysql_tzinfo_to_sql.cc +CLEANFILES = lex_hash.h sql_yacc.output link_sources +DISTCLEANFILES = $(EXTRA_PROGRAMS) +MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC) +AM_YFLAGS = -d --verbose -link_sources: mysql_tzinfo_to_sql.cc +link_sources: rm -f mini_client_errors.c @LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c rm -f pack.c @@ -147,36 +150,21 @@ link_sources: mysql_tzinfo_to_sql.cc rm -f my_user.c @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c -mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES) - $(CXXCOMPILE) -c $(INCLUDES) -DTZINFO2SQL $< - -# 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 - -sql_yacc.h: sql_yacc.yy - -# 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). -sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS) - @SED@ -e 's/__attribute__ ((__unused__))//' $< > sql_yacc.cc-new - @MV@ sql_yacc.cc-new sql_yacc.cc - @echo "Note: The following compile may take a long time." - @echo "If it fails, re-run configure with --with-low-memory" - $(CXXCOMPILE) $(LM_CFLAGS) -c sql_yacc.cc - -# 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) - ./gen_lex_hash$(EXEEXT) > $@ - -# the following three should eventually be moved out of this directory +# This generates lex_hash.h +# NOTE Built sources should depend on their sources not the tool +# this avoid the rebuild of the built files in a source dist +lex_hash.h: gen_lex_hash.cc lex.h + $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) + ./gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + +# the following four should eventually be moved out of this directory ha_ndbcluster.o:ha_ndbcluster.cc ha_ndbcluster.h $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< +ha_ndbcluster_cond.o:ha_ndbcluster_cond.cc ha_ndbcluster_cond.h + $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< + ha_ndbcluster_binlog.o:ha_ndbcluster_binlog.cc ha_ndbcluster_binlog.h $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< |