|
4 | 4 | # src/tools/pginclude/pgcompinclude
|
5 | 5 |
|
6 | 6 | trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a" 0 1 2 3 15
|
7 |
| -find . \( -nameCVS -a -prune \) -o -name '*.h' -type f -print | while read FILE |
| 7 | +find . \( -name.git -a -prune \) -o -name '*.h' -type f -print | while read FILE |
8 | 8 | do
|
9 | 9 | sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a
|
10 | 10 | echo "#include \"postgres.h\"" >/tmp/$$.c
|
|
13 | 13 | echo "void include_test() {" >>/tmp/$$.c
|
14 | 14 | pgdefine "$FILE" >>/tmp/$$.c
|
15 | 15 | echo "}" >>/tmp/$$.c
|
| 16 | +# Use -O1 to get warnings only generated by optimization, |
| 17 | +# but -O2 is too slow. |
16 | 18 | cc -fsyntax-only -Werror -Wall -Wmissing-prototypes \
|
17 | 19 | -Wmissing-declarations -I/pg/include -I/pg/backend \
|
18 |
| --I/pg/interfaces/libpq -I`dirname $FILE` $CFLAGS -c /tmp/$$.c \ |
| 20 | +-I/pg/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \ |
19 | 21 | -o /tmp/$$.o >/tmp/$$ 2>&1
|
20 | 22 | if [ "$?" -ne 0 ]
|
21 | 23 | thenecho "$FILE"
|
|