From ce4ff0376345c1dae710879293c5aa61d96fd446 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 23 Nov 2007 19:42:00 +0100 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ lib/autotest/general.m4 | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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" -- 2.47.2