]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf tools: Fix wrong message when running "make JOBS=1"
authorTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 30 Jul 2024 06:23:00 +0000 (14:23 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 1 Aug 2024 15:11:33 +0000 (12:11 -0300)
There is only one job when running "make JOBS=1", it should
print "sequential build" rather than "parallel build".

Before:

$ cd tools/perf && make JOBS=1
  BUILD:   Doing 'make -j1' parallel build

After:

$ cd tools/perf && make JOBS=1
  BUILD:   Doing 'make -j1' sequential build

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/lkml/20240730062301.23244-2-yangtiezhu@loongson.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile

index 75f3f6e0a2310eff5ea9fad7886ee0121896d845..816d5d84816b3d5319232a1dad7c6c5f45cd0e19 100644 (file)
@@ -51,8 +51,14 @@ else
   override DEBUG = 0
 endif
 
+ifeq ($(JOBS),1)
+  BUILD_TYPE := sequential
+else
+  BUILD_TYPE := parallel
+endif
+
 define print_msg
-  @printf '  BUILD:   Doing '\''make \033[33m-j'$(JOBS)'\033[m'\'' parallel build\n'
+  @printf '  BUILD:   Doing '\''make \033[33m-j'$(JOBS)'\033[m'\'' $(BUILD_TYPE) build\n'
 endef
 
 define make