tools/perf/build: Standardize the various messages output by parallel make
authorIngo Molnar <mingo@kernel.org>
Wed, 2 Oct 2013 09:58:30 +0000 (11:58 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 9 Oct 2013 06:48:56 +0000 (08:48 +0200)
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-mky0rtpwxi3ivxsvdjoOEmhr@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/perf/Makefile
tools/perf/config/Makefile

index ce7874b73dd9929499084e020cf77fd8097b4aa1..3b925ad0d5f5899abbfd0bc3d0a2ba80014e0ef1 100644 (file)
@@ -13,13 +13,30 @@ endif
 
 export JOBS
 
-$(info $(shell printf '# [ perf build: Doing '\''make \033[33m-j'$(JOBS)'\033[m'\'' parallel build. ]\n'))
+define print_msg
+  @printf '    BUILD: Doing '\''make \033[33m-j'$(JOBS)'\033[m'\'' parallel build\n'
+endef
+
+define make
+  @$(MAKE) -f Makefile.perf --no-print-directory -j$(JOBS) $@
+endef
 
 #
 # Needed if no target specified:
 #
 all:
-       @$(MAKE) -f Makefile.perf --no-print-directory -j$(JOBS) $@
+       $(print_msg)
+       $(make)
+
+#
+# The clean target is not really parallel, don't print the jobs info:
+#
+clean:
+       $(make)
 
+#
+# All other targets get passed through:
+#
 %:
-       @$(MAKE) -f Makefile.perf --no-print-directory -j$(JOBS) $@
+       $(print_msg)
+       $(make)
index fb6ec069f541e219b21bff49aa1d049374426b2c..62d02cd03f29d184b28df5967ecc563f5c5bd913 100644 (file)
@@ -179,9 +179,9 @@ endif
 feature_print = $(eval $(feature_print_code))
 define feature_print_code
   ifeq ($(feature-$(1)), 1)
-    MSG := $(shell printf '...%30s: [ \033[32mon\033[m  ]' $(1))
+    MSG = $(shell printf '...%30s: [ \033[32mon\033[m  ]' $(1))
   else
-    MSG := $(shell printf '...%30s: [ \033[31mOFF\033[m ]' $(1))
+    MSG = $(shell printf '...%30s: [ \033[31mOFF\033[m ]' $(1))
   endif
   $(info $(MSG))
 endef