[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64352c51c5dcbab389201a16733f3157a1ea591e.camel@huaweicloud.com>
Date: Mon, 22 Aug 2022 13:24:28 +0200
From: Roberto Sassu <roberto.sassu@...weicloud.com>
To: Jiri Olsa <olsajiri@...il.com>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
namhyung@...nel.org, quentin@...valent.com,
linux-perf-users@...r.kernel.org, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org,
Roberto Sassu <roberto.sassu@...wei.com>
Subject: Re: [PATCH 3/3] tools/build: Display logical OR of a feature flavors
On Mon, 2022-08-22 at 12:58 +0200, Jiri Olsa wrote:
> On Thu, Aug 18, 2022 at 02:09:57PM +0200,
[...]
>
> > In verbose mode, of if no group is defined for a feature, show the
> > feature
> > detection result as before.
Thanks Jiri.
'or' instead of 'of', if the patch can be edited.
Roberto
> > Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> > ---
> > tools/build/Makefile.feature | 27 +++++++++++++++++++++++++--
> > 1 file changed, 25 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/build/Makefile.feature
> > b/tools/build/Makefile.feature
> > index 6c809941ff01..57619f240b56 100644
> > --- a/tools/build/Makefile.feature
> > +++ b/tools/build/Makefile.feature
> > @@ -137,6 +137,12 @@ FEATURE_DISPLAY ?= \
> > libaio \
> > libzstd
> >
> > +#
> > +# Declare group members of a feature to display the logical OR of
> > the detection
> > +# result instead of each member result.
> > +#
> > +FEATURE_GROUP_MEMBERS-libbfd = libbfd-liberty libbfd-liberty-z
>
> nice, I checked and could not find any other 'flavours' instance
> like libbfd, but it might happen in future
>
> for the whole patchset:
>
> Tested-by: Jiri Olsa <jolsa@...nel.org>
> Acked-by: Jiri Olsa <jolsa@...nel.org>
>
> thanks,
> jirka
>
>
> > +
> > # Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS
> > features.
> > # If in the future we need per-feature checks/flags for features
> > not
> > # mentioned in this list we need to refactor this ;-).
> > @@ -179,8 +185,17 @@ endif
> > #
> > feature_print_status = $(eval $(feature_print_status_code))
> >
> > +feature_group = $(eval $(feature_gen_group)) $(GROUP)
> > +
> > +define feature_gen_group
> > + GROUP := $(1)
> > + ifneq ($(feature_verbose),1)
> > + GROUP += $(FEATURE_GROUP_MEMBERS-$(1))
> > + endif
> > +endef
> > +
> > define feature_print_status_code
> > - ifeq ($(feature-$(1)), 1)
> > + ifneq (,$(filter 1,$(foreach feat,$(call
> > feature_group,$(feat)),$(feature-$(feat)))))
> > MSG = $(shell printf '...%40s: [ \033[32mon\033[m ]' $(1))
> > else
> > MSG = $(shell printf '...%40s: [ \033[31mOFF\033[m ]' $(1))
> > @@ -244,12 +259,20 @@ ifeq ($(VF),1)
> > feature_verbose := 1
> > endif
> >
> > +ifneq ($(feature_verbose),1)
> > + #
> > + # Determine the features to omit from the displayed message, as
> > only the
> > + # logical OR of the detection result will be shown.
> > + #
> > + FEATURE_OMIT := $(foreach
> > feat,$(FEATURE_DISPLAY),$(FEATURE_GROUP_MEMBERS-$(feat)))
> > +endif
> > +
> > feature_display_entries = $(eval $(feature_display_entries_code))
> > define feature_display_entries_code
> > ifeq ($(feature_display),1)
> > $$(info )
> > $$(info Auto-detecting system features:)
> > - $(foreach feat,$(FEATURE_DISPLAY),$(call
> > feature_print_status,$(feat),) $$(info $(MSG)))
> > + $(foreach feat,$(filter-out
> > $(FEATURE_OMIT),$(FEATURE_DISPLAY)),$(call
> > feature_print_status,$(feat),) $$(info $(MSG)))
> > endif
> >
> > ifeq ($(feature_verbose),1)
> > --
> > 2.25.1
> >
Powered by blists - more mailing lists