On 3/30/2010 2:14 AM, Edward Welbourne wrote:
y.tab.h y.tab.c y.output: yacc.ts
I don't actually see that y.output serves any role in this; simply
remove every reference to it and your example should be clearer.
It actually does serve a roll for testing purposes. Try the following
with this test case:
gmake clean
gmake
rm y.output
gmake
gmake
With GNU make 3.81, the second to last gmake invocation rebuilds
y.output which also
rebuilds y.tab.h and y.tab.c, but y.tab.o (now out of date) doesn't get
rebuilt. An additional
gmake invocation is necessary to get everything up to date - which is
not desirable behavior.
y.tab.o: y.tab.c y.tab.h
I don't understand .INTERMEDIATE well enough to know why this chain
fails to lead to y.tab.o's rule being run after yacc.ts's rule has
been run, in your -j case. Something strange is going on,
I think what is happening is that time stamps are being checked "too
early" in some cases.
Make can't infer that y.tab.h, y.tab.c, and y.output are updated by the
commands for
yacc.ts. Depending on when it checks the time stamps for those files,
it may see the
times before or after the commands for yacc.ts are run. I recall seeing
emails regarding
GNU make caching time stamps, so that could contribute to this.
Parallel builds would
behave differently since a shared cache isn't used and each process
would have to
check time stamps on its own. So, behavior varies.
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make