2006-05-31 Stepan Kasal
* doc/autoconf.texi (Particular Programs) :
Document that ${MKDIR_P} understands --.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the
comment.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1029
diff -u -r1.1029 autoconf.texi
--- doc/autoconf.texi 27 May 2006 22:22:01 -0000 1.1029
+++ doc/autoconf.texi 31 May 2006 11:18:28 -0000
@@ -3548,6 +3548,8 @@
@command{configure}. Also, @code{AS_MKDIR_P} does not accept options,
but @code{MKDIR_P} can use the @option{-m} option, e.g., a makefile might
invoke @code{$(MKDIR_P) -m 0 dir} to create an inaccessible directory.
+Moreover, @code{MKDIR_P} understands @option{--} which should be used
+if any of the parameters might start with a dash.
Finally, @code{AS_MKDIR_P} does not check for race condition
vulnerability, whereas @code{AC_PROG_MKDIR_P} does.
@end defmac
Index: lib/autoconf/programs.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/programs.m4,v
retrieving revision 1.59
diff -u -r1.59 programs.m4
--- lib/autoconf/programs.m4 30 May 2006 07:28:02 -0000 1.59
+++ lib/autoconf/programs.m4 31 May 2006 11:18:29 -0000
@@ -622,12 +622,11 @@
# setting umask.
#
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# Some implementations (such as Solaris 8's) contain a race condition:
+# if a parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
# concurrently, both version can detect that a/ is missing, but only
# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU mkdir (using the --version option ensures
-# this).
+# restrict ourselves to known race-free implementations.
#
# Automake used to define mkdir_p as `mkdir -p .', in order to
# allow $(mkdir_p) to be used without argument. As in