Imported Upstream version 2.6.4
[platform/upstream/harfbuzz.git] / src / check-externs.sh
1 #!/bin/sh
2
3 LC_ALL=C
4 export LC_ALL
5
6 test -z "$srcdir" && srcdir=.
7 stat=0
8
9 test "x$HBHEADERS" = x && HBHEADERS=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*.h'`
10 test "x$EGREP" = x && EGREP='grep -E'
11
12
13 echo 'Checking that all public symbols are exported with HB_EXTERN'
14
15 for x in $HBHEADERS; do
16         test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
17         $EGREP -B1 -n '^hb_' /dev/null "$x" |
18         $EGREP -v '(^--|:hb_|-HB_EXTERN )' -A1
19 done |
20 grep . >&2 && stat=1
21
22 exit $stat