tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make: existence-only prerequisites
DH> I don't remember anything that just checks 'existance'
DH> without checking the timestamp.
EF> Which, to epeat myself, would be extremely useful, especially for
EF> directories
EF> (because adding a file means updating the directories mtime, which ...).
EF> I always end up with something like
EF> test -d ${d} || mkdir -p ${d}
EF> which doesn't feel very make-like.
TRC> Traditionally make(1) doesn't handle dependencies on directories very
TRC> well for various reasons
The reasons being?
TRC> and the traditional approach is to use a dummy file in the directory:
TRC>
TRC> foo/.stamp:
TRC> touch foo/.stamp
Which a) creates a file you may have to ignore afterwards and b) updates the
directory's time stamp causing gratuitous command execution later.
Home |
Main Index |
Thread Index |
Old Index