Commit ed94b200 authored by Mikael Ronstrom's avatar Mikael Ronstrom

A workaround to handle the problem with that

abs_top_srcdir doesn't work on some automake
platforms.

Done by copying the .d files to the build
directories.
parent 2c82616b
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA # 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_CONFIGURE = mysql_version.h
HEADERS_GEN_MAKE = my_config.h HEADERS_GEN_MAKE = my_config.h
HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \ HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
...@@ -69,11 +69,21 @@ my_config.h: config.h ...@@ -69,11 +69,21 @@ my_config.h: config.h
dist-hook: dist-hook:
$(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h $(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
if HAVE_DTRACE if HAVE_DTRACE
BUILT_SOURCES += probes_mysql_dtrace.h BUILT_SOURCES += probes_mysql_dtrace.h
CLEANFILES += 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) probes_mysql_dtrace.h: $(DTRACEPROVIDER)
$(DTRACE) $(DTRACEFLAGS) -h -s $(DTRACEPROVIDER) -o $@ $(DTRACE) $(DTRACEFLAGS) -h -s $(DTRACEPROVIDER) -o $@
endif endif
......
...@@ -131,13 +131,18 @@ libmysys_a_LIBADD += probes_mysql.o ...@@ -131,13 +131,18 @@ libmysys_a_LIBADD += probes_mysql.o
libmysys_a_DEPENDENCIES += probes_mysql.o dtrace_files dtrace_providers libmysys_a_DEPENDENCIES += probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = mf_keycache.o DTRACEFILES = mf_keycache.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ echo $(SQL_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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -212,16 +212,19 @@ libndb_la_DEPENDENCIES = dtrace_files dtrace_providers probes_libndb.o ...@@ -212,16 +212,19 @@ libndb_la_DEPENDENCIES = dtrace_files dtrace_providers probes_libndb.o
mysqld_LDADD += probes_all.o mysqld_LDADD += probes_all.o
mysqld_DEPENDENCIES += dtrace_files dtrace_providers probes_all.o mysqld_DEPENDENCIES += dtrace_files dtrace_providers probes_all.o
CLEANFILES += 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: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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@) 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 /'`; \ 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`; \ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G $$providers $$objects -o $@
......
...@@ -72,13 +72,18 @@ libarchive_a_LIBADD = probes_mysql.o ...@@ -72,13 +72,18 @@ libarchive_a_LIBADD = probes_mysql.o
libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libarchive_a-ha_archive.o DTRACEFILES = libarchive_a-ha_archive.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -54,13 +54,18 @@ libblackhole_a_LIBADD = probes_mysql.o ...@@ -54,13 +54,18 @@ libblackhole_a_LIBADD = probes_mysql.o
libblackhole_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libblackhole_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libblackhole_a-ha_blackhole.o DTRACEFILES = libblackhole_a-ha_blackhole.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -47,13 +47,17 @@ libcsv_a_LIBADD = probes_mysql.o ...@@ -47,13 +47,17 @@ libcsv_a_LIBADD = probes_mysql.o
libcsv_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libcsv_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libcsv_a-ha_tina.o 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: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ echo $(DTRACEPROVIDER) > $@
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) dtrace_sources
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -55,13 +55,18 @@ libexample_a_DEPENDENCIES = probes_mysql.o ...@@ -55,13 +55,18 @@ libexample_a_DEPENDENCIES = probes_mysql.o
CLEANFILES = CLEANFILES =
BUILT_SOURCES = BUILT_SOURCES =
DTRACEFILES = libexample_a-ha_example.o DTRACEFILES = libexample_a-ha_example.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -54,13 +54,18 @@ libfederated_a_LIBADD = probes_mysql.o ...@@ -54,13 +54,18 @@ libfederated_a_LIBADD = probes_mysql.o
libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libfederated_a-ha_federated.o DTRACEFILES = libfederated_a-ha_federated.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -56,13 +56,18 @@ libheap_a_LIBADD = probes_mysql.o ...@@ -56,13 +56,18 @@ libheap_a_LIBADD = probes_mysql.o
libheap_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libheap_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = ha_heap.o DTRACEFILES = ha_heap.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -155,13 +155,18 @@ libmyisam_a_LIBADD = probes_mysql.o ...@@ -155,13 +155,18 @@ libmyisam_a_LIBADD = probes_mysql.o
libmyisam_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libmyisam_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES += probes_mysql.o dtrace_files dtrace_providers CLEANFILES += probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = ha_myisam.o DTRACEFILES = ha_myisam.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
...@@ -45,13 +45,18 @@ libmyisammrg_a_LIBADD = probes_mysql.o ...@@ -45,13 +45,18 @@ libmyisammrg_a_LIBADD = probes_mysql.o
libmyisammrg_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers libmyisammrg_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = ha_myisammrg.o DTRACEFILES = ha_myisammrg.o
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d DTRACEPROVIDER = probes_mysql.d
dtrace_files: dtrace_files:
echo $(DTRACEFILES) > $@ echo $(DTRACEFILES) > $@
dtrace_providers: dtrace_providers: dtrace_sources
echo $(DTRACEPROVIDER) > $@ 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 $@ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment