summaryrefslogtreecommitdiff
path: root/include/Makefile.am
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-10-24 20:32:07 +0200
committerunknown <msvensson@neptunus.(none)>2006-10-24 20:32:07 +0200
commit9c9bf0aff21df3ec9395d124f72fc1eeb17c2c16 (patch)
treee6c62a7269e3423ff0d457cb05e1342ff86a1c8c /include/Makefile.am
parent61e3438fe26e1e3a67441a6408b6488d4a8940c5 (diff)
downloadmariadb-git-9c9bf0aff21df3ec9395d124f72fc1eeb17c2c16.tar.gz
WL#3462 Add testing of MySQL client ABI to prevent unintentional ABI breaks
BUG#23427 incompatible ABI change in 5.0.26? - Use the icheck tool if avaliable and compare the current mysql.h to a version controlled reference file BitKeeper/etc/ignore: Added include/check_abi include/mysql_h.ic to the ignore list configure.in: Look for icheck in configure include/Makefile.am: Add rule to build mysql_h.ic if icheck is avaliable Add rule to compare mysql_h.ic to the version controlled reference file mysql_h_abi.ic include/mysql.h: Add comment about taking care when editing mysql.h Add example how to add reserved fiels in the structs to allow for features to be added without breaking ABI include/mysql_h_abi.ic: Add new file describing the libmysqlclient ABI used as a reference to detect ABI breakage
Diffstat (limited to 'include/Makefile.am')
-rw-r--r--include/Makefile.am28
1 files changed, 26 insertions, 2 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 3fa7b04d69a..dc30d40a352 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 = mysql_version.h m_ctype.h my_config.h
+BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h mysql_h.ic
pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
mysql.h mysql_com.h mysqld_error.h mysql_embed.h \
my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
@@ -32,8 +32,10 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
thr_lock.h t_ctype.h violite.h md5.h \
mysql_version.h.in my_handler.h my_time.h
+CLEANFILES = mysql_h.ic
+
# mysql_version.h are generated
-SUPERCLEANFILES = mysql_version.h my_config.h
+SUPERCLEANFILES = mysql_version.h my_config.h $(CLEANFILES)
# Some include files that may be moved and patched by configure
DISTCLEANFILES = sched.h $(SUPERCLEANFILES)
@@ -55,5 +57,27 @@ link_sources:
dist-hook:
$(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h
+#
+# Rules for checking that ABI has not changed
+#
+
+# Create a icheck file for mysql.h
+mysql_h.ic: mysql.h
+ @set -x; \
+ if [ @ICHECK@ != no ] ; then \
+ @ICHECK@ --canonify -o $@ mysql.h; \
+ fi;
+
+# Compare the icheck file to the reference
+check_abi: mysql_h.ic
+ @set -x; \
+ if [ @ICHECK@ != no ] ; then \
+ @ICHECK@ --compare mysql_h.ic mysql_h_abi.ic; \
+ fi; \
+ touch check_abi;
+
+all: check_abi
+
+
# Don't update the files from bitkeeper
%::SCCS/s.%