From: Robert P. J. Day Date: Wed, 13 Apr 2016 17:54:22 -0400 (EDT) Subject: [U-Boot] worth cleaning redundancies out of some board Makefiles? In-Reply-To: <20160413212452.76765101313@atlas.denx.de> References: <20160413212452.76765101313@atlas.denx.de> 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, Wolfgang Denk wrote: > Dear Robert, > > In message you wrote: > > > > again, in my travels, i noticed board Makefiles like, say, > > board/freescale/bsc9131rdb/Makefile: > ... > > obviously(?), it's redundant to select building tlb.o and law.o in > > both parts of the conditional, when it could look like: > ... > > 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. > > Yes! All such cleanup patches are much appreciated, both for the > better code and for the educational effect. Of course, this is just > my 0.02? ... doesn't take long to start seeing the recurring patterns in those Makefiles. :-) a couple oddities, lines like this: obj-y = m5208evbe.o obj-y := mpc5121ads.o is there a rationale for using either of "=" or ":=" in those Makefiles, as opposed to the ubiquitous "+="? surely in those cases, there is absolutely no functional difference, but the sudden change in operator can be confusing. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================