mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Add comments to pgrminclude.
This commit is contained in:
parent
2fa7a041f3
commit
01835c495c
@ -1,7 +1,7 @@
|
||||
:
|
||||
# remove extra #include's
|
||||
|
||||
# $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.5 2006/07/10 16:45:44 momjian Exp $
|
||||
# $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.6 2006/07/11 19:25:41 momjian Exp $
|
||||
|
||||
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
|
||||
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
|
||||
@ -39,12 +39,14 @@ do
|
||||
grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
|
||||
egrep -q '^#else|^#endif' && continue
|
||||
|
||||
# set up initial file contents
|
||||
cat /tmp/$$a |
|
||||
grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b
|
||||
if [ "$IS_INCLUDE" = "Y" ]
|
||||
then echo "#include \"postgres.h\"" >/tmp/$$.c
|
||||
else >/tmp/$$.c
|
||||
fi
|
||||
|
||||
echo "#include \"/tmp/$$b\"" >>/tmp/$$.c
|
||||
echo "void include_test(void);" >>/tmp/$$.c
|
||||
echo "void include_test() {" >>/tmp/$$.c
|
||||
@ -52,6 +54,7 @@ do
|
||||
then pgdefine "$FILE" >>/tmp/$$.c
|
||||
fi
|
||||
echo "}" >>/tmp/$$.c
|
||||
|
||||
cc -fsyntax-only -Werror -Wall -Wmissing-prototypes -Wmissing-declarations -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1
|
||||
if [ "$?" -eq 0 ]
|
||||
then echo "$FILE $INCLUDE"
|
||||
|
Loading…
Reference in New Issue
Block a user