[U-Boot] [PATCH] [ARM] Moved conditional compile into Makefile

Andreas Engel andreas.engel at ericsson.com
Mon Sep 8 16:44:57 CEST 2008


Wolfgang Denk schrieb:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20080908133035.GB3956 at game.jcrosoft.org> you wrote:
>> what append if CONFIG_PL010_SERIAL and CONFIG_PL011_SERIAL is active at the
>> same time?
> 
> Then something is missing.

In this particular case, this will not work anyway. The driver is not prepared
to support both a PL010 and a PL011 at the same time. And I doubt that there's
some real hardware out there which actually contains both types of uarts.

>> serial_pl01x.c will be compile twice
>>
>> so please move to 
>> +COBJS-$(CONFIG_PL010_SERIAL)$(CONFIG_PL011_SERIAL) += serial_pl01x.o
> 
> This alone is not sufficient, since then you need to add a  rule  for
> the resulting COBJS-yy.

There's already such a rule in common/Makefile.

> But as I learned all of this is completely unnecessary.
> 
> As Detlev Zundel pointed out, just doing "COBJS-y = $(sort COBJS-y)"
> would fix any such problems in a clean and readable way.
> 
> I recommend to add such a statement instead.

Yes, that's definitely better, as it also catches cases with more than
two y's.

Regards,
  Andreas



More information about the U-Boot mailing list