[Top][All Lists]

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

Re: [PATCH] Fix for AS_MKDIR_P and symbolic links

From: Paul Eggert
Subject: Re: [PATCH] Fix for AS_MKDIR_P and symbolic links
Date: 14 Jan 2004 12:27:56 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Paul Hilfinger <address@hidden> writes:

> -    mkdir -p $1
> +    test -d $1 || mkdir -p $1

Thanks for the patch.  I installed that, along with the following
documentation fix.

2004-01-14  Paul Eggert  <address@hidden>

        * doc/autoconf.texi (Programming in M4sh): Document that
        AS_MKDIR_P succeeds if the destination is a symbolic link
        to an existing directory.
        (Limitations of Usual Tools): Note that mkdir -p might not
        succeed on symlinks to directories.

Index: doc/autoconf.texi
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.793
diff -p -u -r1.793 autoconf.texi
--- doc/autoconf.texi   13 Jan 2004 18:36:55 -0000      1.793
+++ doc/autoconf.texi   14 Jan 2004 20:24:33 -0000
@@ -8547,7 +8547,10 @@ RUN-IF-TRUE or RUN-IF-FALSE is empty.
 Make the directory @var{filename}, including intervening directories
 as necessary.  This is equivalent to @samp{mkdir -p @var{filename}},
 except that it is portable to older versions of @command{mkdir} that
-lack support for the @option{-p} option.
+lack support for the @option{-p} option.  Also, @code{AS_MKDIR_P}
+succeeds if @var{filename} is a symbolic link to an existing directory,
+even though @acronym{POSIX} is unclear whether @samp{mkdir -p} should
+succeed in that case.
 @end defmac
 @defmac AS_SET_CATFILE (@var{var}, @var{dir}, @var{file})
@@ -11237,9 +11240,14 @@ found"} if there are no @samp{.c} files.
 @c ------------------
 @prindex @command{mkdir}
 @cindex Making directories
-None of @command{mkdir}'s options are portable.  Instead of
+None of @command{mkdir}'s options are portable to older systems.  Instead of
 @samp{mkdir -p @var{filename}}, you should use use
 @code{AS_MKDIR_P(@var{filename})} (@pxref{Programming in M4sh}).
address@hidden does not clearly specify whether @samp{mkdir -p foo}
+should succeed when @file{foo} is a symbolic link to an already-existing
+directory.  GNU Coreutils 5.1.0 @command{mkdir} succeeds, but Solaris 9
address@hidden fails.
 @item @command{mv}
 @c ---------------

reply via email to

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