automake
[Top][All Lists]
Advanced

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

Re: mkinstalldirs detritus


From: Alexandre Duret-Lutz
Subject: Re: mkinstalldirs detritus
Date: Fri, 26 Sep 2003 19:08:58 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Eric" == Eric Sunshine <address@hidden> writes:

 Eric> Hello,

 Eric> The mkinstalldirs script which ships with Autoconf and
 Eric> Automake leaves bogus directories named "-p" and "--" in
 Eric> its wake on platforms (such as NextStep and OpenStep) for
 Eric> which the `mkdir' command does not recognize any options.
 Eric> Here is a patch which fixes this bug.  The patch is based
 Eric> upon the mkinstalldirs script from the Autoconf CVS
 Eric> repository since it appears to be more up-to-date than
 Eric> the one in the Automake CVS repository.

Thank you.  Automake is the master for this file.  Given
Andrea's comment and yours about _AS_MKDIR_P_PREPARE, how about
the following instead?

2003-09-26  Alexandre Duret-Lutz  <address@hidden>

        * lib/mkinstalldirs: Clean up after NextStep and OpenStep mkdir.
        Suggested by Eric Sunshine.

Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.220
diff -u -r1.220 THANKS
--- THANKS      24 Aug 2003 22:34:59 -0000      1.220
+++ THANKS      26 Sep 2003 17:06:17 -0000
@@ -56,6 +56,7 @@
 Erez Zadok             address@hidden
 Eric Magnien           address@hidden
 Eric Siegerman         address@hidden
+Eric Sunshine          address@hidden
 Erick Branderhorst     address@hidden
 Erik Lindahl           address@hidden
 Ezra Peisach           address@hidden
Index: lib/mkinstalldirs
===================================================================
RCS file: /cvs/automake/automake/lib/mkinstalldirs,v
retrieving revision 1.13
diff -u -r1.13 mkinstalldirs
--- lib/mkinstalldirs   14 Jun 2003 22:01:41 -0000      1.13
+++ lib/mkinstalldirs   26 Sep 2003 17:06:18 -0000
@@ -4,7 +4,7 @@
 # Created: 1993-05-16
 # Public domain.
 
-scriptversion=2003-06-14.23
+scriptversion=2003-09-26.19
 
 errstatus=0
 dirmode=""
@@ -65,12 +65,25 @@
     if mkdir -p -- . 2>/dev/null; then
       echo "mkdir -p -- $*"
       exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./-- && rmdir ./--
     fi
     ;;
   *)
     if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
       echo "mkdir -m $dirmode -p -- $*"
       exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./-- "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
     fi
     ;;
 esac

-- 
Alexandre Duret-Lutz





reply via email to

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