From: Bruce Momjian Date: Sat, 27 Aug 2011 13:24:27 +0000 (-0400) Subject: Add support for #elif to pgrminclude. X-Git-Tag: REL9_2_BETA1~1202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d010391ac8f706e17998671534ca1230f68d2f38;p=thirdparty%2Fpostgresql.git Add support for #elif to pgrminclude. --- diff --git a/src/tools/pginclude/pgrminclude b/src/tools/pginclude/pgrminclude index 64d7ef71998..26a36c9a4a0 100755 --- a/src/tools/pginclude/pgrminclude +++ b/src/tools/pginclude/pgrminclude @@ -43,15 +43,16 @@ do # preserve configure-specific includes # these includes are surrounded by #ifdef's grep -B1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" | - egrep -q '^#if|^#else' && continue + egrep -q '^#if|^#else|^#elif' && continue grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" | - egrep -q '^#else|^#endif' && continue + egrep -q '^#else|^#elif|^#endif' && continue # Remove all #if and #ifdef blocks because the blocks # might contain code that is not compiled on this platform. cat "$FILE" | grep -v "^#if" | grep -v "^#else" | + grep -v "^#elif" | grep -v "^#endif" >/tmp/$$a # set up initial file contents