Subject: Re: FYI: more options defop'ted: DDB, network protocols, COMPAT_*
To: None <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 07/05/1998 17:30:46
[ On Sun, July 5, 1998 at 14:00:42 (-0700), Jonathan Stone wrote: ]
> Subject: Re: FYI:  more options defop'ted: DDB, network protocols, COMPAT_*
>
> It's OK if you only rerun make config once, but if you change options
> and rerun config more than once, you can still get hosed.  Suppose you
> start with an up-to-date .depend:
> 
> Step 1: Add some options whcih add new .o files.
>         run config but not make depend.
>  	Okay so far.

This is effectively what I meant by "adding source".  Clearly this will
not be safe for more than one iteration since at this point make won't
know if the new *.o's depend upon something else that might change, be
it a generated file, or not.  In this sense it is not "Okay so far"
because this is exactly where time to forget might elapse and the
programmer may be screwed the next time around and end up having to
"make clean" anyway.

Perhaps there should be an option (possbily the default) to config(8)
that would cause it to run "make depend" unless it knows that only
defopt'ed options ahve been changed.  In theory the only time a sane
person would want to disable such a feature would be in the case where
they were certain either "make clean" or "rm *" would be run immediately
after copying out the kernel to a safe place.

For people who can build new kernels from scratch in five minutes or
less none of this really matters, but this is not generally possible for
the average self-hosting NetBSD port.  ;-)

> Yes, please do. Most documented options are now defopt'ed, so it may
> make more sense to note the options which _aren't_ (though may be more
> work to keep up-to-date that way).

I had been thinking that in the interest of only describing the safest
build process it might be better that the only options to be mentioned
as not requiring a fresh "make depend" are those which only affect
generated (i.e. opt_*.h) files which bill already be listed in .depend
as dependencies for existing *.o's.  On the other hand if the count is
really that lop-sided, perhaps it would be better to mention something
akin to "(must re-run ``make depend'' after changing)" for those that
are not ``defopt'ed''.

I consider it a fairly serious bug whenever options(4) is not updated
whenever a kernel option is added, removed, or changed, regardless of
whether it's one that only affects auto-generated files or not (and
similarly for any other documentation skew problems introduced by
changing only the code).

-- 
							Greg A. Woods

+1 416 443-1734      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>