This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]