]> granicus.if.org Git - postgresql/commitdiff
Add comments to pgrminclude.
authorBruce Momjian <bruce@momjian.us>
Tue, 11 Jul 2006 19:25:41 +0000 (19:25 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 11 Jul 2006 19:25:41 +0000 (19:25 +0000)
src/tools/pginclude/pgrminclude

index 9d1ecd00d4ec4ab0df96fb5b138861c3a9cb7f23..077a595a120ac5dac4d66c4d98f96ec8c46882ee 100755 (executable)
@@ -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"