[U-Boot] worth cleaning redundancies out of some board Makefiles?

Tom Rini trini at konsulko.com
Wed Apr 13 22:51:42 CEST 2016


On Wed, Apr 13, 2016 at 09:17:51AM -0400, Robert P. J. Day wrote:

> 
>   again, in my travels, i noticed board Makefiles like, say,
> board/freescale/bsc9131rdb/Makefile:
> 
> 
> ifdef MINIMAL
> 
> obj-y   += spl_minimal.o tlb.o law.o
> 
> else
> 
> obj-y        += bsc9131rdb.o
> obj-y        += ddr.o
> obj-y        += law.o
> obj-y        += tlb.o
> #obj-y          += bsc9131rdb_mux.o
> 
> endif
> 
> 
>   obviously(?), it's redundant to select building tlb.o and law.o in
> both parts of the conditional, when it could look like:
> 
> 
> ifdef MINIMAL
> 
> obj-y   += spl_minimal.o
> 
> else
> 
> obj-y        += bsc9131rdb.o
> obj-y        += ddr.o
> #obj-y          += bsc9131rdb_mux.o
> 
> endif
> 
> obj-y        += law.o
> obj-y        += tlb.o

or even:
obj-y += bsc9131rdb.o ddr.o
endif

obj-y += law.o tlb.o

>   is it worth submitting a patch or two that cleans up that sort of
> thing, perhaps on a vendor-by-vendor basis? i can do that bit by bit
> if it's worth it.

I certainly don't object to making examples that people are likely to
copy from from better.  So in that regard, yes, it is.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160413/c8b45845/attachment.sig>


More information about the U-Boot mailing list