[U-Boot] why is the compilation of cmd_pcmcia.c hardcoded?
    Ben Warren 
    biggerbadderben at gmail.com
       
    Wed Nov 18 18:37:18 CET 2009
    
    
  
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
    
    
More information about the U-Boot
mailing list