]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
ignore undefined macros in shell comments
authorDavid MacKenzie <djm@djmnet.org>
Tue, 16 Jan 1996 04:45:37 +0000 (04:45 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Tue, 16 Jan 1996 04:45:37 +0000 (04:45 +0000)
ChangeLog
autoconf.in
autoconf.sh
bin/autoconf.in

index 200c1d31e640ee98bb66d881a49b4f2220911c5f..d26f77191620aaef8c4630a76a017b5e8e87fe57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,10 @@ Fri Jan  5 17:50:28 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
        grep $name in $infile misses, give error message that there must
        be an Autoconf bug.
 
+Tue Dec 19 10:49:20 1995  David J. MacKenzie  <djm@catapult.va.pubnix.com>
+
+       * autoconf.sh: Ignore undefined macros in shell comments.
+
 Mon Dec 11 22:12:54 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
        * acspecific.m4 (AC_PROG_CC_C_O): Rearrange logic to get the right
index b7c32ba89d4664dbff8e2865496f50bc532e88c2..41a182cb70fdb332494336ca33687e50c5ba9a94 100644 (file)
@@ -126,12 +126,12 @@ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
 pattern="AC_"
 
 status=0
-if grep "${pattern}" $tmpout > /dev/null 2>&1; then
+if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
   echo "autoconf: Undefined macros:" >&2
-  grep "${pattern}" $tmpout | sed "s/.*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/" |
-    while read name; do
-      grep -n $name $infile /dev/null
-      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $name"
+  sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
+    while read macro; do
+      grep -n "^[^#]*$macro" $infile /dev/null
+      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
     done | sort -u >&2
   status=1
 fi
@@ -147,7 +147,7 @@ $AWK '
 /__oline__/ { printf "%d:", NR + 1 }
            { print }
 ' $tmpout | sed '
-/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__\(.*\)$/\2\1\3/
+/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
 ' >&4
 
 rm -f $tmpout
index b7c32ba89d4664dbff8e2865496f50bc532e88c2..41a182cb70fdb332494336ca33687e50c5ba9a94 100644 (file)
@@ -126,12 +126,12 @@ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
 pattern="AC_"
 
 status=0
-if grep "${pattern}" $tmpout > /dev/null 2>&1; then
+if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
   echo "autoconf: Undefined macros:" >&2
-  grep "${pattern}" $tmpout | sed "s/.*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/" |
-    while read name; do
-      grep -n $name $infile /dev/null
-      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $name"
+  sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
+    while read macro; do
+      grep -n "^[^#]*$macro" $infile /dev/null
+      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
     done | sort -u >&2
   status=1
 fi
@@ -147,7 +147,7 @@ $AWK '
 /__oline__/ { printf "%d:", NR + 1 }
            { print }
 ' $tmpout | sed '
-/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__\(.*\)$/\2\1\3/
+/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
 ' >&4
 
 rm -f $tmpout
index b7c32ba89d4664dbff8e2865496f50bc532e88c2..41a182cb70fdb332494336ca33687e50c5ba9a94 100644 (file)
@@ -126,12 +126,12 @@ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
 pattern="AC_"
 
 status=0
-if grep "${pattern}" $tmpout > /dev/null 2>&1; then
+if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
   echo "autoconf: Undefined macros:" >&2
-  grep "${pattern}" $tmpout | sed "s/.*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/" |
-    while read name; do
-      grep -n $name $infile /dev/null
-      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $name"
+  sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
+    while read macro; do
+      grep -n "^[^#]*$macro" $infile /dev/null
+      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
     done | sort -u >&2
   status=1
 fi
@@ -147,7 +147,7 @@ $AWK '
 /__oline__/ { printf "%d:", NR + 1 }
            { print }
 ' $tmpout | sed '
-/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__\(.*\)$/\2\1\3/
+/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
 ' >&4
 
 rm -f $tmpout