From: Robert P. J. Day Date: Wed, 13 Apr 2016 17:22:25 -0400 (EDT) Subject: [U-Boot] worth cleaning redundancies out of some board Makefiles? In-Reply-To: <20160413205142.GK13577@bill-the-cat> References: <20160413205142.GK13577@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 13 Apr 2016, Tom Rini wrote: > 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 the visual style for that is all over the place, some files have both styles, so when i get the chance, i'm just going to use whatever style is in the file at the time to be minimally disruptive. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================