autoconf-patches
[Top][All Lists]
Advanced

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

Re: AS_MKDIR_P bug/patch


From: Paul Eggert
Subject: Re: AS_MKDIR_P bug/patch
Date: 28 Sep 2003 12:07:36 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

On Fri, 26 Sep 2003 13:11:11 +0200, Andreas Schwab wrote:

> IMHO using rmdir here has less change of destoying a pre-existing
> directory (and if it's created by mkdir it should be empty anyway).

Good point.  I installed this change.

2003-09-28  Paul Eggert  <address@hidden>

        * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P_PREPARE):
        Change "rm -fr ./-p" to the more-conservative
        "test -d ./-p && rmdir ./-p".  Suggested by Andreas Schwab in:
        http://mail.gnu.org/archive/html/autoconf-patches/2003-09/msg00039.html

Index: m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.101
retrieving revision 1.102
diff -p -u -r1.101 -r1.102
--- m4sh.m4     28 Sep 2003 18:53:50 -0000      1.101
+++ m4sh.m4     28 Sep 2003 19:02:41 -0000      1.102
@@ -691,7 +691,7 @@ m4_defun([_AS_MKDIR_P_PREPARE],
 [if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
 else
-  rm -fr ./-p
+  test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 ])# _AS_MKDIR_P_PREPARE




reply via email to

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