]> granicus.if.org Git - postgresql/commitdiff
Update include scripts
authorBruce Momjian <bruce@momjian.us>
Wed, 14 Jun 2000 22:28:16 +0000 (22:28 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 14 Jun 2000 22:28:16 +0000 (22:28 +0000)
src/tools/pginclude/README [new file with mode: 0644]
src/tools/pginclude/pgdefine
src/tools/pginclude/pgfixinclude
src/tools/pginclude/pginclude
src/tools/pginclude/pgrminclude [moved from src/tools/pginclude/pgnoinclude with 95% similarity]

diff --git a/src/tools/pginclude/README b/src/tools/pginclude/README
new file mode 100644 (file)
index 0000000..9ed3eba
--- /dev/null
@@ -0,0 +1,10 @@
+These utilities help clean up #include file usage:
+
+pgfixinclude   change #include's to <> or ""
+pgrminclude    remove extra #include's
+pginclude [-v] report which #include files can not compile on their own
+
+pgdefine       create macro calls for all defines in the file (used by
+               the above routines)
+
+
index 3411c35856121fbd5c73efce5e224b14d4b6eaa8..953a29684a17a36425b09ce2ebbf7df3a8c9a1a1 100755 (executable)
@@ -1,4 +1,6 @@
 :
+# create macro calls for all defines in the file
+
 trap "rm -f /tmp/$$" 0 1 2 3 15
 for FILE
 do
index 6e70ad696c6e97a4718ae0ba060a34cc428b6528..d76710a06247470a7a87756949e6b3182dcb6370 100755 (executable)
@@ -1,5 +1,5 @@
 :
-# mark includes as <> or ""
+# change #include's to <> or ""
 
 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 -print |
index b7b0449e7d085bacc6607547c15fa020bc12c0ba..4658d48b38b2972ff83538a2f5e9ce4975ccf625 100755 (executable)
@@ -1,5 +1,6 @@
 :
-# report which include files can not compile on their own
+# report which #include files can not compile on their own
+# takes -v option to display compile failure message and line numbers
 
 trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a" 0 1 2 3 15
 find . \( -name CVS -a -prune \) -o -name '*.[ch]' -type f -print | while read FILE
similarity index 95%
rename from src/tools/pginclude/pgnoinclude
rename to src/tools/pginclude/pgrminclude
index 29dc60bc2727f54f41f914152c9694f481088d65..e91997bc3f5f965adc0f6faf0417ab80ce455a6f 100755 (executable)
@@ -1,5 +1,5 @@
 :
-# report which files have extra includes
+# remove extra #include's
 
 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 -print | 
@@ -52,7 +52,7 @@ do
                                mv /tmp/$$b "$FILE"
                                # reload after #include removal
                                if [ "$IS_INCLUDE" = "Y" ]
-                               then    cat "$FILE" | grep -v "^#if" | grep -v "^#else" | 
+                               then    cat "$FILE" | grep -v "^#if" | grep -v "^#else" |
                                        grep -v "^#endif" | sed 's/->[a-zA-Z0-9_\.]*//g' >/tmp/$$a
                                else    cat "$FILE" >/tmp/$$a
                                fi