File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 11:
22# remove extra #include's
33
4- # $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.11 2006/07/11 20:12:29 momjian Exp $
4+ # $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.12 2006/07/11 20:51:25 momjian Exp $
55
66trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
77find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
3535 # preserve configure-specific includes
3636 # these includes are surrounded by #ifdef's
3737 grep -B1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
38- egrep -q '^#if|^#else' && continue
38+ egrep -q '^#if|^#else' && continue
3939 grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
40- egrep -q '^#else|^#endif' && continue
40+ egrep -q '^#else|^#endif' && continue
4141
4242 # set up initial file contents
4343 cat /tmp/$$a |
6161 -o /tmp/$$.o >/tmp/$$ 2>&1
6262 if [ "$?" -eq 0 ]
6363 then echo "$FILE $INCLUDE"
64+ if [ "$1" = "-v" ]
65+ then cat /tmp/$$
66+ cat /tmp/$$b
67+ cat /tmp/$$.c
68+ fi
6469 grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" >/tmp/$$b
6570 mv /tmp/$$b "$FILE"
71+ elif [ "$1" = "-v" ]
72+ then echo "$FILE"
6673 fi
67- if [ "$1" = "-v" ]
68- then cat /tmp/$$
69- cat /tmp/$$.c
70- fi
74+
7175 done
7276done
You can’t perform that action at this time.
0 commit comments