>>> "Eric" == Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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@xxxxxxx> * 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@xxxxxxxxxxxxxxx Eric Magnien emagnien@xxxxxxxxxxxxxxxx Eric Siegerman erics_97@xxxxxxxxx +Eric Sunshine sunshine@xxxxxxxxxxxxxx Erick Branderhorst branderh@xxxxxxxx Erik Lindahl E.Lindahl@xxxxxxxxxxx Ezra Peisach epeisach@xxxxxxxxxxxxxxx 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