Subject: Re: rebuilding stale .depend files
To: None <tech-toolchain@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 11/03/2003 08:39:36
On Sun, Nov 02, 2003 at 10:12:02PM -0600, James Chacon wrote:
> On Sun, Nov 02, 2003 at 11:22:26PM +0000, David Laight wrote:
> > It gets rather anoying when a build fails because the old
> > .depend file references a now deleted file.
> 
> I agree here. A build with UPDATE=1 should be able to figure out dependencies
> and continue.

You don't want it to work out all the dependencies again - that would
take too long.  But is is very annoying when a broken .depend file is used.

> > The patch forces the .depend file to be regenerated if any of the
> > referenced files has been deleted.
> > 
> > Note that it has to use exists(file) because .PATH has to be applied.
> > (the shell read handles the continuation lines...)
> > 
> > Thoughts?
> 
> How much overhead does this add to a build? i.e. have you measured pre-patch
> and post-patch for a static tree?

Times for make depend in src/sys/arch/i386/stand:
new:       25.77 real        16.84 user        13.94 sys
old:       15.47 real        14.61 user         3.96 sys

I think the difference is almost entirely down to the shell doing
single character reads - and is more than I thought it would be.

FWIW an 'nbmake all' in the same directory is:
       11.73 real         9.84 user         2.14 sys
'nbmake depend' after all the .depend d.* files are deleted takes
about 100 second.

	David

-- 
David Laight: david@l8s.co.uk