tools build: Allow deferring printing the results of feature detection

By setting FEATURE_DISPLAY_DEFERRED=1 a tool may ask for the printout
of the detected features in tools/build/Makefile.feature to be done
later adter extra feature checks are done that are tool specific.

The perf tool will do it via its tools/perf/Makefile.config, as it
performs such extra feature checks.

Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-04-26 17:01:24 -03:00
Родитель fbed59f844
Коммит 19177bc3da
1 изменённых файлов: 17 добавлений и 10 удалений

Просмотреть файл

@ -240,17 +240,24 @@ ifeq ($(VF),1)
feature_verbose := 1 feature_verbose := 1
endif endif
ifeq ($(feature_display),1) feature_display_entries = $(eval $(feature_display_entries_code))
$(info ) define feature_display_entries_code
$(info Auto-detecting system features:) ifeq ($(feature_display),1)
$(foreach feat,$(FEATURE_DISPLAY),$(call feature_print_status,$(feat),)) $(info )
ifneq ($(feature_verbose),1) $(info Auto-detecting system features:)
$(foreach feat,$(FEATURE_DISPLAY),$(call feature_print_status,$(feat),))
ifneq ($(feature_verbose),1)
$(info )
endif
endif
ifeq ($(feature_verbose),1)
TMP := $(filter-out $(FEATURE_DISPLAY),$(FEATURE_TESTS))
$(foreach feat,$(TMP),$(call feature_print_status,$(feat),))
$(info ) $(info )
endif endif
endif endef
ifeq ($(feature_verbose),1) ifeq ($(FEATURE_DISPLAY_DEFERRED),)
TMP := $(filter-out $(FEATURE_DISPLAY),$(FEATURE_TESTS)) $(call feature_display_entries)
$(foreach feat,$(TMP),$(call feature_print_status,$(feat),))
$(info )
endif endif