aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-08-26 10:06:01 -0400
committerBruce Momjian <bruce@momjian.us>2011-08-26 10:06:01 -0400
commit4399e817492222623c5e7541ca8488ae460c2d54 (patch)
tree25d31ff5089cf2e2b9c1f9f0f54bf5d0d19a7388
parenteb013ede590dc62ca5b52144ff41e7fd6e4c2251 (diff)
downloadpostgresql-4399e817492222623c5e7541ca8488ae460c2d54.tar.gz
postgresql-4399e817492222623c5e7541ca8488ae460c2d54.zip
In pgrminclude, make skipped include names constent and skip files with
#if/#ifdefs.
-rwxr-xr-xsrc/tools/pginclude/pgrminclude7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/pginclude/pgrminclude b/src/tools/pginclude/pgrminclude
index a8ec10a486a..afbbd7f4ccf 100755
--- a/src/tools/pginclude/pgrminclude
+++ b/src/tools/pginclude/pgrminclude
@@ -6,10 +6,15 @@
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 |
grep -v '\./postgres.h' |
+grep -v '\./postgres_fe.h' |
grep -v '\./pg_config.h' |
grep -v '\./c.h' |
while read FILE
do
+ # Skip files with #if and #ifdef blocks because the blocks
+ # might contain code that is not compiled on this platform.
+ grep -q '^if' "$FILE" && continue
+
if [ `expr $FILE : '.*\.h$'` -ne 0 ]
then IS_INCLUDE="Y"
else IS_INCLUDE="N"
@@ -27,7 +32,7 @@ do
[ -s /usr/include/$INCLUDE ] && continue
[ "$INCLUDE" = postgres.h ] && continue
[ "$INCLUDE" = postgres_fe.h ] && continue
- [ "$INCLUDE" = config.h ] && continue
+ [ "$INCLUDE" = pg_config.h ] && continue
[ "$INCLUDE" = c.h ] && continue
# preserve configure-specific includes