5 test -z "$srcdir" && srcdir
=.
10 HEADERS
=$all_cairo_headers
11 test "x$HEADERS" = x
&& HEADERS
=`find . -name 'cairo*.h' ! -name 'cairo*-private.h' ! -name 'cairoint.h'`
13 PRIVATE
=$all_cairo_private
14 test "x$PRIVATE" = x
&& PRIVATE
=`find . -name 'cairo*-private.h' -or -name 'cairoint.h'`
16 SOURCES
=$all_cairo_sources
17 test "x$SOURCES" = x
&& SOURCES
=`find . -name 'cairo*.c' -or -name 'cairo*.cpp'`
19 ALL
="/dev/null $HEADERS $PRIVATE $SOURCES"
21 echo 'Checking that public header files #include "cairo.h" first (or none)'
24 grep '#.*\<include\>' "$x" /dev
/null |
head -n 1
26 grep -v '"cairo[.]h"' |
27 grep -v 'cairo[.]h:' |
31 echo 'Checking that private header files #include "some cairo header" first (or none)'
34 grep '#.*\<include\>' "$x" /dev
/null |
head -n 1
36 grep -v '"cairo.*[.]h"' |
37 grep -v 'cairoint[.]h:' |
41 echo 'Checking that source files #include "cairoint.h" first (or none)'
44 grep '#.*\<include\>' "$x" /dev
/null |
head -n 1
46 grep -v '"cairoint[.]h"' |
50 echo 'Checking that there is no #include <cairo.*.h>'
51 grep '#.*\<include\>.*<.*cairo' $ALL >&2 && stat
=1
54 echo 'Checking that feature conditionals are used with #if only (not #ifdef)'
55 grep '#ifdef CAIRO_HAS_' $ALL && stat
=1
56 grep '#if.*defined[ ]*(CAIRO_HAS_' $ALL && stat
=1