check-c-linkage-decls.sh \
check-header-guards.sh \
check-internal-symbols.sh \
+ check-includes.sh \
$(NULL)
if HAVE_ICU
endif
TESTS = $(dist_check_SCRIPTS)
+TESTS_ENVIRONMENT = \
+ srcdir="$(srcdir)" \
+ MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
+ HBSOURCES="$(HBSOURCES)" \
+ HBHEADERS="$(HBHEADERS)" \
+ $(NULL)
-include $(top_srcdir)/git.mk
test -z "$srcdir" && srcdir=.
stat=0
+test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
+test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
+
+
cd "$srcdir"
-for x in hb-*.cc hb-*.h hb-*.hh ; do
+for x in $HBHEADERS $HBSOURCES; do
if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
echo "Ouch, file $x does not HB_BEGIN_DECLS / HB_END_DECLS"
stat=1
test -z "$srcdir" && srcdir=.
stat=0
+test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
+test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
+
+
cd "$srcdir"
-for x in hb-*.h hb-*.hh ; do
+for x in $HBHEADERS $HBSOURCES; do
+ echo "$x" | grep '[^h]$' -q && continue;
+ x=`echo "$x" | sed 's@.*/@@'`
tag=`echo "$x" | tr 'a-z.-' 'A-Z_'`
lines=`grep "\<$tag\>" "$x" | wc -l`
if test "x$lines" != x3; then
--- /dev/null
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
+test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
+
+
+cd "$srcdir"
+
+
+echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)'
+
+for x in $HBHEADERS; do
+ grep '#.*\<include\>' "$x" /dev/null | head -n 1
+done |
+grep -v '"hb-common[.]h"' |
+grep -v '"hb[.]h"' |
+grep -v 'hb-common[.]h:' |
+grep -v 'hb[.]h:' |
+grep . >&2 && stat=1
+
+
+echo 'Checking that source files #include "hb-*private.hh" first (or none)'
+
+for x in $HBSOURCES; do
+ grep '#.*\<include\>' "$x" /dev/null | head -n 1
+done |
+grep -v '"hb-.*private[.]hh"' |
+grep -v 'hb-private[.]hh:' |
+grep . >&2 && stat=1
+
+
+echo 'Checking that there is no #include <hb.*.h>'
+grep '#.*\<include\>.*<.*hb' $HBHEADERS $HBSOURCES >&2 && stat=1
+
+
+exit $stat
LC_ALL=C
export LC_ALL
+test -z "$srcdir" && srcdir=.
+stat=0
+
+
if which nm 2>/dev/null >/dev/null; then
:
else
exit 0
fi
-test -z "$srcdir" && srcdir=.
-test -z "$MAKE" && MAKE=make
-stat=0
-
so=.libs/libharfbuzz.so
if test -f "$so"; then
echo "Checking that we are exposing internal symbols"
LC_ALL=C
export LC_ALL
+test -z "$srcdir" && srcdir=.
+stat=0
+
+
if which ldd 2>/dev/null >/dev/null; then
:
else
exit 0
fi
-test -z "$srcdir" && srcdir=.
-stat=0
-
so=.libs/libharfbuzz.so
if test -f "$so"; then
echo "Checking that we are not linking to libstdc++"
#ifndef HB_OT_SHAPE_H
#define HB_OT_SHAPE_H
+#include "hb-common.h"
#include "hb-shape.h"