tech-toolchain archive

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

Re: question

On Mon, Jun 06, 2011 at 04:41:49PM -0400, der Mouse wrote:
> a.c b.c:
>       echo 'int foo;' > a.c
>       echo 'int foo;' > b.c
> You'll find - well, I find, at least - that it runs the command set
> only once.

Only because make does a second scan of the file timestamps just before
running the commands to double-check that no other rules have
recreated the target already.

However if the file creates aren't atomic actions, then it will (and does)
get confused.
This sort of thing is what lead to the original problem whwre a partially
created file is used in another rule.

Quite possibly this 'optimisation' needs to be disabled...


David Laight:

Home | Main Index | Thread Index | Old Index