[clutter] build: Make abicheck.sh backend-aware
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] build: Make abicheck.sh backend-aware
- Date: Thu, 23 Feb 2012 17:32:41 +0000 (UTC)
commit f27e575ad43b98f393895f419898dcced6489b37
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Feb 23 14:34:26 2012 +0000
build: Make abicheck.sh backend-aware
It should be possible to adapt the abicheck.sh script so that it
actually tests the ABI of libclutter-1.0.so taking into account
the backends that were compiled into Clutter, and avoid expected
failures if Clutter was not built with a specific backend.
https://bugzilla.gnome.org/show_bug.cgi?id=670680
clutter/Makefile.am | 2 +-
clutter/abicheck.sh | 25 +++++++++++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index 5bbb359..d9bd0a4 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -983,7 +983,7 @@ clutter_all_c_sources = \
$(cally_sources_c) \
$(built_source_c)
-TESTS_ENVIRONMENT = srcdir="$(srcdir)" clutter_all_c_sources="$(clutter_all_c_sources)"
+TESTS_ENVIRONMENT = srcdir="$(srcdir)" CLUTTER_BACKENDS="$(CLUTTER_BACKENDS)"
if OS_LINUX
TESTS = abicheck.sh
endif
diff --git a/clutter/abicheck.sh b/clutter/abicheck.sh
index cc9fadd..1675980 100755
--- a/clutter/abicheck.sh
+++ b/clutter/abicheck.sh
@@ -1,11 +1,24 @@
#! /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
+has_x11_backend=no
+has_gdk_backend=no
+for backend in ${CLUTTER_BACKENDS}; do
+ case "$backend" in
+ x11) has_x11_backend=yes ;;
+ gdk) has_gdk_backend=yes ;;
+ esac
+done
+
+cppargs="-DG_OS_UNIX"
+if [ $has_x11_backend = "yes" ]; then
+ cppargs="$cppargs -DCLUTTER_WINDOWING_X11 -DCLUTTER_WINDOWING_GLX"
+fi
+
+if [ $has_gdk_backend = "yes" ]; then
+ cppargs="$cppargs -DCLUTTER_WINDOWING_GDK"
+fi
+
+cpp -P ${cppargs} ${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]