]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* NEWS: Remove mention of AS_VAR_SET_BASENAME and AS_VAR_SET_DIRNAME.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Apr 2006 08:41:06 +0000 (08:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Apr 2006 08:41:06 +0000 (08:41 +0000)
* 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.

ChangeLog
NEWS
doc/autoconf.texi

index ca7b292358ce85b32f7b01d4b79b9ad4a809ccda..82e9e07ff79562168316df9f6f258fc00c6b65dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
 2006-04-23  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * 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  <Ralf.Wildenhues@gmx.de>
 
diff --git a/NEWS b/NEWS
index 92acd0a2665a821d8a5c4cc20e1276514f8d6686..0cbd79429888ac998f7f99fa20c242ad8bb98620 100644 (file)
--- 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.
index d977d27ea8cdea4d1eacd6d3cde9b47f18cc5e2c..6f3202a90fa7ebf765f75b4b3727719198c710a3 100644 (file)
@@ -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