[src/check-cairoint.h] Test to check that all source files #include "cairoint.h"

as their first include.
This commit is contained in:
Behdad Esfahbod 2007-04-03 20:22:44 -04:00
parent 3646839060
commit ffc7d06da0
2 changed files with 18 additions and 1 deletions

View file

@ -287,5 +287,5 @@ install-data-local:
fi
TESTS_ENVIRONMENT = srcdir="$(srcdir)"
TESTS = check-def.sh check-plt.sh check-headers.sh
TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh
EXTRA_DIST += $(TESTS)

17
src/check-cairoint.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
LANG=C
test -z "$srcdir" && srcdir=.
status=0
echo Checking source files for missing or misplaced \#include cairoint.h
find "$srcdir" -name '*.c' -or -name '*.cpp' |
while read x; do
grep 'include' "$x" /dev/null | head -n 1
done |
grep -v '"cairoint.h"' |
grep . && status = 1
exit $status