Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1be8f80

Browse files
committed
Improve pginclude tests.
1 parent4084681 commit1be8f80

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

‎src/tools/pginclude/pgrminclude

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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

66
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
77
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
@@ -35,9 +35,9 @@ do
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 |
@@ -61,12 +61,16 @@ do
6161
-o /tmp/$$.o >/tmp/$$ 2>&1
6262
if [ "$?" -eq 0 ]
6363
thenecho "$FILE $INCLUDE"
64+
if [ "$1" = "-v" ]
65+
thencat /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+
thenecho "$FILE"
6673
fi
67-
if [ "$1" = "-v" ]
68-
thencat /tmp/$$
69-
cat /tmp/$$.c
70-
fi
74+
7175
done
7276
done

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp