summaryrefslogtreecommitdiff
path: root/clutter/abicheck.sh
blob: 16759806678c0e51f298858a0945346817018463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh

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