Re: [PATCH] Re: crc32 and lib.a (was Re: [PATCH] nbd in 2.5.3 does

Jeff Garzik (garzik@havoc.gtf.org)
Thu, 31 Jan 2002 23:48:45 -0500


On Thu, Jan 31, 2002 at 08:25:09PM -0800, David S. Miller wrote:
> From: Jeff Garzik <garzik@havoc.gtf.org>
> Date: Thu, 31 Jan 2002 22:46:35 -0500
>
> Maybe not in this hypothetical future situation, but currently makefile
> magic was added for crc32 specifically to ensure that it is linked
> in when needed... even when CONFIG_CRC32=n.
>
> The Config.in for crc32 only exists for the case where no driver in the
> built kernel uses it... but a 3rd party module might want it.
>
> My point is this: Having to say something like "CONFIG_INEED_CRC32"
> for each driver that needs it is just plain stupid and a total eye
> sore.

I agree.

This is -not- the situation now, and it will never be the situation.

Did you read drivers/net/Makefile.lib ?

Another example, take a look at drivers/video/Config.in. We actually do
not need those hideously long if statements "if foofb or barfb or bazfb"...
Makefile rules clean that shit up nicely.

> It would be really great if, some day, you just add your source
> file(s) to drivers/net and that is the only thing you ever touch. You
> DO NOT touch Makefiles, you DO NOT touch Config.in files, you DO NOT
> add Config.help entries.

You are preaching to the choir. ;-)

> The Makefile rules are auto-generated from keys in the *.c file(s), as
> are the Config.in and help entries. Ie. cp driver.[ch]
> linux/drivers/net and then simply rebuild the tree.

Close... Check out this thread from December. I agree with Linus
we need metadata files (driver.conf), not yanking all that info out
of the source code.

http://www.uwsg.iu.edu/hypermail/linux/kernel/0112.3/0969.html
and
http://www.uwsg.iu.edu/hypermail/linux/kernel/0112.3/0801.html

To sum, Makefile rules are better than Config.in garbage because it can
be far more modular, and more resistant to breakage. But, for the
longer term, we want 8139too.conf and lance.conf and...

Regards,

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/