mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Add support for #elif to pgrminclude.
This commit is contained in:
parent
fd5b397ca4
commit
d010391ac8
@ -43,15 +43,16 @@ do
|
|||||||
# preserve configure-specific includes
|
# preserve configure-specific includes
|
||||||
# these includes are surrounded by #ifdef's
|
# these includes are surrounded by #ifdef's
|
||||||
grep -B1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
|
grep -B1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
|
||||||
egrep -q '^#if|^#else' && continue
|
egrep -q '^#if|^#else|^#elif' && continue
|
||||||
grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
|
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
|
# Remove all #if and #ifdef blocks because the blocks
|
||||||
# might contain code that is not compiled on this platform.
|
# might contain code that is not compiled on this platform.
|
||||||
cat "$FILE" |
|
cat "$FILE" |
|
||||||
grep -v "^#if" |
|
grep -v "^#if" |
|
||||||
grep -v "^#else" |
|
grep -v "^#else" |
|
||||||
|
grep -v "^#elif" |
|
||||||
grep -v "^#endif" >/tmp/$$a
|
grep -v "^#endif" >/tmp/$$a
|
||||||
|
|
||||||
# set up initial file contents
|
# set up initial file contents
|
||||||
|
Loading…
x
Reference in New Issue
Block a user