Re: [patch 5/8] kconfig: add module_name shortcut

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 03, 2008 at 04:52:34PM +0100, Roman Zippel wrote:
> Hi,
> 
> On Mon, 1 Dec 2008, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> 
> > From: Alexey Dobriyan <adobriyan@xxxxxxxxx>
> > 
> > As correctly noticed in bug 11446
> > (http://bugzilla.kernel.org/show_bug.cgi?id=11446) "To compile this driver
> > as a module, blah-blah" boilerplate is being copy-pasted to death with
> > slight variations.
> > 
> > Add Kconfig token "module_name" to supply module's name. Example:
> > 
> > 	config FOO
> > 		tristate "foo"
> > 		module_name foo
> > 		---help---
> > 		  foo
> 
> This syntax is a little inflexible.
> Below is a patch, which integrates modules fully into the kconfig syntax,
> so this is enough:

Thanks Roman - looks good.

> 
> module foo
> 	tristate "foo"
> 
> The config symbol is derived from the module name or can be specified 
> after the name. I also added the option to specify the sources, so that 
> these can be used to generate the Kbuild information.

Do you have any idea how do do this properly on the Kbuild side?
I see a few possibilities but have not made up my mind yet.

1) We could generate a Kbuild.foo file in the dir where we have the module
2) We could add info to auto.conf so we could build all modules defined
   in the configuration in one step

Both alternatives have their drawbacks.

I hesitate to add the patch until we have the kbuild bits sorted out.
I do not ask you to do the kbuild bits - I'm just asking for inputs
on what you have considered when you made this patch.

Have you ever considered the possibility to add the Kconfig info
direct in the .c file so we could have a single file driver for the
typical cases?
It could be a natural extension to what you made so far.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux