]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix _AS_MKDIR_P usage.
authorEric Blake <ebb9@byu.net>
Fri, 10 Oct 2008 14:40:09 +0000 (08:40 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 10 Oct 2008 14:40:09 +0000 (08:40 -0600)
* lib/m4sugar/m4sh.m4 (_AS_MKDIR_P): Correct documentation to
match implementation.
(_AS_PREPARE, _AS_MKDIR_P_PREPARE): Adjust callers.
* doc/autoconf.texi (Programming in M4sh) <AS_MKDIR_P>: Tweak
wording to better match behavior.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/autoconf.texi
lib/m4sugar/m4sh.m4

index 2ead8c69bc4bb78a4cd4ecad56f453e86b6652fb..2ab03942856df74464d085e074238d6b4ae2a289 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,16 @@
+2008-10-10  Eric Blake  <ebb9@byu.net>
+
+       Fix _AS_MKDIR_P usage.
+       * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P): Correct documentation to
+       match implementation.
+       (_AS_PREPARE, _AS_MKDIR_P_PREPARE): Adjust callers.
+       * doc/autoconf.texi (Programming in M4sh) <AS_MKDIR_P>: Tweak
+       wording to better match behavior.
+
 2008-10-10  Paolo Bonzini  <bonzini@gnu.org>
 
        * doc/autoconf.texi: Be less wary of shell functions.
+       * NEWS: Document the increased use of shell functions.
 
 2008-10-10  Paolo Bonzini  <bonzini@gnu.org>
 
index 2ea542c8c843c155ea0d64012731200e8f4e5cd0..e1afada44ca5b3a748f88eb945ea8679914d086d 100644 (file)
@@ -11872,9 +11872,10 @@ script.  Finally, it changes the current diversion to @code{BODY}.
 @defmac AS_MKDIR_P (@var{file-name})
 @asindex{MKDIR_P}
 Make the directory @var{file-name}, including intervening directories
-as necessary.  This is equivalent to @samp{mkdir -p @var{file-name}},
+as necessary.  This is equivalent to @samp{mkdir -p -- @var{file-name}},
 except that it is portable to older versions of @command{mkdir} that
-lack support for the @option{-p} option.  Also, @code{AS_MKDIR_P}
+lack support for the @option{-p} option or for the @option{--}
+delimiter.  Also, @code{AS_MKDIR_P}
 succeeds if @var{file-name} is a symbolic link to an existing directory,
 even though Posix is unclear whether @samp{mkdir -p} should
 succeed in that case.  If creation of @var{file-name} fails, exit the
index c0a1e30d942957bd5e5731eeae99d11383f84dae..369d27a424fb53851142d811fbbc2b201d89c9b5 100644 (file)
@@ -257,7 +257,7 @@ fi
 # important not to forget some: config.status needs them.
 m4_defun([_AS_PREPARE],
 [as_func_mkdir_p() {
-  _AS_MKDIR_P([$[]1])
+  _AS_MKDIR_P
 }
 
 _AS_EXPR_PREPARE
@@ -1033,9 +1033,11 @@ $as_ln_s $1 $2
 ])
 
 
-# _AS_MKDIR_P(DIR)
-# ----------------
-# Emulate `mkdir -p` with plain `mkdir'.
+# _AS_MKDIR_P
+# -----------
+# Emit code that can be used to emulate `mkdir -p` with plain `mkdir';
+# the code assumes that "$as_dir" contains the directory to create.
+# $as_dir is normalized, so there is no need to worry about using --.
 m4_define([_AS_MKDIR_P],
 [case $as_dir in #(
   -*) as_dir=./$as_dir;;
@@ -1067,7 +1069,7 @@ as_dir=$1; as_func_mkdir_p])# AS_MKDIR_P
 # -------------------
 m4_defun([_AS_MKDIR_P_PREPARE],
 [AS_REQUIRE_SHELL_FN([as_func_mkdir_p], [
-  _AS_MKDIR_P([$[]1])
+  _AS_MKDIR_P
 ])
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p='mkdir -p "$as_dir"'