From 01835c495cf601fec06891654bde0a1bb95a303f Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 11 Jul 2006 19:25:41 +0000 Subject: [PATCH] Add comments to pgrminclude. --- src/tools/pginclude/pgrminclude | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/pginclude/pgrminclude b/src/tools/pginclude/pgrminclude index 9d1ecd00d4..077a595a12 100755 --- a/src/tools/pginclude/pgrminclude +++ b/src/tools/pginclude/pgrminclude @@ -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" -- 2.40.0