diff options
-rw-r--r-- | include/Makefile.am | 14 | ||||
-rw-r--r-- | include/probes_mysql.d (renamed from sql/probes_mysql.d) | 0 | ||||
-rw-r--r-- | mysys/Makefile.am | 13 | ||||
-rw-r--r-- | sql/Makefile.am | 9 | ||||
-rw-r--r-- | storage/archive/Makefile.am | 11 | ||||
-rw-r--r-- | storage/blackhole/Makefile.am | 11 | ||||
-rw-r--r-- | storage/csv/Makefile.am | 10 | ||||
-rw-r--r-- | storage/example/Makefile.am | 11 | ||||
-rw-r--r-- | storage/federated/Makefile.am | 11 | ||||
-rw-r--r-- | storage/heap/Makefile.am | 11 | ||||
-rw-r--r-- | storage/myisam/Makefile.am | 11 | ||||
-rw-r--r-- | storage/myisammrg/Makefile.am | 11 |
12 files changed, 90 insertions, 33 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 22305ba57c3..0bf4f70d3a4 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,7 +15,7 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA -BUILT_SOURCES = $(HEADERS_GEN_MAKE) link_sources +BUILT_SOURCES = $(HEADERS_GEN_MAKE) link_sources dtrace_sources HEADERS_GEN_CONFIGURE = mysql_version.h HEADERS_GEN_MAKE = my_config.h HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \ @@ -69,11 +69,21 @@ my_config.h: config.h dist-hook: $(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d if HAVE_DTRACE BUILT_SOURCES += probes_mysql_dtrace.h CLEANFILES += probes_mysql_dtrace.h +# Fake for creating the probes file. If we are building a separate directory +# then we copy the probes from the source location and use that +# If we are building in the same directory as the source, we do not copy + +dtrace_sources: + if ! test -f probes_mysql.d ; then \ + $(CP) -f $(top_srcdir)/include/probes_mysql.d probes_mysql.d; \ + fi + echo timestamp > dtrace_sources + probes_mysql_dtrace.h: $(DTRACEPROVIDER) $(DTRACE) $(DTRACEFLAGS) -h -s $(DTRACEPROVIDER) -o $@ endif diff --git a/sql/probes_mysql.d b/include/probes_mysql.d index 958e3042dde..958e3042dde 100644 --- a/sql/probes_mysql.d +++ b/include/probes_mysql.d diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 7e9b53f2015..afe558a5c06 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -131,13 +131,18 @@ libmysys_a_LIBADD += probes_mysql.o libmysys_a_DEPENDENCIES += probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = mf_keycache.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: - echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_providers: dtrace_sources + echo $(SQL_DTRACEPROVIDER) > $@ +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/sql/Makefile.am b/sql/Makefile.am index d7c35b3eb9a..07b82a3c0f6 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -212,16 +212,19 @@ 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 = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = ../include/probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d DTRACEDIRS = . ../mysys $(patsubst %,$(top_builddir)/storage/%,@mysql_se_dirs@) -probes_all.o: probes_mysql.d $(DTRACEFILES) +probes_all.o: probes_mysql.d $(DTRACEFILES) dtrace_sources 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 $@ diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am index b86611d24e6..ac3dd995637 100644 --- a/storage/archive/Makefile.am +++ b/storage/archive/Makefile.am @@ -72,13 +72,18 @@ libarchive_a_LIBADD = probes_mysql.o libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = libarchive_a-ha_archive.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am index 855fd30cb8d..b417c900f11 100644 --- a/storage/blackhole/Makefile.am +++ b/storage/blackhole/Makefile.am @@ -54,13 +54,18 @@ libblackhole_a_LIBADD = probes_mysql.o libblackhole_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = libblackhole_a-ha_blackhole.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/csv/Makefile.am b/storage/csv/Makefile.am index 0f19c1159bc..41111da4c6f 100644 --- a/storage/csv/Makefile.am +++ b/storage/csv/Makefile.am @@ -47,13 +47,17 @@ libcsv_a_LIBADD = probes_mysql.o libcsv_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = libcsv_a-ha_tina.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/example/Makefile.am b/storage/example/Makefile.am index 37bc3784ff6..6361589ef1c 100644 --- a/storage/example/Makefile.am +++ b/storage/example/Makefile.am @@ -55,13 +55,18 @@ libexample_a_DEPENDENCIES = probes_mysql.o CLEANFILES = BUILT_SOURCES = DTRACEFILES = libexample_a-ha_example.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index 3c2941263fe..daf6070533b 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -54,13 +54,18 @@ libfederated_a_LIBADD = probes_mysql.o libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = libfederated_a-ha_federated.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/heap/Makefile.am b/storage/heap/Makefile.am index d8bb1da3ecd..e4b1239fa52 100644 --- a/storage/heap/Makefile.am +++ b/storage/heap/Makefile.am @@ -56,13 +56,18 @@ libheap_a_LIBADD = probes_mysql.o libheap_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = ha_heap.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/myisam/Makefile.am b/storage/myisam/Makefile.am index 76d98fbd97b..c7593cb7fb3 100644 --- a/storage/myisam/Makefile.am +++ b/storage/myisam/Makefile.am @@ -155,13 +155,18 @@ libmyisam_a_LIBADD = probes_mysql.o libmyisam_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES += probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = ha_myisam.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif diff --git a/storage/myisammrg/Makefile.am b/storage/myisammrg/Makefile.am index b86b0aecff0..547f50c1d49 100644 --- a/storage/myisammrg/Makefile.am +++ b/storage/myisammrg/Makefile.am @@ -45,13 +45,18 @@ libmyisammrg_a_LIBADD = probes_mysql.o libmyisammrg_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers DTRACEFILES = ha_myisammrg.o -DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d +DTRACEPROVIDER = probes_mysql.d dtrace_files: echo $(DTRACEFILES) > $@ -dtrace_providers: +dtrace_providers: dtrace_sources echo $(DTRACEPROVIDER) > $@ -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) +dtrace_sources: + -$(RM) -f probes_mysql.d + $(CP) $(top_srcdir)/include/probes_mysql.d probes_mysql.d + echo timestamp > dtrace_sources + +probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ endif |