Re: Working on smartconfig

James Mastros (root@jennifer-unix.dyn.ml.org)
Sun, 5 Apr 1998 11:15:04 -0400 (EDT)


On Sun, 5 Apr 1998 ranty@soon.com wrote:
> On Sat, 4 Apr 1998, Michael Elizabeth Chastain wrote:
> > Here is the bad news: Smart Config is already in the kernel!
> > Look at Documentation/smart-config.txt to see how it works. It
> > actually works while still using '#include <linux/config.h>' in
> > all the source, which saved the 300k diff. Also look at
> > scripts/mkdep.c.
>
> In case someone else misunderstod me I will clear it up, I am
> working on all does 600 or so files which still use the old "#include
> <linux/config.h>" and all that "#include"ing is what I think is
> needed to use all the little headers in include/config/.

The bad news is that the work you did is unneccessary -- you wasted your
time. The good news is that the work you did is unneccessary -- you don't
need to complete it, test it, etc.

The way smartconfig works in a nutshell (mec -- please, correct me if I'm
wrong) is this:
The kernel, in the "make dep" and whenever it thinks it needs to,
automaticly finds what header files each individual sorce file references,
so that when these headers change the files that reference them would be
rebuilt. This process normaly just takes the paths of all the files
#included into each file -- but <linux/config.h> is treated specialy. If a
file references linux/config.h, this reference is automagicly converted to
references to one or more of the little headers in include/config/ for
purposes of dependances. Though during the acatuall compile, all of
linux/config.h is included, we only consider the file dependent on a couple
of the options. Presto, no changes needed in most of the code.

-=- James Mastros

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu