1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/bin/sh
verbose=true
if $verbose
then
REDIRECT=
else
REDIRECT=">/dev/null 2>/dev/null"
fi
CC=gcc
pkg=schroedinger-1.0
includedir=$(pkg-config --variable=includedir ${pkg})
CFLAGS="-Wall -Werror $(pkg-config --cflags ${pkg}) -DSCHRO_ENABLE_UNSTABLE_API"
headers="$(cd ${includedir} && find . -type f -name '*.h')"
fail=false
for each in $headers
do
echo -n "$each... "
echo "#include <$each>" >test.c
if ${CC} ${CFLAGS} test.c -c -o test.o ${REDIRECT}
then
echo OK
else
echo failed
fail=true
fi
done
if [ "$fail" = "true" ]
then
exit 1
fi
exit 0
|