[Buildroot] [PATCH v2] autotools: add with/without and enable/disable helpers

Paulius Zaleckas paulius.zaleckas at gmail.com
Fri Nov 19 12:49:54 UTC 2010


On Fri, Nov 19, 2010 at 1:24 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Friday, November 19, 2010 06:13:26 Thomas Petazzoni wrote:
>> So typically, one would do:
>>
>> SDL_MIXER_CONF_OPT += $(call USE_ENABLE,PACKAGE_LIBVORBIS,music-ogg)
>> SDL_MIXER_DEPENDENCIES-$(BR2_PACKAGE_LIBVORBIS) += libvorbis
>>
>> what about doing something more consistent, like:
>>
>> SDL_MIXER_CONF_OPT     += $(call USE_ENABLE,PACKAGE_LIBVORBIS,music-ogg)
>> SDL_MIXER_DEPENDENCIES += $(call USE_DEP,PACKAGE_LIBVORBIS,libvorbis)
>>
>> I know it's a litte bit more characters that the previous solution, but
>> it looks more consistent to me.
>
> personally, i prefer to stick to the kconfig syntax where possible.  the only
> reason for USE_ENABLE is that we need to expand into different text strings.
>
>> > +_USE_CONF = $(if $(BR2_$(3)), --$(1)-$(4)$(if $(5),=$(5)),
>> > --$(2)-$(4))
>>
>> What about testing directly BR2_PACKAGE_$(3), since all packages are
>> prefixed by BR2_PACKAGE_ ?
>
> if that's the case, then there's no reason
>
> in the original implementation, i avoided making the 2nd argument optional.
> this was because i'd have to execute tr or something to do lower->upper.  but
> if it's all in make now, it should be possible to support the syntax:
>        $(call USE_ENABLE,libvorbis)
> the 1st arg would always be passed through the UPPERCASE helper, and hte 2nd
> arg would default to the 1st.

I believe he means BR2_PACKAGE_$(3) instead of BR2_$(3), not to get rid of it.



More information about the buildroot mailing list