diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-10-02 04:01:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:54 -0400 |
commit | b3b64a12239e758573316df19cbbaf0126887440 (patch) | |
tree | 014ba26fbb8e31cd840cdbd75274be391732cd99 /tools/perf/config/Makefile | |
parent | f1138ec66e839ce90c58af0c264db33271d73466 (diff) |
tools/perf/build: Improve printout-of auto-detected features
Change the print-out of auto-detected features by making sure that
repeat invocations of 'make' when all features are successfully
detected do not produce the (rather lengthy) autodetection printout.
( When one or more features are missing then we still print out the
feature detection table, to make sure people are aware of the
resulting limitations. )
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-qd8sMsshcjomxqx9bQcufmaa@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/config/Makefile')
-rw-r--r-- | tools/perf/config/Makefile | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 581a94211fea..fb6ec069f541 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -102,8 +102,6 @@ endef | |||
102 | # | 102 | # |
103 | # Build the feature check binaries in parallel, ignore errors, ignore return value and suppress output: | 103 | # Build the feature check binaries in parallel, ignore errors, ignore return value and suppress output: |
104 | # | 104 | # |
105 | $(info ) | ||
106 | $(info Auto-detecting system features:) | ||
107 | 105 | ||
108 | # | 106 | # |
109 | # Note that this is not a complete list of all feature tests, just | 107 | # Note that this is not a complete list of all feature tests, just |
@@ -137,9 +135,33 @@ CORE_FEATURE_TESTS = \ | |||
137 | volatile-register-var | 135 | volatile-register-var |
138 | 136 | ||
139 | # | 137 | # |
138 | # So here we detect whether test-all was rebuilt, to be able | ||
139 | # to skip the print-out of the long features list if the file | ||
140 | # existed before and after it was built: | ||
141 | # | ||
142 | ifeq ($(wildcard config/feature-checks/test-all),) | ||
143 | test-all-failed := 1 | ||
144 | else | ||
145 | test-all-failed := 0 | ||
146 | endif | ||
147 | |||
148 | # | ||
140 | # Special fast-path for the 'all features are available' case: | 149 | # Special fast-path for the 'all features are available' case: |
141 | # | 150 | # |
142 | $(call feature_check,all) | 151 | $(call feature_check,all,$(MSG)) |
152 | |||
153 | # | ||
154 | # Just in case the build freshly failed, make sure we print the | ||
155 | # feature matrix: | ||
156 | # | ||
157 | ifeq ($(feature-all), 0) | ||
158 | test-all-failed := 1 | ||
159 | endif | ||
160 | |||
161 | ifeq ($(test-all-failed),1) | ||
162 | $(info ) | ||
163 | $(info Auto-detecting system features:) | ||
164 | endif | ||
143 | 165 | ||
144 | ifeq ($(feature-all), 1) | 166 | ifeq ($(feature-all), 1) |
145 | # | 167 | # |
@@ -151,11 +173,10 @@ else | |||
151 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat))) | 173 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat))) |
152 | endif | 174 | endif |
153 | 175 | ||
154 | feature_print = $(eval $(feature_print_code)) | ||
155 | |||
156 | # | 176 | # |
157 | # Print the result of the feature test: | 177 | # Print the result of the feature test: |
158 | # | 178 | # |
179 | feature_print = $(eval $(feature_print_code)) | ||
159 | define feature_print_code | 180 | define feature_print_code |
160 | ifeq ($(feature-$(1)), 1) | 181 | ifeq ($(feature-$(1)), 1) |
161 | MSG := $(shell printf '...%30s: [ \033[32mon\033[m ]' $(1)) | 182 | MSG := $(shell printf '...%30s: [ \033[32mon\033[m ]' $(1)) |
@@ -165,10 +186,13 @@ define feature_print_code | |||
165 | $(info $(MSG)) | 186 | $(info $(MSG)) |
166 | endef | 187 | endef |
167 | 188 | ||
168 | $(foreach feat,$(CORE_FEATURE_TESTS) DUMMY,$(call feature_print,$(feat))) | 189 | # |
169 | 190 | # Only print out our features if we rebuilt the testcases or if a test failed: | |
170 | # newline at the end of the feature printouts: | 191 | # |
171 | $(info ) | 192 | ifeq ($(test-all-failed), 1) |
193 | $(foreach feat,$(CORE_FEATURE_TESTS) DUMMY,$(call feature_print,$(feat))) | ||
194 | $(info ) | ||
195 | endif | ||
172 | 196 | ||
173 | ifeq ($(feature-stackprotector-all), 1) | 197 | ifeq ($(feature-stackprotector-all), 1) |
174 | CFLAGS += -fstack-protector-all | 198 | CFLAGS += -fstack-protector-all |