tech-userlevel archive

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

Re: make: existence-only prerequisites (was: make: order-only prerequisites?)

> Date: Mon, 13 Feb 2017 11:58:18 +0100
> From: Edgar Fuß <>
> > I don't remember anything that just checks 'existance'
> > without checking the timestamp.
> Which, to epeat myself,  would be extremely useful, especially for directories
> (because adding a file means updating the directories mtime, which ...).
> I always end up with something like
> 	test -d ${d} || mkdir -p ${d}
> which doesn't feel very make-like.

Traditionally make(1) doesn't handle dependencies on directories very
well for various reasons, and the traditional approach is to use a
dummy file in the directory:

	touch foo/.stamp

Home | Main Index | Thread Index | Old Index