[Top][All Lists]

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

Re: mkdir -p -- minor cleanup

From: Stepan Kasal
Subject: Re: mkdir -p -- minor cleanup
Date: Thu, 20 Apr 2006 11:40:57 +0200
User-agent: Mutt/1.4.1i

Hello Paul.

On Wed, Apr 19, 2006 at 04:18:04PM -0700, Paul Eggert wrote:
> Stepan Kasal <address@hidden> writes:
> > And $(mkdir_p) cannot be used with an option anyway.
> But under the patch I proposed, "$(mkdir_p) -m 444" would be allowed,
> for example.

(Well, not ``for example'', -m is the only option you can use here.

But this would have to be properly documented:
1) in the comment in mkdir_p, as another reason why GNU mkdir is the
only one accepted,
2) in the documentation for the macro.

> But portable directory names cannot start with '-'.  See
> <>.
> I don't think we need to worry about applications that want to install
> files whose names begin with "-".  [...]

Yes, this is true for Autoconf.  But what about Automake, this would
be a regression for it.
But it could replace all uses by "$(mkdir_p) --", of course.

> A minor advantage of not ending in ' --' is that the output of "make"
> is easier to read.

Thus it seems this will apply only to packages which don't use Automake.

> > -  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
> > -  if test -f "$ac_aux_dir/mkinstalldirs"; then
> > -    mkdir_p='$(mkinstalldirs)'
> > -  else
> > -    mkdir_p='$(install_sh) -d'
> > -  fi
> Hmm, why remove support for mkinstalldirs here?  Isn't that a separate
> issue?

I'm not removing the support for mkinstalldirs.  I just do not use it
as a fallback for mkdir_p, even if it is present.

(Note that every package using current Automake has to distribute
install-sh, because AM_INIT_AUTOMAKE requires AC_PROG_INSTALL.)

You are right, this is a separate change, but it is a prerequisite
for moving AM_PROG_MKDIR_P to Autoconf, and Bruno's original patch
contained it, too.

I proposed it long ago:

The discussion continued this March:

A plan:
First, the ``mkinstalldirs'' issue has to be resolved.

Second, `install-sh' should be patched to understand `--', the patch
is earier in this thread.

Third, as you put it:
> [...] mkdir_p should end in ' --', or not.  But it should be
> consistent, whichever way is chosen, so clearly a change is needed.

And then we can return to the question of moving the macro to Autoconf.

Have a nice day,

reply via email to

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