summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorNarayanan V <v.narayanan@sun.com>2008-07-10 12:42:21 +0530
committerNarayanan V <v.narayanan@sun.com>2008-07-10 12:42:21 +0530
commit475b8aad43e20fb66a2703cb0573977523923841 (patch)
tree159423c9ad9a5fb9a05d9e6dedb843e5454e5310 /Makefile.am
parent76d7670221d2d08a9ab6971058a2068a6a8ed0dc (diff)
downloadmariadb-git-475b8aad43e20fb66a2703cb0573977523923841.tar.gz
WL#4380
Modified the abi_check target to check for only mysql.h and plugin.h for now. Makefile.am: added two targets, abi_check - compiles without mysql_priv.h abi_check_all - compiles with mysql_priv.h
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am40
1 files changed, 25 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am
index c2209711879..7e98cc5c504 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -232,23 +232,28 @@ test-full-qa:
test-fast-cursor test-unit
#
-# Headers which need to be checked for abi/api compatibility
+# Headers which need to be checked for abi/api compatibility.
+# API_PREPROCESSOR_HEADER will be used until mysql_priv.h stablizes
+# after which TEST_PREPROCESSOR_HEADER will be used.
#
-PREPROCESSOR_C_HEADER=$(top_srcdir)/include/mysql/plugin.h \
- $(top_srcdir)/sql/mysql_priv.h \
- $(top_srcdir)/include/mysql.h
+API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
+ $(top_srcdir)/include/mysql.h
+
+TEST_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
+ $(top_srcdir)/sql/mysql_priv.h \
+ $(top_srcdir)/include/mysql.h
#
-# Rule for checking that the abi/api has not changed.
+# Rules for checking that the abi/api has not changed.
#
-# The following steps are followed in the rule below
+# The following steps are followed in the do_abi_check rule below
#
# 1) Generate preprocessor output for the files that need to
-# be tested for abi/api changes. use -nostdinc to prevent
-# generation of preprocessor output for system headers. This
-# results in messages in stderr saying that these headers
-# were not found. Redirect the stderr output to /dev/null
+# be tested for abi/api changes. use -nostdinc to prevent
+# generation of preprocessor output for system headers. This
+# results in messages in stderr saying that these headers
+# were not found. Redirect the stderr output to /dev/null
# to prevent seeing these messages.
# 2) sed the output to remove blank lines and lines that begin
# with # (The header information is retained to enable easy
@@ -273,9 +278,15 @@ PREPROCESSOR_C_HEADER=$(top_srcdir)/include/mysql/plugin.h \
# to replace the old canons with the new ones.
#
-abi_check: $(PREPROCESSOR_C_HEADER)
- set -ex; \
- for file in $(PREPROCESSOR_C_HEADER); do \
+abi_check: $(API_PREPROCESSOR_HEADER)
+ $(MAKE) abi_headers="$^" do_abi_check
+
+abi_check_all: $(TEST_PREPROCESSOR_HEADER)
+ $(MAKE) abi_headers="$^" do_abi_check
+
+do_abi_check:
+ set -ex; \
+ for file in $(abi_headers); do \
@CC@ -E -nostdinc -dI \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/mysql \
@@ -285,8 +296,7 @@ abi_check: $(PREPROCESSOR_C_HEADER)
-e '/^[ ]*$$/d' > $$file.out; \
@DIFF@ $$file.pp $$file.out; \
@RM@ $$file.out; \
- done
- touch $@
+ done
# Don't update the files from bitkeeper
%::SCCS/s.%