summaryrefslogtreecommitdiff
path: root/storage/blackhole
diff options
context:
space:
mode:
authorHorst.Hunger <horst.hunger@sun.com>2010-04-26 20:44:10 +0200
committerHorst.Hunger <horst.hunger@sun.com>2010-04-26 20:44:10 +0200
commitbef66c5c9ff684de26533153df8188c74dcd45b3 (patch)
tree56d14b5c0a7367d82d1026837f50fc04cacfc138 /storage/blackhole
parent42c74ad8c3ac1217b4e9b1629405e377ef89bf96 (diff)
downloadmariadb-git-bef66c5c9ff684de26533153df8188c74dcd45b3.tar.gz
backport of patch for blckhole plugin (47748) to trunk-bugfixing.
Diffstat (limited to 'storage/blackhole')
-rw-r--r--storage/blackhole/Makefile.am23
1 files changed, 19 insertions, 4 deletions
diff --git a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am
index 538dc5999f0..04ec7a64aa9 100644
--- a/storage/blackhole/Makefile.am
+++ b/storage/blackhole/Makefile.am
@@ -1,5 +1,5 @@
-# Copyright (C) 2006 MySQL AB
-#
+# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc.
+# All rights reserved.
# 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; version 2 of the License.
@@ -50,11 +50,22 @@ libblackhole_a_SOURCES= ha_blackhole.cc
EXTRA_DIST = CMakeLists.txt plug.in
if HAVE_DTRACE_DASH_G
+# The object for static and dynamic linking of blackhole differ
+# For static linkage of blackhole to mysqld
+
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
+# For blackhole as shared library
+ha_blackhole_la_LIBADD = probes_sh_mysql.o
+# Hack: We "depend" on ".libs/" but have no rule for it,
+# but it is created as a byproduct of the ".lo"
+DTRACESHAREDDEPS = ha_blackhole_la-ha_blackhole.lo
+DTRACESHAREDFILES = ha_blackhole_la-ha_blackhole.o
DTRACEPROVIDER = probes_mysql.d
+ha_blackhole_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers
+
+CLEANFILES = $(DTRACEPROVIDERS) dtrace_files dtrace_providers $(DTRACESHAREDDEPS)
+DTRACEFILES = libblackhole_a-ha_blackhole.o
dtrace_files:
echo $(DTRACEFILES) > $@
@@ -65,8 +76,12 @@ probes_mysql.d:
$(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d
echo timestamp > dtrace_sources
+probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS)
+ $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@
+ $(CP) $(DTRACESHAREDFILES) .libs
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
+
endif
# Don't update the files from bitkeeper