libtool
[Top][All Lists]
Advanced

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

Re: _LT_AC_TAGCONFIG versus Cray sed


From: Akim Demaille
Subject: Re: _LT_AC_TAGCONFIG versus Cray sed
Date: 05 Oct 2001 10:05:37 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

>>>>> "Kevin" == Kevin Ryde <address@hidden> writes:

Kevin> On an sv1-cray-unicos10.0.0.X with the cvs libtool I noticed
Kevin> the following error,

Kevin>         configure: creating libtool sed: 1:
Kevin> "s/[-_ABCDEFGHIJKLMNOPQR ...": RE error: [ ] imbalance or
Kevin> syntax error appending configuration tag "CXX" to libtool

Kevin> which I think might be from _LT_AC_TAGCONFIG,

Kevin>         case `$echo "X$tagname" | $Xsed -e
Kevin> 
's/[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]//g'`
Kevin> in

Kevin> There was a discussion not so long ago about using "/" in a
Kevin> character range when it's also the delimiter, but I forget what
Kevin> the theory was.

Cf. Autoconf's documentation.


`sed'
     Patterns should not include the separator (unless escaped), even
     as part of a character class.  In conformance with POSIX, the Cray
     `sed' will reject `s/[^/]*$//': use `s,[^/]*$,,'.

     Sed scripts should not use branch labels longer than 8 characters
     and should not contain comments.

     Don't include extra `;', as some `sed', such as NetBSD 1.4.2's,
     try to interpret the second as a command:

          $ echo a | sed 's/x/x/;;s/x/x/'
          sed: 1: "s/x/x/;;s/x/x/": invalid command code ;

     Input should have reasonably long lines, since some `sed' have an
     input buffer limited to 4000 bytes.

     Alternation, `\|', is common but POSIX.2 does not require its
     support, so it should be avoided in portable scripts.  Solaris 8
     `sed' does not support alternation; e.g. `sed '/a\|b/d'' deletes
     only lines that contain the literal string `a|b'.

     Anchors (`^' and `$') inside groups are not portable.

     Nested parenthesization in patterns (e.g., `\(\(a*\)b*)\)') is
     quite portable to modern hosts, but is not supported by some older
     `sed' implementations like SVR3.

     Of course the option `-e' is portable, but it is not needed.  No
     valid Sed program can start with a dash, so it does not help
     disambiguating.  Its sole usefulness is helping enforcing
     indenting as in:

          sed -e INSTRUCTION-1 \
              -e INSTRUCTION-2

     as opposed to

          sed INSTRUCTION-1;INSTRUCTION-2

     Contrary to yet another urban legend, you may portably use `&' in
     the replacement part of the `s' command to mean "what was
     matched".  All descendents of Bell Lab's V7 `sed' (at least; we
     don't have first hand experience with older `sed's) have supported



reply via email to

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