[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR
From: |
Paul Eggert |
Subject: |
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR |
Date: |
Mon, 18 Apr 2005 15:59:05 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
"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:
$ expr 'Xlib/' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
lib
$ expr 'Xlib//' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
lib
$ expr 'Xlib///' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
lib
$ expr 'Xabc\def/' : 'X\(.*[^/]\)' '|' 'X/' : 'X\(/\)'
abc\def
The advantage of expr is that it does the right thing even if
$ac_config_libobj_dir contains a backslash or other weird character.
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Alexandre Duret-Lutz, 2005/04/18