6 test -z "$srcdir" && srcdir
=.
11 HEADERS
=$all_cairo_headers
12 test "x$HEADERS" = x
&& HEADERS
=`find . -name 'cairo*.h' ! -name 'cairo*-private.h' ! -name 'cairo*-inline.h' ! -name 'cairoint.h'`
14 PRIVATE
=$all_cairo_private
15 test "x$PRIVATE" = x
&& PRIVATE
=`find . -name 'cairo*-private.h' -or -name 'cairo*-inline.h' -or -name 'cairoint.h'`
17 SOURCES
=$all_cairo_sources
18 test "x$SOURCES" = x
&& SOURCES
=`find . -name 'cairo*.c' -or -name 'cairo*.cpp'`
20 ALL
="/dev/null $HEADERS $PRIVATE $SOURCES"
22 echo 'Checking that public header files #include "cairo.h" first (or none)'
25 grep '#.*\<include\>' "$x" /dev
/null |
head -n 1
27 grep -v '"cairo[.]h"' |
28 grep -v 'cairo[.]h:' |
32 echo 'Checking that private header files #include "some cairo header" first (or none)'
35 grep '#.*\<include\>' "$x" /dev
/null |
head -n 1
37 grep -v '"cairo.*[.]h"' |
38 grep -v 'cairoint[.]h:' |
42 echo 'Checking that source files #include "cairoint.h" first (or none)'
45 grep '#.*\<include\>' "$x" /dev
/null |
head -n 1
47 grep -v '"cairoint[.]h"' |
51 echo 'Checking that there is no #include <cairo.*.h>'
52 grep '#.*\<include\>.*<.*cairo' $ALL >&2 && stat
=1
55 echo 'Checking that feature conditionals are used with #if only (not #ifdef)'
56 grep '#ifdef CAIRO_HAS_' $ALL && stat
=1
57 grep '#if.*defined[ ]*(CAIRO_HAS_' $ALL && stat
=1