summaryrefslogtreecommitdiff
path: root/gobject/abicheck.sh
blob: 7210bd6c31fb43f6d956f15914ff04e273a567bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /bin/sh

egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glib/glibconfig.h" > glibconfig.cpp

INCLUDES="-include ${top_builddir:-..}/config.h"
INCLUDES="$INCLUDES -include glibconfig.cpp"

cpp -DINCLUDE_VARIABLES -P $INCLUDES ${srcdir:-.}/gobject.symbols | sed -e '/^$/d' -e 's/ PRIVATE$//' | sort > expected-abi
rm glibconfig.cpp

nm -D -g --defined-only .libs/libgobject-2.0.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi

diff -u expected-abi actual-abi && rm expected-abi actual-abi