globals 589 Bytes
Newer Older
Gildas Bazin's avatar
Gildas Bazin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh

if test x"$srcdir" != x""; then
    builddir="."	# running from make check, but it does not define that
else
    srcdir=`echo "$0" | sed s,[^/]*$,,`
    test "$srcdir" = "$0" && srcdir=.
    test -z "$srcdir" && srcdir=.
    builddir="$srcdir"	# running manually, have to assume
fi

srcdir=`cd $srcdir;pwd`
builddir=`cd $builddir;pwd`

15 16
bad_globals=`nm -g --defined-only $builddir/../libdca/*.o|\
    awk '{if ($3) print $3}'|grep -v '^_\?dca_'`
Gildas Bazin's avatar
Gildas Bazin committed
17 18 19 20 21 22 23 24

if test x"$bad_globals" != x""; then
    echo BAD GLOBAL SYMBOLS:
    for s in $bad_globals; do echo $s; done
    exit 1
fi

exit 0