Message ID | 20140323104629.GA18530@mail.duskware.de |
---|---|
State | New |
Headers | show |
Martin Husemann <martin@NetBSD.org> writes: > --- t-hardfp.orig 2014-02-07 08:46:34.000000000 +0100 > +++ t-hardfp 2014-03-23 11:36:12.000000000 +0100 > @@ -64,7 +64,7 @@ > # TYPE: the last floating-point mode (e.g. sf) > hardfp_defines_for = \ > $(shell echo $1 | \ > - sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') > + sed -r 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') -r changes the regexp syntax to extended, so this will no longer match. Andreas.
On Sun, Mar 23, 2014 at 11:59:39AM +0100, Andreas Schwab wrote:
> -r changes the regexp syntax to extended, so this will no longer match.
Right, it needs a few more \ removed - however, it doesn't work anyway,
as our sed does not accept empty alternatives:
(si|2|3|) fails with: RE error: empty (sub)expression
Since the script is outside posix, what is the prefered solution here?
Martin
--- t-hardfp.orig 2014-02-07 08:46:34.000000000 +0100 +++ t-hardfp 2014-03-23 11:36:12.000000000 +0100 @@ -64,7 +64,7 @@ # TYPE: the last floating-point mode (e.g. sf) hardfp_defines_for = \ $(shell echo $1 | \ - sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') + sed -r 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') hardfp-o = $(patsubst %,%$(objext),$(hardfp_func_list)) $(hardfp-o): %$(objext): $(srcdir)/config/hardfp.c