Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <080e01c20fd3$69ad33f0$6132bc3e@BABEL> From: "Conrad Scott" To: Subject: ccache and -MMD / *.d issue Date: Sun, 9 Jun 2002 17:33:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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/