This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
ccache and -MMD / *.d issue
- From: "Conrad Scott" <Conrad dot Scott at dsl dot pipex dot com>
- To: <cygwin at cygwin dot com>
- Date: Sun, 9 Jun 2002 17:33:39 +0100
- Subject: ccache and -MMD / *.d issue
This might be obvious to everyone else but it's taken me a couple of days to
realise what's been happening.
If you use the gcc -MMD flag to generate dependency information in *.d files
and combine this with ccache, you get caught out if you do a make clean
(i.e. delete all the *.o and *.d files) and then re-build.
What happens is that the *.o files are re-generated from the cache but the
*.d files are not. So: you re-compile, edit some header file and re-compile
again: nothing gets re-compiled, you've got no dependency information. At
that point you need to make clean *and* clear the cache (rm -rf ~/.ccache)
and *then* re-build. Again. From scratch. Sigh.
I've emailed the ccache bug list just to see if there's any easy way around
this but I thought I'd send this out here as a warning, particularly since
this is the dependency scheme used for the cygwin source itself --- exactly
where I got caught out. Presumably the "make clean" could only delete the
*.o files; the *.d files being removed by something like "make distclean"
but this isn't a complete solution.
It's a shame as otherwise ccache is a lovely tool.
Cheers,
// Conrad
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/