From: Ralf Wildenhues Date: Fri, 23 Nov 2007 18:42:00 +0000 (+0100) Subject: Fix awk script optimization. X-Git-Tag: v2.62~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce4ff0376345c1dae710879293c5aa61d96fd446;p=thirdparty%2Fautoconf.git Fix awk script optimization. * lib/autotest/general.m4 (AT_INIT): For awk line number extraction script, ensure `$at_group' has a defined value even for the empty set, and properly quote its usage inside the awk script. --- diff --git a/ChangeLog b/ChangeLog index efc33d03..d6d42ea8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-23 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): For awk line number + extraction script, ensure `$at_group' has a defined value + even for the empty set, and properly quote its usage inside + the awk script. + 2007-11-22 Ralf Wildenhues * doc/autoconf.texi (Shell Functions): New chapter. Document diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index b40db8d1..6fa3f2e4 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -873,7 +873,7 @@ else fi # Get the last needed group. -for at_group in $at_groups; do :; done +for at_group in : $at_groups; do :; done # Extract the start and end lines of each test group at the tail # of this file @@ -885,7 +885,7 @@ BEGIN { FS="" } /^@%:@AT_STOP_/ { test = substr ($ 0, 10) print "at_sed" test "=\"1," start "d;" NR "q\"" - if (test == '$at_group') exit + if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_test_source" . "$at_test_source"