[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken makefile given Autoconf version mismatch

From: Stepan Kasal
Subject: Re: Broken makefile given Autoconf version mismatch
Date: Sun, 16 Apr 2006 20:36:16 +0200
User-agent: Mutt/1.4.1i


On Sun, Apr 16, 2006 at 06:58:28PM +0100, Keith Marshall wrote:
> On Sunday 16 April 2006 1:41 pm, Andreas Schwab wrote:
> > Keith Marshall <address@hidden> writes:
> > > On Wednesday 12 April 2006 8:47 pm, Stepan Kasal wrote:
> > > >  We both use the same pattern
> > > >     `sed -n '/@datadir@/p;/@docdir@/p;/@infodir@/p...' ...`

first, let me correct my own posting.  My version of the patch, which
was then installed doesn't happen to contain semicolons as command
separators.  (Search for "@datadir@" in autoconf-2.59c/configure.)

Second, let me remind me that we are currently in a freeze; I believe
that this type of changes should be put off after 2.60, unless it is
supported by a real-world problem report.

> > > [...]  the use of semicolons as command separators in the sed
> > > script is an implementation dependent extension, which is not portable.

> > Is there any evidence that there exists a sed implementation that does
> > not support the semicolon as command separator?  Note that the thread
> > you quote above is _not_ about semicolons being unsupported, but rather
> > about missing ones.  Autoconf is using semicolons in sed expressions
> > already for many years (eg in the AC_OUTPUT_FILES macro).
> Let me turn that around, and ask if you can provide any documentary 
> evidence, other than anecdotal, to suggest that this use of semicolons 
> *should* be supported?  SUSv3 *expressly* demands that sed directives be 
> separated by newlines:

The link contains the following text:

| Command verbs other than {, a, b, c, i, r, t, w, :, and # can be
| followed by a semicolon, optional <blank>s, and another command verb.
| However, when the s command verb is used with the w flag, following it
| with another command in this manner produces undefined results.

which means that the above code would be portable.

But looking to the text, you can see that its distinction between
functions and commands implies that semicolons cannot be used inside
curly braces, so you have to write, for example:

sed '/datarootdir/{

IIRC, Autoconf was recently fixed to obey this rule, even though I don't
think a platform was found which wouldn't handle
        sed '/datarootdir/{;p;q;}'
So we really don't ``bury our heads in the sand'' when we notice that
we are depending on a feature which is not promised by POSIX.

(BTW, note that
sed '/datarootdir/{p
is correct according to POSIX, yet I think some implementations are not
able to parse it.)

> Oh, and yes, I do know of at least one sed implementation which 
> definitely does not support the use of semicolons as command separators; 
> however, since it is one I wrote myself, for bare standard MS-DOS, 
> running entirely in the real mode 640kB address space, it probably 
> doesn't carry much weight in this context. :-)

Is this the only missing feature for full POSIX conformance?  :-)

Have a nice day,
        Stepan Kasal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]