summaryrefslogtreecommitdiff
path: root/tools/build/Makefile.feature
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2021-04-26 17:01:24 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-04-29 10:31:00 -0300
commit19177bc3da7e52bc7fb7e603556f98f06e074092 (patch)
tree62eb6659f3099f4dbdc7539249820412d147eeb3 /tools/build/Makefile.feature
parentfbed59f844912f377b83cc25594c692b5f6ebae2 (diff)
downloadlinux-next-19177bc3da7e52bc7fb7e603556f98f06e074092.tar.gz
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>
Diffstat (limited to 'tools/build/Makefile.feature')
-rw-r--r--tools/build/Makefile.feature27
1 files changed, 17 insertions, 10 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index b3221a43fa65..04a8e3db8a54 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -240,17 +240,24 @@ ifeq ($(VF),1)
feature_verbose := 1
endif
-ifeq ($(feature_display),1)
- $(info )
- $(info Auto-detecting system features:)
- $(foreach feat,$(FEATURE_DISPLAY),$(call feature_print_status,$(feat),))
- ifneq ($(feature_verbose),1)
+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),))
+ ifneq ($(feature_verbose),1)
+ $(info )
+ endif
endif
-endif
-ifeq ($(feature_verbose),1)
- TMP := $(filter-out $(FEATURE_DISPLAY),$(FEATURE_TESTS))
- $(foreach feat,$(TMP),$(call feature_print_status,$(feat),))
- $(info )
+ ifeq ($(feature_verbose),1)
+ TMP := $(filter-out $(FEATURE_DISPLAY),$(FEATURE_TESTS))
+ $(foreach feat,$(TMP),$(call feature_print_status,$(feat),))
+ $(info )
+ endif
+endef
+
+ifeq ($(FEATURE_DISPLAY_DEFERRED),)
+ $(call feature_display_entries)
endif