This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: mkinstalldirs detritus
- From: Alexandre Duret-Lutz <aduret at src dot lip6 dot fr>
- To: Eric Sunshine <sunshine at sunshineco dot com>, automake-patches at gnu dot org
- Cc: autoconf-patches at gnu dot org, autoconf at gnu dot org, automake at gnu dot org
- Date: Fri, 26 Sep 2003 19:08:58 +0200
- Subject: Re: mkinstalldirs detritus
- References: <200309261051.AA20473@sunshineco.com>
>>> "Eric" == Eric Sunshine <sunshine@sunshineco.com> 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 <adl@gnu.org>
* 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 ezk@cs.columbia.edu
Eric Magnien emagnien@club-internet.fr
Eric Siegerman erics_97@pobox.com
+Eric Sunshine sunshine@sunshineco.com
Erick Branderhorst branderh@iaehv.nl
Erik Lindahl E.Lindahl@chem.rug.nl
Ezra Peisach epeisach@MED-XTAL.BU.EDU
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