1#!/bin/sh 2 3LC_ALL=C 4export LC_ALL 5 6test -z "$srcdir" && srcdir=. 7stat=0 8 9test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'` 10test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'` 11 12 13cd "$srcdir" 14 15 16echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)' 17 18for x in $HBHEADERS; do 19 grep '#.*\<include\>' "$x" /dev/null | head -n 1 20done | 21grep -v '"hb-common[.]h"' | 22grep -v '"hb[.]h"' | 23grep -v 'hb-common[.]h:' | 24grep -v 'hb[.]h:' | 25grep . >&2 && stat=1 26 27 28echo 'Checking that source files #include "hb-*private.hh" first (or none)' 29 30for x in $HBSOURCES; do 31 grep '#.*\<include\>' "$x" /dev/null | head -n 1 32done | 33grep -v '"hb-.*private[.]hh"' | 34grep -v 'hb-private[.]hh:' | 35grep . >&2 && stat=1 36 37 38echo 'Checking that there is no #include <hb.*.h>' 39grep '#.*\<include\>.*<.*hb' $HBHEADERS $HBSOURCES >&2 && stat=1 40 41 42exit $stat 43