Date: 18 Mar 96 14:59:43 GMT From: peter@jhome.DIALix.COM (Peter Wemm) To: freebsd-questions@freebsd.org Subject: Re: KERNEL Message-ID: <peter.827161183@jhome.DIALix.COM> References: <199603180022.KAA21384@genesis.atrad.adelaide.edu.au>, <Pine.BSF.3.91.960317221512.1180B-100000@Kryten.nina.com>
next in thread | previous in thread | raw e-mail | index | archive | help
frankd@yoda.fdt.net (Frank Seltzer) writes:
>> Please post it again, and make sure that you're not using 'config -n'
>> when you generate your compile environment.
>Mike,
>What is the problem caused by using 'config -n'? I use it on every kernel
>compile. Of course I always use 'make depend all install' when compiling.
>Just curious.
>Frank
In a nutshell, because the "-D<option>" settings were in the Makefile which
passed them through on the command line, this is not picked up by
"make depend".
For example, if you have a driver that contains:
foo.c:
...
#ifdef SOME_OPTION
do_something_special();
#endif
...
And you run config with "options SOME_OPTION", it is compiled like this:
cc -c .... -DSOME_OPTION ... foo.c
If you then rerun config -n after having taken out SOME_OPTION,
only the Makefile has changed, and there are no different #include files
for "make depend" to pick up, so the file foo.c is not recompiled when it
most definately should have been.
Also, *never* run "make depend all install".. Because make starts up and
reads in the Makefile and the .depend. Then it rebuilds .depend and starts
compiling based on the *in memory* copy of .depend. It does not load the
new one in. If you want to do it in a single command line, you need
to do something like this: "make depend && make all install". That way,
the "make all" has a complete set of dependencies.
Also, as a BTW, -current is better at this now with the opt_<foo>.h files.
-Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?peter.827161183>
