mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-10 12:50:19 +01:00
[pixman/src/check-config.sh] Test that all source files #include <config.h>
as their first include.
This commit is contained in:
parent
8fbf50d31d
commit
a1287e483c
3 changed files with 21 additions and 1 deletions
|
|
@ -38,3 +38,6 @@ libpixman_mmx_la_SOURCES = \
|
|||
libpixman_mmx_la_CFLAGS = $(PIXMAN_CFLAGS)
|
||||
libpixman_la_LIBADD = libpixman-mmx.la
|
||||
endif
|
||||
|
||||
TESTS = check-config.sh
|
||||
EXTRA_DIST = $(TESTS)
|
||||
|
|
|
|||
17
pixman/src/check-config.sh
Executable file
17
pixman/src/check-config.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
LANG=C
|
||||
|
||||
test -z "$srcdir" && srcdir=.
|
||||
status=0
|
||||
|
||||
echo 'Checking source files for missing or misplaced #include <config.h>'
|
||||
|
||||
find "$srcdir" -name '*.c' -or -name '*.cpp' |
|
||||
while read x; do
|
||||
grep '\<include\>' "$x" /dev/null | head -n 1
|
||||
done |
|
||||
grep -v '<config.h>' |
|
||||
grep . && status = 1
|
||||
|
||||
exit $status
|
||||
|
|
@ -9,7 +9,7 @@ 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
|
||||
grep '\<include\>' "$x" /dev/null | head -n 1
|
||||
done |
|
||||
grep -v '"cairoint.h"' |
|
||||
grep . && status = 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue