[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: creating directories through dependency
From: |
Paul Smith |
Subject: |
Re: creating directories through dependency |
Date: |
Wed, 10 Jan 2007 09:16:32 -0500 |
On Tue, 2007-01-09 at 16:21 +0100, John Graham-Cumming wrote:
> Dave Korn wrote:
> > BTW, if you ever revise it, I noticed one minor omission in the
> > discussion of using the -p option to mkdir: as well as building a
> > whole path in one go, it also prevents mkdir from erroring out if the
> > destination dir already exists, meaning that you don't have to use
> > "-mkdir" and potentially ignore real errors as well as (irrelevant)
> > EEXISTs. I'm sure you're aware of all that, but your target audience
> > might not spot the implication if you don't make it explicit.
>
> That's a good point and worth mentioning. I'll make a note for a future
> revision (currently trying to interest a publisher in a 'GNU Make
> Cookbook' of all my articles
> (http://www.cmcrossroads.com/content/category/8/147/268) on GNU Make stuff).
One other minor nit; the article implies that any change to any file in
a directory modifies the directory's timestamp. That's not the case:
only changes that modify the directory entry table, such as adding a new
file, removing a file, or renaming a file (or subdirectory) will cause
the directory's timestamp to change.
That's one reason this issue is a bit tricky: sometimes it will work
fine but other times it will rebuild everything.
BTW, these semantics are true for POSIX systems; I'm not sure about
Windows.
Cheers!
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
Re: creating directories through dependency, Danny Boelens, 2007/01/09