Check for headers in builddir first, in check-*.sh

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=103346
This commit is contained in:
Behdad Esfahbod 2017-10-25 12:09:11 -04:00
parent 9ac2e5c6c0
commit 33ca3b67bf
4 changed files with 6 additions and 6 deletions

View File

@ -11,14 +11,14 @@ test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*
for x in $HBHEADERS; do
test -f $srcdir/$x && x=$srcdir/$x
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
echo "Ouch, file $x does not have HB_BEGIN_DECLS / HB_END_DECLS, but it should"
stat=1
fi
done
for x in $HBSOURCES; do
test -f $srcdir/$x && x=$srcdir/$x
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
if grep -q HB_BEGIN_DECLS "$x" || grep -q HB_END_DECLS "$x"; then
echo "Ouch, file $x has HB_BEGIN_DECLS / HB_END_DECLS, but it shouldn't"
stat=1

View File

@ -13,7 +13,7 @@ test "x$EGREP" = x && EGREP='grep -E'
echo 'Checking that all public symbols are exported with HB_EXTERN'
for x in $HBHEADERS; do
test -f "$srcdir/$x" && x="$srcdir/$x"
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
$EGREP -B1 -n '^hb_' /dev/null "$x" |
$EGREP -v '(^--|:hb_|-HB_EXTERN )' -A1
done |

View File

@ -10,7 +10,7 @@ test "x$HBHEADERS" = x && HBHEADERS=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*
test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
for x in $HBHEADERS $HBSOURCES; do
test -f "$srcdir/$x" && x="$srcdir/$x"
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
echo "$x" | grep -q '[^h]$' && continue;
xx=`echo "$x" | sed 's@.*/@@'`
tag=`echo "$xx" | tr 'a-z.-' 'A-Z_'`

View File

@ -13,7 +13,7 @@ test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb-
echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)'
for x in $HBHEADERS; do
test -f "$srcdir/$x" && x="$srcdir/$x"
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
grep '#.*\<include\>' "$x" /dev/null | head -n 1
done |
grep -v '"hb-common[.]h"' |
@ -26,7 +26,7 @@ grep . >&2 && stat=1
echo 'Checking that source files #include "hb-*private.hh" first (or none)'
for x in $HBSOURCES; do
test -f "$srcdir/$x" && x="$srcdir/$x"
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
grep '#.*\<include\>' "$x" /dev/null | grep -v 'include _' | head -n 1
done |
grep -v '"hb-.*private[.]hh"' |