diff options
Diffstat (limited to 'sql/Makefile.am')
-rw-r--r-- | sql/Makefile.am | 78 |
1 files changed, 75 insertions, 3 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am index 0b22481f850..15ee0d588c4 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -28,6 +28,40 @@ SUBDIRS = share libexec_PROGRAMS = mysqld EXTRA_PROGRAMS = gen_lex_hash bin_PROGRAMS = mysql_tzinfo_to_sql +DTRACEFILES = filesort.o \ + .libs/libndb_la-ha_ndbcluster.o \ + handler.o \ + mysqld.o \ + net_serv.o \ + scheduler.o \ + sp_head.o \ + sql_cache.o \ + sql_connect.o \ + sql_cursor.o \ + sql_delete.o \ + sql_insert.o \ + sql_parse.o \ + sql_prepare.o \ + sql_select.o \ + sql_update.o + +DTRACEFILES_DEPEND = filesort.o \ + libndb_la-ha_ndbcluster.lo \ + handler.o \ + mysqld.o \ + net_serv.o \ + scheduler.o \ + sp_head.o \ + sql_cache.o \ + sql_connect.o \ + sql_cursor.o \ + sql_delete.o \ + sql_insert.o \ + sql_parse.o \ + sql_prepare.o \ + sql_select.o \ + sql_update.o + noinst_LTLIBRARIES= libndb.la \ udf_example.la @@ -48,7 +82,7 @@ mysqld_LDADD = libndb.la \ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ item_strfunc.h item_timefunc.h \ - item_xmlfunc.h \ + item_xmlfunc.h sql_plugin_services.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 \ @@ -77,7 +111,8 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ sql_plugin.h authors.h event_parse_data.h \ event_data_objects.h event_scheduler.h \ sql_partition.h partition_info.h partition_element.h \ - contributors.h sql_servers.h + contributors.h sql_servers.h sql_signal.h records.h \ + sql_prepare.h rpl_handler.h replication.h mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ item.cc item_sum.cc item_buff.cc item_func.cc \ @@ -122,7 +157,8 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.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_servers.cc event_parse_data.cc + sql_servers.cc event_parse_data.cc sql_signal.cc \ + rpl_handler.cc nodist_mysqld_SOURCES = mini_client_errors.c pack.c client.c my_time.c my_user.c @@ -190,5 +226,41 @@ install-exec-hook: test ! -f mysqld-debug.sym.gz || $(INSTALL_DATA) mysqld-debug.sym.gz $(DESTDIR)$(pkglibdir) test ! -f mysqld.sym.gz || $(INSTALL_DATA) mysqld.sym.gz $(DESTDIR)$(pkglibdir) +if HAVE_DTRACE_DASH_G +libndb_la_LIBADD = probes_libndb.o +libndb_la_DEPENDENCIES = dtrace_files dtrace_providers probes_libndb.o +mysqld_LDADD += probes_all.o +mysqld_DEPENDENCIES += dtrace_files dtrace_providers probes_all.o +CLEANFILES += dtrace_files dtrace_providers probes_all.o +DTRACEPROVIDER = probes_mysql.d +CLEANFILES += $(DTRACEPROVIDER) + +dtrace_files: + echo $(DTRACEFILES) > $@ +dtrace_providers: probes_mysql.d + echo $(DTRACEPROVIDER) > $@ +probes_mysql.d: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d + +DTRACEDIRS = . ../mysys $(patsubst %,$(top_builddir)/storage/%,@mysql_se_dirs@) + +probes_all.o: probes_mysql.d $(DTRACEFILES_DEPEND) + providers=`(for i in $(DTRACEDIRS); do cat $$i/dtrace_providers 2>/dev/null; done) | tr " " "\n" | sort | uniq | sed -e '/^$$/d' -e 's/^/-s /'`; \ + objects=`for i in $(DTRACEDIRS); do f=\`cat $$i/dtrace_files 2>/dev/null\`; for j in $$f; do test -f $$i/$$j && echo "$$i/$$j "; done; done`; \ + $(DTRACE) $(DTRACEFLAGS) -G $$providers $$objects -o $@ + +# Can't depend directly on .libs/*.o, because there is no generated rule for +# that in the Makefile; it is a byproduct of *.lo +probes_libndb.o: probes_mysql.d libndb_la-ha_ndbcluster.lo + if test -f .libs/libndb_la-ha_ndbcluster.o ; then \ + $(DTRACE) $(DTRACEFLAGS) -G -s probes_mysql.d .libs/libndb_la-ha_ndbcluster.o -o $@; \ + fi; \ + if test -f libndb_la-ha_ndbcluster.o ; then \ + $(DTRACE) $(DTRACEFLAGS) -G -s probes_mysql.d libndb_la-ha_ndbcluster.o -o $@; \ + fi + +endif + # Don't update the files from bitkeeper %::SCCS/s.% |