do include files first
authorBruce Momjian <bruce@momjian.us>
Fri, 26 Aug 2011 20:10:34 +0000 (16:10 -0400)
committerBruce Momjian <bruce@momjian.us>
Fri, 26 Aug 2011 22:15:14 +0000 (18:15 -0400)
src/tools/pginclude/pgrminclude

index 0f0e10b899820be4d9d5fa1f0e0e680055fc71b7..26f5f89b19edf5c7b18faf7616189319694d3488 100755 (executable)
@@ -1,10 +1,14 @@
 :
 # remove extra #include's
 
+pgdefine || (echo "pgdefine must be in your PATH" 1>&2; exit 1)
+
 # src/tools/pginclude/pgrminclude
 
 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 |
+# do include files first
+(find . \( -name .git -a -prune \) -o -type f -name '*.h' -print;
+ find . \( -name .git -a -prune \) -o -type f -name '*.c' -print ) |
 grep -v '\./postgres.h' |
 grep -v '\./postgres_fe.h' |
 grep -v '\./pg_config.h' |