[Top][All Lists]

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

Re: mkdir -p -- minor cleanup

From: Paul Eggert
Subject: Re: mkdir -p -- minor cleanup
Date: Wed, 19 Apr 2006 16:18:04 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Stepan Kasal <address@hidden> writes:

> I think it is more practical to have $(mkdir_p) set to 'mkdir -p --'.

Yes, that is a possibility.

> And you can often write
>       $(mkdir_p) $(directory_list)
> without knowing exactly the names of the directories.  It's natural to
> forget that the directory name might start with a dash.

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 "-".  Such applications will already be
in trouble, in lots of different ways.  It should be a relatively
minor burden on developers of such applications to use "$(mkdir_p) --"
instead of "$(mkdir_p)".

> 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.

> -  # $(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

I don't have a strong feeling for whether mkdir_p should end in ' --',
or not.  But it should be consistent, whichever way is chosen, so
clearly a change is needed.

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

reply via email to

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