mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-01 17:40:16 +01:00
check-headers.sh: Add a test for cairo_public decorators in public headers
Test fails currently because of bug 8313 and similar issues.
This commit is contained in:
parent
38ed0eeb5b
commit
01f10fb27a
2 changed files with 22 additions and 1 deletions
|
|
@ -281,7 +281,7 @@ install-data-local:
|
|||
false ; \
|
||||
fi
|
||||
|
||||
TESTS = check-def.sh check-plt.sh
|
||||
TESTS = check-def.sh check-plt.sh check-headers.sh
|
||||
EXTRA_DIST += $(TESTS)
|
||||
|
||||
CLEANFILES = cairo.def cairo-features.h
|
||||
|
|
|
|||
21
src/check-headers.sh
Executable file
21
src/check-headers.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
LANG=C
|
||||
|
||||
test -z "$srcdir" && srcdir=.
|
||||
status=0
|
||||
|
||||
echo Checking public headers for missing cairo_public decorators
|
||||
|
||||
find "$srcdir" -name '*.h' -not -name '*-private.h' -not -name '*-test.h' -not -name 'cairoint.h' |
|
||||
xargs grep -B 1 '^cairo_.*[ ]\+(' |
|
||||
awk '
|
||||
/^--$/ { context=""; public=0; next; }
|
||||
/:cairo_.*[ ]+\(/ { if (!public) {print context; print; print "--";} next; }
|
||||
/-cairo_public\>/ {public=1;}
|
||||
{ context=$0; }
|
||||
' |
|
||||
sed 's/[.]h-/.h:/' |
|
||||
grep . && status=1
|
||||
|
||||
exit $status
|
||||
Loading…
Add table
Reference in a new issue