[Buildroot] [PATCH v3, 3/6] package/collectd: add DPDK_TELEMETRY option

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Apr 20 05:16:23 UTC 2020


On Sun, 19 Apr 2020 23:14:56 +0200
"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:

> > @@ -186,6 +188,9 @@ COLLECTD_DEPENDENCIES = \
> >  ifeq ($(BR2_PACKAGE_GRPC),y)
> >  COLLECTD_CONF_OPTS += --with-libgrpc++=$(STAGING_DIR)/usr
> >  endif
> > +ifeq ($(BR2_PACKAGE_JANSSON),y)
> > +COLLECTD_CONF_OPTS += --with-libjansson=$(STAGING_DIR)/usr
> > +endif  
> 
> This code is bugging me: it decorelates the --enable/disable options,
> the dependencies and the --with option.
> 
> With this patch, this means that is jansoon is enabled, but DPDK
> telemetry is not, then we still pass --with-libjansson.

If libjansson is only detected/used when --enable-dpdk-telemetry is
passed, then I agree with you.

> I think the $(if blabla,--enable-bla,--disable-bla) construct should be
> limited to thos options that do not require a dependency or another
> --with option. If it does, then we should revert to using the
> traditional conditional block:

I agree that I don't like how collectd.mk is written today. I very much
prefer each option to be handled in one place, like you illustrated
below, rather than handling separately the <pkg>_DEPENDENCIES part and
the <pkg>_CONF_OPTS part.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list