[ccache] Generated dep file newer than object file

2011-05-01 Thread Andrew Gallagher
When using the '-MD' to gcc, a dep file is produced along side the object file. In ccache, this dep file is copied after the object file is copied, resulting a newer mtime for the dep file than the object file. I believe this is an issue for makefiles with rules like: foo.o: foo.c gcc -c -MD

Re: [ccache] Generated dep file newer than object file

2011-05-01 Thread Joel Rosdahl
On 2011-05-01 23:02, Andrew Gallagher wrote: [...] foo.o: foo.c gcc -c -MD ... foo.o: foo.d .d files aren't supposed to be dependencies, so I'd argue that such a Makefile is badly written. However, letting ccache update mtime of the .d file before the .o file couldn't hurt, so that would

Re: [ccache] Generated dep file newer than object file

2011-05-01 Thread Andrew Gallagher
On Sun, May 1, 2011 at 2:27 PM, Joel Rosdahl j...@rosdahl.net wrote: On 2011-05-01 23:02, Andrew Gallagher wrote: [...] foo.o: foo.c   gcc -c -MD ... foo.o: foo.d .d files aren't supposed to be dependencies, so I'd argue that such a Makefile is badly written. I am not too familiar with