From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Wed, 18 Nov 2009 09:37:18 -0800 Subject: [U-Boot] why is the compilation of cmd_pcmcia.c hardcoded? In-Reply-To: References: Message-ID: <4B0430CE.6020802@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Robert, Robert P. J. Day wrote: > i'm curious as to why common/Makefile hardcodes the compilation of > cmd_pcmcia.c thusly: > > COBJS-y += cmd_pcmcia.o > > since i'm interested in building for a beagleboard, i have no interest > in PCMCIA support, yet that source file will be compiled for me, even > though the selection macro CONFIG_CMD_PCMCIA does exist and is defined > by a number of other board configurations. > > what seems stranger is that, even though that config macro exists, > it isn't used in the Makefile but *is* tested in the source file > itself to determine whether the "pinit" command will be compiled: > > ===== > #if defined(CONFIG_CMD_PCMCIA) > If you look at the source code tree from a couple of years ago you'll see that the pattern you've discovered used to be the norm. Over time, people have been removing the source file wrappers and moving conditionality to the Makefiles. It's a work in progress, and help fixing things up is always appreciated. regards, Ben