From: Paul Eggert Date: Sun, 23 Apr 2006 08:41:06 +0000 (+0000) Subject: * NEWS: Remove mention of AS_VAR_SET_BASENAME and AS_VAR_SET_DIRNAME. X-Git-Tag: AUTOCONF-2.59d~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df797abaf39761e568dff4b4038601d85d2b2e33;p=thirdparty%2Fautoconf.git * NEWS: Remove mention of AS_VAR_SET_BASENAME and AS_VAR_SET_DIRNAME. * doc/autoconf.texi (Programming in M4sh): Remove mention of AS_VAR_SET_BASENAME, AS_VAR_SET_DIRNAME, and AS_BASENAME. We have to keep AS_DIRNAME since it was part of a stable Autoconf, but AS_BASENAME doesn't have to be supported. --- diff --git a/ChangeLog b/ChangeLog index ca7b29235..82e9e07ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,11 @@ 2006-04-23 Paul Eggert - * NEWS: Update wording to say merely "should" for AS_DIRNAME - and AS_BASENAME. - * lib/m4sugar/m4sh.m4 (AS_BASENAME, AS_DIRNAME): Bring these - back, albeit undocumented. Programs now have a grace period - to switch to AS_VAR_SET_DIRNAME and AS_VAR_SET_BASENAME. + * NEWS: Remove mention of AS_VAR_SET_BASENAME and AS_VAR_SET_DIRNAME. + * doc/autoconf.texi (Programming in M4sh): Remove mention of + AS_VAR_SET_BASENAME, AS_VAR_SET_DIRNAME, and AS_BASENAME. + We have to keep AS_DIRNAME since it was part of a stable Autoconf, + but AS_BASENAME doesn't have to be supported. + * lib/m4sugar/m4sh.m4 (AS_BASENAME, AS_DIRNAME): Bring these back. 2006-04-23 Ralf Wildenhues diff --git a/NEWS b/NEWS index 92acd0a26..0cbd79429 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,5 @@ * Major changes in Autoconf 2.59d -** New macros AS_VAR_SET_BASENAME and AS_VAR_SET_DIRNAME. - Programs that use the (never-stable, and now undocumented) AS_BASENAME - and AS_DIRNAME macros should use these new macros instead. - * Major changes in Autoconf 2.59c Released 2006-04-12, by Ralf Wildenhues. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index d977d27ea..6f3202a90 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -9646,14 +9646,6 @@ For the time being, it is not mature enough to be widely used. M4sh provides portable alternatives for some common shell constructs that unfortunately are not portable in practice. -@defmac AS_VAR_SET_BASENAME (@var{variable}, @var{file-name}) -@asindex{VAR_SET_BASENAME} -Set @var{variable} to the non-directory portion of @var{file-name}. -For example, -if @code{$file} is @samp{/one/two/three}, the command -@code{AS_VAR_SET_BASENAME([base], ["$file"])`} sets @code{base} to @samp{three}. -@end defmac - @defmac AS_BOURNE_COMPATIBLE @asindex{BOURNE_COMPATIBLE} Set up the shell to be more compatible with the Bourne shell as @@ -9669,11 +9661,11 @@ against one or more patterns. @var{if-matched} is run if the corresponding pattern matched @var{word}, else @var{default} is run. @end defmac -@defmac AS_VAR_SET_DIRNAME (@var{variable}, @var{file-name}) -@asindex{VAR_SET_DIRNAME} -Set @var{variable} to the directory portion of @var{file-name}. For example, +@defmac AS_DIRNAME (@var{file-name}) +@asindex{DIRNAME} +Output the directory portion of @var{file-name}. For example, if @code{$file} is @samp{/one/two/three}, the command -@code{AS_VAR_SET_DIRNAME([var], ["$file"])} sets @code{dir} to @samp{/one/two}. +@code{dir=`AS_DIRNAME(["$file"])`} sets @code{dir} to @samp{/one/two}. @end defmac @defmac AS_IF (@var{test1}, @ovar{run-if-true1}, @dots{}, @ovar{run-if-false}) @@ -12468,23 +12460,8 @@ fields in a record. You may be able to circumvent this problem by using @item @command{basename} @c --------------------- @prindex @command{basename} -Not all hosts have a working @command{basename}, and you should instead -use @code{AS_VAR_SET_BASENAME} (@pxref{Programming in M4sh}), followed by -@command{expr} if you need to strip a suffix. For example: - -@example -a=`basename "$aname"` # This is not portable. -AS_VAR_SET_BASENAME([a], ["$aname"]) # This is more portable. - -# This is not portable. -c=`basename "$cname" .c` - -# This is more portable. -AS_VAR_SET_BASENAME([c], ["$cname"]) -case $c in -?*.c) c=`expr "X$c" : 'X\(.*\)\.c'`;; -esac -@end example +Not all hosts have a working @command{basename}. +You can use @command{expr} instead. @item @command{cat} @@ -12648,11 +12625,11 @@ Some implementations, such as Tru64's, fail when comparing to @c -------------------- @prindex @command{dirname} Not all hosts have a working @command{dirname}, and you should instead -use @code{AS_VAR_SET_DIRNAME} (@pxref{Programming in M4sh}). For example: +use @code{AS_DIRNAME} (@pxref{Programming in M4sh}). For example: @example -dir=`dirname "$file"` # This is not portable. -AS_VAR_SET_DIRNAME([dir], ["$file"]) # This is more portable. +dir=`dirname "$file"` # This is not portable. +dir=`AS_DIRNAME(["$file"])` # This is more portable. @end example