autoconf-prs
[Top][All Lists]
Advanced

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

autoconf/227: autoconf/227: AS_MKDIR_P problems


From: autoconf
Subject: autoconf/227: autoconf/227: AS_MKDIR_P problems
Date: Wed, 1 Dec 2004 12:55:06 -0600 (CST)

The following reply was made to PR autoconf/227; it has been noted by GNATS.

From: address@hidden
To: address@hidden,address@hidden
Cc: 
Subject: autoconf/227: AS_MKDIR_P problems
Date: Fri, 27 Dec 2002 06:13:45 -0500

 >Number:         227
 >Category:       autoconf
 >Synopsis:       AS_MKDIR_P problems
 >Confidential:   no
 >Severity:       serious
 >Priority:       medium
 >Responsible:    akim
 >State:          open
 >Quarter:        
 >Keywords:       
 >Class:          sw-bug
 >Submitter-Id:   net
 >Arrival-Date:   Fri Dec 27 06:13:45 -0500 2002
 >Cases:          
 >Originator:     Eric Sunshine
 >Release:        2.57
 >Organization:
 
 >Environment:
 Certain older implementations of mkdir.
 >Description:
 AS_MKDIR_P in m4sugar/m4sh.m4 has two problems/issues:
 
 1) _AS_MKDIR_P_PREPARE behaves incorrectly on some platforms (such as NextStep 
and OpenStep) for which `mkdir' does not recognize any options.  The existing 
implementation leaves a bogus directory named "-p" sitting in the working 
directory.
 
 2) _AS_MKDIR_P_PREPARE neglects to take advantage of the older `mkdirs' 
command (note the plural) which exists on some platforms (such as NextStep and 
OpenStep), and which performs the same functions as `mkdir -p'.
 >How-To-Repeat:
 Run any configure script created by 2.57 on a platform with an old mkdir 
command.
 >Fix:
 This patch corrects problem #1 by removing the bogus "-p" directory if 
present, and corrects the #2 shortcoming by adding a check for `mkdirs' if 
`mkdir -p' fails.
 
 --- m4sh.m4     Tue Nov  5 02:09:14 2002
 +++ fix/m4sh.m4 Tue Dec 17 01:34:51 2002
 @@ -686,10 +686,13 @@ $as_ln_s $1 $2
  # -------------------
  m4_defun([_AS_MKDIR_P_PREPARE],
  [if mkdir -p . 2>/dev/null; then
 -  as_mkdir_p=:
 +  as_mkdir_p='mkdir -p'
 +elif mkdirs . 2>/dev/null; then
 +  as_mkdir_p='mkdirs'
  else
 -  as_mkdir_p=false
 +  as_mkdir_p=''
  fi
 +test -r ./-p && rm -rf ./-p
  ])# _AS_MKDIR_P_PREPARE
 
  # AS_MKDIR_P(PATH)
 @@ -697,8 +700,8 @@ fi
  # Emulate `mkdir -p' with plain `mkdir'.
  m4_define([AS_MKDIR_P],
  [AS_REQUIRE([_$0_PREPARE])dnl
 -{ if $as_mkdir_p; then
 -    mkdir -p $1
 +{ if test -n "$as_mkdir_p"; then
 +    $as_mkdir_p $1
    else
      as_dir=$1
      as_dirs=
 >Unformatted:
 




reply via email to

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