simplifying the linux MTD Kconfig/Makefile structure

Artem Bityutskiy dedekind1 at gmail.com
Fri Apr 23 08:05:46 EDT 2010


On Tue, 2010-03-30 at 08:29 -0400, Robert P. J. Day wrote:
> it seems like the various Kconfigs and Makefiles related to MTD
> could be tightened up a bit.  for instance, in drivers/mtd/Makefile:
> 
>   obj-$(CONFIG_MTD_UBI)           += ubi/
> 
> but given that selection, it's kind of redundant to then have
> drivers/mtd/ubi/Makefile start with:
> 
>   obj-$(CONFIG_MTD_UBI) += ubi.o
> 
> is it not?  why not just "obj-y"?
> 
>   along those lines, again from drivers/mtd/Makefile:
> 
> obj-y           += chips/ lpddr/ maps/ devices/ nand/ onenand/ tests/
> 
> obj-$(CONFIG_MTD_UBI)           += ubi/
> 
>   why not be consistent and have:
> 
> obj-y           += chips/ lpddr/ maps/ devices/ nand/ onenand/
> 
> obj-$(CONFIG_MTD_UBI)           += ubi/
> obj-$(CONFIG_MTD_TESTS)         += tests/
> 
> which would *massively* simplify drivers/mtd/tests/Makefile, would it
> not?
> 
>   i can submit some patches if there's any interest.  i suspect some
> of the other directories could be similarly tidied up.

Sounds like a reasonable clean-up to me.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list