From: David MacKenzie Date: Tue, 16 Jan 1996 04:45:37 +0000 (+0000) Subject: ignore undefined macros in shell comments X-Git-Tag: fsf-origin~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dd85be62805bf80525f74b4b5de36b68b38f11b;p=thirdparty%2Fautoconf.git ignore undefined macros in shell comments --- diff --git a/ChangeLog b/ChangeLog index 200c1d31e..d26f77191 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,10 @@ Fri Jan 5 17:50:28 1996 Roland McGrath 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 + + * autoconf.sh: Ignore undefined macros in shell comments. + Mon Dec 11 22:12:54 1995 Roland McGrath * acspecific.m4 (AC_PROG_CC_C_O): Rearrange logic to get the right diff --git a/autoconf.in b/autoconf.in index b7c32ba89..41a182cb7 100644 --- a/autoconf.in +++ b/autoconf.in @@ -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 diff --git a/autoconf.sh b/autoconf.sh index b7c32ba89..41a182cb7 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -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 diff --git a/bin/autoconf.in b/bin/autoconf.in index b7c32ba89..41a182cb7 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -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