Andreas Schwab <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: >> $ busybox sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])/{s//\1/;s/,/ /gp >> }' configure.ac >> sed: No previous regexp. >> [Exit 1] > >>From (autoconf)Limitations of Usual Tools:: > Commands inside { } brackets are further restricted. Posix says > that they cannot be preceded by addresses, `!', or `;', and that > each command must be followed immediately by a newline, without any > intervening blanks or semicolons. The closing bracket must be > alone on a line, other than white space preceding or following it.
Hi Andreas, Yes, I recall the above from earlier problems with this part of configure.ac. However, you seem to have left out an explanation of how that quote is relevant to this problem with busybox's sed. This appears to be a busybox "limitation". I expect to work around it with this patch: portability: work around a "busybox sed" limitation * configure.ac: While every other sed tested supports usage like '/\(re\)/{s//\1/;...<NEWLINE>}', and POSIX appears to requires this, busybox's sed does not support it. So duplicate the regexp: '/\(re\)/{s/\(re\)/\1/;...<NEWLINE>}'. Reported by Vincent Lefevre: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13013>. Signed-off-by: Jim Meyering <[EMAIL PROTECTED]> --- configure.ac | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index cc4e152..14505fc 100644 --- a/configure.ac +++ b/configure.ac @@ -280,7 +280,8 @@ no_install_progs_default=`echo "$t"|sed 's/ $//'` # The compromise is to ensure that the space-separated list extracted # above matches the literal 2nd argument below. c="$srcdir/configure.ac" -t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/{s//\1/;s/,/ /gp +re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])' +t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp }' $c` case $t in $no_install_progs_default) ;; -- 1.5.5.rc0.21.g740fd _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils