| On Mar 10, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
| > and it turns out that his sed (the very same bloody sed which makes
| > writing config.status a real challenge) doesn't seem to support the
| > alternation at all
|
| Yup, that's right. Alternation is not portable for sed.
|
| > Of course too, we can factor everything into a single egrep pattern,
| > but this is soooo maintainer unfriendly! I'd like to keep a readable
| > pattern, not a big monster.
|
| How about writing a shell snippet in configure.in that outputs the
| egrep regexp?
|
| expr="_AC_|^AC_TRY"
| for e in \
| ARG_VAR \
| CHECK_"(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?" \
| ...
| do
| expr="$expr|^AC_$e\$"
| done
Indeed, but I bet anchors cannot portably be embedded in
alternations. We've already suffered from this in
1999-09-01 Akim Demaille <[EMAIL PROTECTED]>
* acgeneral.m4: Fixed the regular expressions: `$' shall not be
portably in a sed \(\) group.
Akim