[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR
From: |
Gary V. Vaughan |
Subject: |
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR |
Date: |
Wed, 20 Apr 2005 11:00:57 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041103) |
Hi Paul,
Paul Eggert wrote:
> "Gary V. Vaughan" <address@hidden> writes:
>
>
>>>ac_libobj_dir=
>>>test "X${ac_config_libobj_dir-.}" != X. &&
>>> ac_libobj_dir=`expr "X$ac_config_libobj_dir/" : 'X\(.*[^/]\)' '|' 'X/' :
>>> 'X\(/\)'`
>>
>>I think that does something different. The idea of my sed expression is
>>just to avoid adding a trailing slash if configure.ac contains, say,
>>AC_CONFIG_LIBOBJ_DIR([lib/]).
>
>
> But that's what this patch does. For example:
You misunderstood; my intent was to ensure exactly one trailing slash for easy
concatenation further down in the code.
> $ expr 'Xlib/' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
> lib
$ echo 'lib/' | sed 's,/*$,/,'
lib/
> $ expr 'Xlib//' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
> lib
$ echo 'lib//' | sed 's,/*$,/,'
lib/
> $ expr 'Xlib///' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
> lib
$ echo 'lib///' | sed 's,/*$,/,'
lib/
> $ expr 'Xabc\def/' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
> abc\def
$ echo 'abc\def' | sed 's,/*$,/,'
abc\def
Although the latter is certainly subject to the vagiaries of the local echo
implementation.
> The advantage of expr is that it does the right thing even if
> $ac_config_libobj_dir contains a backslash or other weird character.
Agreed.
$ expr 'Xlib/sub///' : 'X\(.*[^/]/\)'
lib/sub/
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Alexandre Duret-Lutz, 2005/04/18
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Gary V. Vaughan, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Paul Eggert, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Alexandre Duret-Lutz, 2005/04/21
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/25
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Alexandre Duret-Lutz, 2005/04/25
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/29