bug-gnulib
[Top][All Lists]
Advanced

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

Re: gl_ABSOLUTE_HEADER_ONE and older seds


From: Bruno Haible
Subject: Re: gl_ABSOLUTE_HEADER_ONE and older seds
Date: Fri, 14 Oct 2011 01:29:04 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Daniel Richard G. wrote:
> 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

But NeXTstep is so old that you will need many many more changes
until you get the POSIX part of gnulib to compile and pass its tests.
Just try

   $ ./gnulib-tool --create-testdir --dir=/tmp/testdir \
                   --with-tests --with-c++-tests --with-single-configure \
                   `./posix-modules`
   $ cd /tmp/testdir
   $ configure
   $ make
   $ make check

> and even adds escaping of the "." character in header filenames for free.

True, we were assuming that when we look for stdio.h we won't encounter
an include file called stdioxh. A little bit of laziness. But it's still
unlikely to break.

> > And the workaround for you is simple: Just install a version of GNU
> > sed 3.02 in your PATH, and you'll be done.
> 
> ... 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.

That's what I meant by "install ... in your PATH". It's the usual way
to use PATH.

Bruno
-- 
In memoriam Bekir Çoban-zade <http://en.wikipedia.org/wiki/Bekir_Çoban-zade>



reply via email to

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