2
# report which #include files can not compile on their own
3
# takes -v option to display compile failure message and line numbers
5
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a" 0 1 2 3 15
6
find . \( -name CVS -a -prune \) -o -name '*.[ch]' -type f -print | while read FILE
8
sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a
9
echo "#include \"postgres.h\"" >/tmp/$$.c
10
echo "#include \"/tmp/$$a\"" >>/tmp/$$.c
11
echo "void include_test(void);" >>/tmp/$$.c
12
echo "void include_test() {" >>/tmp/$$.c
13
pgdefine "$FILE" >>/tmp/$$.c
15
cc -fsyntax-only -Werror -Wall -Wmissing-prototypes -Wmissing-declarations -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1