[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!
From: |
Paul Wagland |
Subject: |
RE: AC_PREFIX_PATH, AS_BASENAME fixes and a new test! |
Date: |
Wed, 19 Sep 2001 14:42:48 +0200 |
Well, I sure am glad that my changes produced such a flurry of responses!
:-)
Anyway, yes you are right, this should of also been in my patch as well. I
only added the BASENAME_SED so that it had the same interfaces as DIRNAME*.
I also appreciate the changes you made to the sed to make it portable as
well!
One other thing, given the concerns with the [\\/] path issue, is it
worthwhile adding in a new set of checks to ensure that
(BASE|DIR)NAME(_(EXPR|SED))? (Note 1) work with both \\ and /, and possible
a mixture of the two?
Thanks for all the co-operation,
Paul
Note 1: Yes I know this is not a portable definition of the macros, but
rather a GNU extended one :-)
> -----Original Message-----
> From: Paul Eggert [mailto:address@hidden
> Sent: Tuesday, September 18, 2001 1:00
> To: address@hidden
> Cc: address@hidden
> Subject: Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!
>
>
> The AS_BASENAME fix doesn't seem complete to me.
> AS_BASENAME should look like AS_DIRNAME, e.g. something like this:
>
> # AS_BASENAME(PATHNAME)
> # --------------------
> # Simulate running `basename(1)' on PATHNAME, not all
> systems have it.
> # Also see the comments for AS_DIRNAME.
> m4_defun([AS_BASENAME_EXPR],
> [m4_require([_AS_EXPR_PREPARE])dnl
> $as_expr X[]$1 : '.*/\([^/][^/]*\)/*$' \| \
> X[]$1 : '\([^/][^/]*\)/*$' \|
> X[]$1 : 'X\(//\)$' \| \
> X[]$1 : 'X\(/\)/*$' \| \
> . : '\(.\)'])
>
> m4_defun([AS_BASENAME_SED],
> [echo X[]$1 |
> sed ['???']])
>
> m4_defun([AS_BASENAME],
> [AS_BASENAME_EXPR([$1]) 2>/dev/null ||
> AS_BASENAME_SED([$1])])
>
> except you need to fill in the '???'.
>
> AS_BASENAME_SED should be to AS_BASENAME_EXPR
> as AS_DIRNAME_SED is to AS_DIRNAME_EXPR.
>
>
- Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, (continued)
- Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Akim Demaille, 2001/09/17
- Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Paul Eggert, 2001/09/17
- Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Akim Demaille, 2001/09/18
- Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Paul Eggert, 2001/09/18
Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Paul Eggert, 2001/09/17
RE: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!,
Paul Wagland <=
Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Paul Eggert, 2001/09/19
Re: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!, Akim Demaille, 2001/09/22