[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed vs. gsed
From: |
Mike Miller |
Subject: |
Re: sed vs. gsed |
Date: |
Mon, 19 Sep 2016 11:45:02 -0700 |
User-agent: |
NeoMutt/20160910 (1.7.0) |
On Mon, Sep 19, 2016 at 20:34:55 +0200, c. wrote:
>
> On 19 Sep 2016, at 20:13, Sebastian Schöps <address@hidden> wrote:
>
> > Rik-4 wrote
> >> But I realize that might be too big a change. If we stay with the current
> >> system, then why not just require the GNU variants of sed and awk? We
> >> already require GNU Make, for example. Basically, there's a lot of
> >> scripts
> >> that I don't feel like re-writing to remove the use of GNU regexp. Not
> >> only would this take time away from more useful Octave tasks (since our
> >> volunteer time is finite), but it would also potentially introduce new
> >> bugs
> >> in the build system which would then need to be debugged, taking yet more
> >> developer time.
> >
> > I agree but then configure should properly detect gawk and gsed and complain
> > if they were not found. Furthermore, it should be made sure that octave is
> > actually using the detected binaries, i.e., not some sed or awk that happens
> > to be in the path :)
> >
> > I think I proposed this in some of the threads on "odepkg on Mac" where I
> > came across the gawk problem (which throws at least an error message during
> > configure).
> >
> > Bye
> > Sebastian
>
> Yes,
>
> I agree with Sebastian, it is not such a big hassle to require gsed+gawk,
> what causes a big deal of problems is that there is no check in configure to
> make sure the detected sed+awk have the required features.
>
> So we should decide whether any sed or gawk will do or, if we require a
> specific
> version, we should check that version is actually available.
I'm good with that.
I would suggest (and may start working on) a test for specific features,
rather than a --version string, for example
if test "$(echo one | $SED -e 's/\(one\|two\)/zero/')" != zero; then
AC_MSG_ERROR(Octave can't build with this sed program, try using GNU sed)
fi
The interesting / surprising thing about autoconf is that it prefers
"gawk" to other awk possibilities, but it looks for "sed" before "gsed".
I'll see if I can figure out how to override or supersede that builtin
logic. Otherwise, non-GNU users will always have to set SED=gsed when
building, which I don't like.
--
mike