[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils 6.9.92 fail to configure on *bsd
From: |
Jim Meyering |
Subject: |
Re: coreutils 6.9.92 fail to configure on *bsd |
Date: |
Sun, 13 Jan 2008 14:57:43 +0100 |
Ralf Wildenhues <address@hidden> wrote:
> Hi Jim,
>
> Jim Meyering <jim <at> meyering.net> writes:
>> +t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/{s//\1/;s/,/ /gp
>> +}' $c`
>
> That isn't POSIX compatible yet. You need newlines right after '{'
> and you cannot use ';' inside '{...}':
>
> t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/{
> s//\1/
> s/,/ /gp
> }' $c`
Hi Ralf,
Thanks for the suggestion.
I've read the autoconf doc that suggests that, and even looked at the
POSIX spec. Even so, I considered using a ';' before the '}' rather
than the newline, since it works with all *bsd and Solaris vendor seds
that I've tried. Also, automake's lib/depcomp has a few uses of ';' as
a statement terminator inside {...}, so I'm not convinced it is
necessary to replace all semicolons with newlines.
Perhaps a better argument: gcc's Makefiles and some scripts do things
like this:
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
The problem seems to be that the POSIX description has
different requirements for "function" separators,
depending on whether the list is inside {...} or not.
So unless someone can point to a counterexample, I propose to
say something to that effect in autoconf.texi.