autoconf-patches
[Top][All Lists]
Advanced

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

Re: document AS_BASENAME


From: Noah Misch
Subject: Re: document AS_BASENAME
Date: Thu, 30 Mar 2006 10:01:39 -0800
User-agent: Mutt/1.5.6i

On Thu, Mar 30, 2006 at 06:18:43PM +0200, Stepan Kasal wrote:
> @@ -12178,7 +12190,8 @@
>  @item @command{basename}
>  @c ---------------------
>  @prindex @command{basename}
> -Not all hosts have a working @command{basename}, and you should instead
> +Not all hosts have @command{basename} available, and some mishandle the
> +corner case @samp{basename /} (e.g., Solaris), thus you should instead
>  use @code{AS_BASENAME} (@pxref{Programming in M4sh}).  For example:
>  
>  @example
> @@ -12186,6 +12199,10 @@
>  file=`AS_BASENAME(["$file"])` # This is more portable.
>  @end example

With you adding an example to the documentation of AS_BASENAME, this example is
now duplicative.  Consider deleting it.

> address@hidden
> +Do not use @command{basename} to strip a suffix from the file name, use
> address@hidden instead.

This is a sound strategy recommendation, but it does not reflect any additional
limitation of `basename'.  Please delete this or rework the section to
incorporate it in that light, perhaps along these lines:

  Some hosts lack `basename' (example?) or provide an implementation that
  mishandles `/' (Solaris).  Use `AS_BASENAME' to portably extract the last
  component of a file name.  Use `expr' to remove a suffix from a string.

I'm not sure that wording I suggest is any clearer.  I think it's important that
we somehow avoid creating a myth that some basename implementations lack support
for suffix removal.




reply via email to

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