Subject: Re: Auto creating depend files
To: matthew green <email@example.com>
From: Simon J. Gerraty <firstname.lastname@example.org>
Date: 12/15/2003 18:04:18
> This means that incorrect dependencies are used the first time a source
> file is rebuilt, but after that they self correct. It also completely
> removes the need for a 'make depend' pass.
>i think this is actually a step backwards. we may lose the make depend
>step, but we gain incorrectness... now i have to run 'make all' twice
>to be sure, which is _way_ slower than 'make dependall' once.
That hasn't been my experience. I've been using this same autodep procedure
for about 3 years. All that is needed is for a simple dependency rule in
a makefile to take effect when .depend is missing. Under almost any other
circumstance the autogenerated .depend is as accurate as can be obtained
by a separate depend pass. The only hiccup is .depend containing a
reference to a now defunct header - but marking headers in .depend
as .OPTIONAL seems to take care of that.
Even without that, over the last 3 years with about 100 engineers busily
working on a code base similar to netbsd, the need to make clean in
a directory due to a broken .depend (due to a renamed/removed header)
is quite rare.
I.e autodep has proven to be a net win.