[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gl_ABSOLUTE_HEADER_ONE and older seds
From: |
Daniel Richard G. |
Subject: |
Re: gl_ABSOLUTE_HEADER_ONE and older seds |
Date: |
Thu, 13 Oct 2011 18:36:27 -0400 |
On Thu, 2011 Oct 13 23:25+0200, Bruno Haible wrote:
>
> Gnulib attempts to target computer systems from this era, see
> <https://www.gnu.org/software/gnulib/manual/html_node/Target-Platforms.html>
> . NeXTstep had its highlight time from 1992 to 1995; that is way too
> old for gnulib to support.
"Niche operating systems are generally unsupported by Gnulib, unless
some of their developers or users contribute support to Gnulib."
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index b7276a3..baabb87 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -81,7 +81,10 @@ changequote(,)
gl_dirsep_regex='/'
;;
esac
- gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'$1|{
+ dnl Older seds don't support '\#blah#{...}'
+ gl_absolute_header_sed='s,\([/.]\),\\\1,g'
+ gl_absolute_header_match=`echo "${gl_dirsep_regex}"'$1' | sed
"$gl_absolute_header_sed"`
+ gl_absolute_header_sed="/${gl_absolute_header_match}/"'{
s|.*"\(.*'"${gl_dirsep_regex}"'$1\)".*|\1|
s|^/[^/]|//&|
p
It's a fairly small and straightforward patch, and even adds escaping of
the "." character in header filenames for free. I'd have expected
pushback if major changes were needed, but this?
> And the workaround for you is simple: Just install a version of GNU
> sed 3.02 in your PATH, and you'll be done.
Unfortunately, this isn't enough. The configure script does not search
for a conforming sed, and setting SED has no effect because "sed" is
invoked literally. I have to install the newer sed, and put its location
at the head of PATH for it to be used instead of the old one. (Doing
this with /usr/local/bin causes other breakage that I have yet to
investigate.)
> Your patch replaces 1 line of code with 4 lines of code and is the
> kind of complexity we want to avoid if we can.
Gnulib and Autoconf are already rife with checks and workarounds for
broken system environments; dealing with this sort of complexity is the
whole point of the exercise.
--Daniel
--
Daniel Richard G. || address@hidden
My ASCII-art .sig got a bad case of Times New Roman.
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Bruno Haible, 2011/10/13
- Re: gl_ABSOLUTE_HEADER_ONE and older seds,
Daniel Richard G. <=
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Bruno Haible, 2011/10/13
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Daniel Richard G., 2011/10/14
- Re: porting to NeXTstep, Bruno Haible, 2011/10/14
- Re: porting to NeXTstep, Daniel Richard G., 2011/10/15
- Re: perror.m4 test, Bruno Haible, 2011/10/15
- Re: perror.m4 test, Eric Blake, 2011/10/15