summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2011-09-25 20:57:31 +0000
committerBruce Momjian2011-09-25 20:58:16 +0000
commit2594ad74360c647edfd0645c4097d78ff83b4c3b (patch)
tree61948f9a385e5519965a4cbfb0e1d56a8b66aa03
parent23fe7a74777eba01835389263418cbe8a546e772 (diff)
In pgrminclude, document requirement to use pgcompinclude, and sort
files so include removal is more predictable.
-rwxr-xr-xsrc/tools/pginclude/pgrminclude9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/pginclude/pgrminclude b/src/tools/pginclude/pgrminclude
index 61b7af22cf..93a535c906 100755
--- a/src/tools/pginclude/pgrminclude
+++ b/src/tools/pginclude/pgrminclude
@@ -1,6 +1,11 @@
:
# remove extra #include's
+# pgcompinclude must be run before and after pgrminclude. It must be
+# run before because we don't want include dependencies to leak into
+# the C program files, and after because removal of includes from headers
+# can cause new include unfulfilled dependencies.
+#
# Limitations: 2011-09-24
#
# Pgrminclude, when processing header files, can cause includes to be
@@ -115,8 +120,8 @@ compile_file() {
# Process include files first because they can affect the compilation
# of *.c files.
-(find . \( -name .git -a -prune \) -o -type f -name '*.h' -print;
- find . \( -name .git -a -prune \) -o -type f -name '*.c' -print ) |
+(find . \( -name .git -a -prune \) -o -type f -name '*.h' -print | sort;
+ find . \( -name .git -a -prune \) -o -type f -name '*.c' -print | sort) |
grep -v '/postgres.h$' |
grep -v '/postgres_fe.h$' |
grep -v '/pg_config.h$' |