Skip to contentSkip to conversation

build: print short version command only for quiet build

PATCH In review Bertrand Jacquin 2 participants 2 messages Feb 27, 2021 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: print short version command only for quiet build

On verbose build, most shell scripts enable set -x making short version command output redundant. On silent build, no output is expected. Hence the short version should only be printed for quiet build.

Signature · 1 line
Bertrand

From d7c757172de9b9d426c5f55381d2dce7c39b0c94 Mon Sep 17 00:00:00 2001
From: Bertrand Jacquin <[email protected]>
Date: Sat, 27 Feb 2021 03:12:11 +0000
Subject: [PATCH] build: print short version command only for quiet build

On verbose build, most shell scripts enable set -x making short version command output redundant. On silent build, no output is expected. Hence the short version should only be printed for quiet build.

---
 kernel/gen_kheaders.sh      | 2 +-
 scripts/adjust_autoksyms.sh | 2 +-
 scripts/link-vmlinux.sh     | 2 +-
 scripts/mkcompile_h         | 2 +-
 scripts/mkmakefile          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
kernel/gen_kheaders.sh +1 -1
index c1510f0ab3ea..8fdc74e3626e 100755
@@ -56,7 +56,7 @@ if [ -f kernel/kheaders.md5 ] &&
 		exit
 fi
 
-if [ "${quiet}" != "silent_" ]; then
+if [ "${quiet}" = "quiet_" ]; then
        echo "  GEN     $tarfile"
 fi
 
scripts/adjust_autoksyms.sh +1 -1
index 2b366d945ccb..b72d38200052 100755
@@ -20,7 +20,7 @@ cur_ksyms_file="include/generated/autoksyms.h"
 new_ksyms_file="include/generated/autoksyms.h.tmpnew"
 
 info() {
-	if [ "$quiet" != "silent_" ]; then
+	if [ "$quiet" = "quiet_" ]; then
 		printf "  %-7s %s\n" "$1" "$2"
 	fi
 }
scripts/link-vmlinux.sh +1 -1
index 3b261b0f74f0..5bb49fa08cdc 100755
@@ -38,7 +38,7 @@ LDFLAGS_vmlinux="$3"
 # Will be supressed by "make -s"
 info()
 {
-	if [ "${quiet}" != "silent_" ]; then
+	if [ "${quiet}" = "quiet_" ]; then
 		printf "  %-7s %s\n" "${1}" "${2}"
 	fi
 }
scripts/mkcompile_h +1 -1
index 4ae735039daf..8f453f7c12e1 100755
@@ -9,7 +9,7 @@ PREEMPT_RT=$5
 CC_VERSION="$6"
 LD=$7
 
-vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
+vecho() { [ "${quiet}" = "quiet_" ] && echo "$@" ; }
 
 # Do not expand names
 set -f
scripts/mkmakefile +1 -1
index 1cb174751429..cf71c588036d 100755
@@ -7,7 +7,7 @@
 # Usage
 # $1 - Kernel src directory
 
-if [ "${quiet}" != "silent_" ]; then
+if [ "${quiet}" = "quiet_" ]; then
 	echo "  GEN     Makefile"
 fi
 
#1 lore raw
Quoted 7 lines · Bertrand Jacquin

On verbose build, most shell scripts enable set -x making short version command output redundant. On silent build, no output is expected. Hence the short version should only be printed for quiet build.

--
Bertrand

It is true this patch will make the short log policy consistent, but V=1 builds will become quieter than the normal builds in some places, which is odd too.

Probably, this is not the direction I want to go in.

Signature · 2 lines
Best Regards
Masahiro Yamada