summaryrefslogtreecommitdiffstats
path: root/tools/build
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-12-23 12:58:32 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-01-06 18:11:13 -0500
commitc6a5f88f335ec43d2850d62bc4924f719d265670 (patch)
treedf47921b208b3f73ae8434fa6024cf31e47bc449 /tools/build
parent76ee2ff342743e57cb6dc059d0aba90e0c4c9bfc (diff)
tools build feature: Introduce feature_assign macro
The feature_assign macro generates feature value assignment for name, like: $(call feature_assign,dwarf) == feature-dwarf=1 This will be used more in following patches. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Wang Nan <wangnan0@huawei.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama <pi3orama@163.com> Link: http://lkml.kernel.org/r/1450893514-9158-4-git-send-email-jolsa@kernel.org [ Rename it to feature_assign, the original shorter name was misleading, to say the least ;-) ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/Makefile.feature8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 20753124c8f4..b1b262eb5bea 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -122,8 +122,14 @@ define feature_print_text_code
122 MSG = $(shell printf '...%30s: %s' $(1) $(2)) 122 MSG = $(shell printf '...%30s: %s' $(1) $(2))
123endef 123endef
124 124
125#
126# generates feature value assignment for name, like:
127# $(call feature_assign,dwarf) == feature-dwarf=1
128#
129feature_assign = feature-$(1)=$(feature-$(1))
130
125FEATURE_DUMP_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER) 131FEATURE_DUMP_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER)
126FEATURE_DUMP := $(foreach feat,$(FEATURE_DISPLAY),feature-$(feat)($(feature-$(feat)))) 132FEATURE_DUMP := $(foreach feat,$(FEATURE_DISPLAY),$(call feature_assign,$(feat)))
127FEATURE_DUMP_FILE := $(shell touch $(FEATURE_DUMP_FILENAME); cat $(FEATURE_DUMP_FILENAME)) 133FEATURE_DUMP_FILE := $(shell touch $(FEATURE_DUMP_FILENAME); cat $(FEATURE_DUMP_FILENAME))
128 134
129# The $(feature_display) controls the default detection message 135# The $(feature_display) controls the default detection message