[U-Boot] [PATCH v2 2/4] build/mkconfig: Add EXTRA_OPTS argument to make to modify build

McClintock Matthew-B29882 B29882 at freescale.com
Fri Jun 3 22:07:15 CEST 2011


On Fri, Jun 3, 2011 at 2:24 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Friday, June 03, 2011 14:36:03 Matthew McClintock wrote:
>> +if [ -z "${options}" ] ; then
>> +     options=$EXTRA_OPTS
>> +else
>> +     options="$options,$EXTRA_OPTS"
>> +fi
>
> this can be simplified (or at least done in one line) with:
> options=${options:+${options},}${EXTRA_OPTS}
>
> although i can understand that not everyone can grok that at first blush

I'm fine with doing this if it's understandable by all

>
>> +TARGETS+=`echo $EXTRA_OPTS | tr ',' ' '`
>
> you're still using non-portable += append operator
>
> although i dont understand how EXTRA_OPTS can both be extra options and extra
> targets at the same time ...

Actually I just looked over this again and I found a much simpler way
to accomplish the same thing. See my next patch.

-M


More information about the U-Boot mailing list