diff --git a/clutter/Makefile.am b/clutter/Makefile.am index eb790bf76..b78b26328 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 000000000..cc9fadd46 --- /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