bug-automake
[Top][All Lists]
Advanced

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

Re: Mac OS X: mkinstalldirs


From: Michael Witten
Subject: Re: Mac OS X: mkinstalldirs
Date: Mon, 19 May 2008 14:33:31 -0400


On 19 May 2008, at 1:07 PM, Ralf Wildenhues wrote:

Hello Michael,

* Michael Witten wrote on Sun, May 18, 2008 at 05:59:26AM CEST:
The mkinstalldirs script does not work on Mac OS X (Leopard);

Mac OS X's mkdir does not have --version and it seems to be
thread-safe.

Unfortunately, the AC_PROG_MKDIR_P macro from Autoconf is not
sharp in its test, in the sense that it may choose 'install-sh -d'
(or mkinstalldirs, with older Autoconf/Automake versions), even
if the system's mkdir accepts -p and is parallel-safe.
...
That said, this issue is not a bug in the sense that it causes wrong
behavior: $MKDIR_P should be functional anyway, just more slowly than
would be needed on the particular system.  You can work around it with
 ./configure MKDIR_P="/usr/bin/mkdir -p"

In my case, mkinstalldirs did produce errors, as the subdirectories that
it was trying to make already existed (which is particularly strange,
because it seems like the point of mkinstalldirs is to implement
mkdir -p safely).

I recall from a quick glance at the innards that the script was incorrectly
deciding that Mac OS X doesn't have a viable 'mkdir -p', because the
'--version' tests fail, as Mac OS X's mkdir doesn't support a --version
flag; consequently, the for loop that implements a 'mkdir -p' is run, but that loop fails, becausr mkdir complains about subdirectories already existing (at least with one project I was trying to build). I don't really understand
why this would be the case, because there seemed to be a check there for
whether the path component exists; perhaps this code is not thread- safe either.

In any case, I don't really know how all the machinery works. I suppose
I'll read about it presently.

Thanks,
Michael Witten




reply via email to

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