[clutter] Add abicheck.sh



commit 001e83940156d083696781cdce09a6906283f868
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Feb 9 18:42:27 2012 +0000

    Add abicheck.sh
    
    Courtesy of GLib and GTK+. The abicheck.sh is a simple, Linux-only,
    script to check that we're not leaking private symbols, or that the
    clutter.symbols file hasn't been updated.
    
    In theory, it should go inside the distcheck phase.

 clutter/Makefile.am |   18 ++++++++++++++++++
 clutter/abicheck.sh |   11 +++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index eb790bf..b78b263 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -959,6 +959,24 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
 endif # HAVE_INTROSPECTION
 
+# Test
+clutter_all_c_sources = \
+	$(backend_source_c) \
+	$(backend_source_c_priv) \
+	$(source_c) \
+	$(source_c_priv) \
+	$(deprecated_c) \
+	$(deprecated_c_priv) \
+	$(cally_sources_c) \
+	$(built_source_c)
+
+TESTS_ENVIRONMENT = srcdir="$(srcdir)" clutter_all_c_sources="$(clutter_all_c_sources)"
+if OS_LINUX
+TESTS = abicheck.sh
+endif
+
+EXTRA_DIST += abicheck.sh
+
 # GCov rules
 gcov_sources = $(source_c) $(backend_source_c)
 include $(top_srcdir)/build/autotools/Makefile.am.gcov
diff --git a/clutter/abicheck.sh b/clutter/abicheck.sh
new file mode 100755
index 0000000..cc9fadd
--- /dev/null
+++ b/clutter/abicheck.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+cpp -P \
+        -DG_OS_UNIX \
+        -DCLUTTER_WINDOWING_X11 \
+        -DCLUTTER_WINDOWING_GLX \
+        -DCLUTTER_WINDOWING_GDK \
+        ${srcdir:-.}/clutter.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' -e 's/ DATA//' | sort > expected-abi
+
+nm -D -g --defined-only .libs/libclutter-1.0.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi
+diff -u expected-abi actual-abi && rm -f expected-abi actual-abi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]