2006-09-18 13:28:29 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2009-09-16 15:46:14 -04:00
|
|
|
LC_ALL=C
|
|
|
|
|
export LC_ALL
|
2006-09-18 13:28:29 -04:00
|
|
|
|
|
|
|
|
test -z "$srcdir" && srcdir=.
|
2008-06-12 21:03:19 -04:00
|
|
|
stat=0
|
2006-09-18 13:28:29 -04:00
|
|
|
|
|
|
|
|
echo Checking public headers for missing cairo_public decorators
|
|
|
|
|
|
2008-09-18 15:56:53 -04:00
|
|
|
cd "$srcdir"
|
|
|
|
|
FILES=$all_cairo_headers
|
|
|
|
|
if test "x$FILES" = x; then
|
2021-04-17 23:53:52 +01:00
|
|
|
FILES=`find . -name 'cairo*.h' ! -name '*-private.h' ! -name 'cairoint.h' ! -name '*-inline.h'`
|
2008-09-18 15:56:53 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
grep -B 1 '^cairo_.*[ ]\+(' /dev/null $FILES |
|
2006-09-18 13:28:29 -04:00
|
|
|
awk '
|
|
|
|
|
/^--$/ { context=""; public=0; next; }
|
|
|
|
|
/:cairo_.*[ ]+\(/ { if (!public) {print context; print; print "--";} next; }
|
2007-04-08 20:50:08 +01:00
|
|
|
/-cairo_public.*[ ]/ {public=1;}
|
2006-09-18 13:28:29 -04:00
|
|
|
{ context=$0; }
|
|
|
|
|
' |
|
|
|
|
|
sed 's/[.]h-/.h:/' |
|
2008-09-26 11:08:22 -04:00
|
|
|
grep . >&2 && stat=1
|
2006-09-18 13:28:29 -04:00
|
|
|
|
2008-06-12 21:03:19 -04:00
|
|
|
exit $stat
|