octave-maintainers
[Top][All Lists]
Advanced

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

SED and sed vs gsed


From: Mike Miller
Subject: SED and sed vs gsed
Date: Sun, 18 Sep 2016 10:44:16 -0700
User-agent: NeoMutt/20160910 (1.7.0)

All,

I've noticed some problems with Octave's build when the sed program
found by configure is *not* GNU sed (e.g. on macOS, *BSD, or Solaris
systems). Thanks to Carlo for repeatedly pointing this out and for
setting up the buildbot process which can show this repeatably.

How portable do we care to be? Should we try to make our build work with
any sed program, or should we improve configure to look for and require
GNU sed without the user needing to set SED=gsed in the environment?

For example we use the following syntaxes in several places, all of
which are not portable to non-GNU sed:

  \+
  \?
  \|

We could replace 'a\+' with 'aa*'. We could replace 'a\?' with
'a\{0,1\}' (exact) or 'a*' (probably close enough). I'm not aware of a
basic RE equivalent for alternation 'a\|b'. This happens to be the one
of these three that we use the most (mk-builtins.sh, mk-f77-def.sh,
mk-octave-config-h.sh).

-- 
mike



reply via email to

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