cairo/src/check-def.sh
Carl Worth 75201c12be check-def.sh: Adjust test to exempt _cairo_test_* functions as well as _cairo_*_test_*
This test started failing with the recent renaming of the following
three functions, (before they had no cairo in their names so they
were not getting picked up at all):

_cairo_test_fallback_surface_create
_cairo_test_meta_surface_create
_cairo_test_paginated_surface_create_for_data

With this change, the failure now goes away again.
2007-03-14 15:48:15 -07:00

36 lines
710 B
Bash
Executable file

#!/bin/sh
LANG=C
if ! which nm 2>/dev/null >/dev/null; then
echo "'nm' not found; skipping test"
exit 0
fi
test -z "$srcdir" && srcdir=.
status=0
get_cairo_syms='nm "$so" | grep " T " | cut -d" " -f3'
if [ "`uname -s`" = "Linux" ]; then
get_cairo_syms='objdump -t "$so" | sed -n "/.*g *F *\.\(opd\|text\).* \(.*cairo_.*\)$/s//\2/p"'
fi
defs="cairo.def"
make $defs
for def in $defs; do
lib=${def%.def}
lib=${lib##*/}
so=.libs/lib${lib}.so
test -f $so || continue
echo Checking $def
{
echo EXPORTS
eval $get_cairo_syms | grep -v '^_cairo_.*test_\|^_fini\|^_init' | sort -u
# cheat: copy the last line from the def file!
tail -n1 $def
} | diff $def - || status=1
done
exit $status