History

kbuild: clean up ${quiet} checks in shell scripts

There were efforts to make 'make -s' really silent when it is a warning-free build. The conventional way was to let a shell script check ${quiet}, and if it is 'silent_', suppress the stdout by itself. With the previous commit, the 'cmd' takes care of it now. The 'cmd' is also invoked from if_changed, if_changed_dep, and if_changed_rule. You can omit ${quiet} checks in shell scripts when they are invoked from the 'cmd' macro.

Masahiro Yamada committed 5 years ago

Commit c39013e1 parent 174a1dc3 files · +3 −9Browse files

Unified · Split

3 files
  1. kernel/gen_kheaders.sh +1 −3
  2. scripts/link-vmlinux.sh +1 −3
  3. scripts/mkcompile_h +1 −3
kernel/gen_kheaders.sh+1−3
@@ -56,9 +56,7 @@ if [ -f kernel/kheaders.md5 ] && · 55 unmodified lines
5656 exit
5757 fi
5858
59−if [ "${quiet}" != "silent_" ]; then
60− echo " GEN $tarfile"
61−fi
59+echo " GEN $tarfile"
6260
6361 rm -rf $cpio_dir
6462 mkdir $cpio_dir
scripts/link-vmlinux.sh+1−3
@@ -38,9 +38,7 @@ LDFLAGS_vmlinux="$3" · 37 unmodified lines
3838 # Will be supressed by "make -s"
3939 info()
4040 {
41− if [ "${quiet}" != "silent_" ]; then
42− printf " %-7s %s\n" "${1}" "${2}"
43− fi
41+ printf " %-7s %s\n" "${1}" "${2}"
4442 }
4543
4644 # Generate a linker script to ensure correct ordering of initcalls.
scripts/mkcompile_h+1−3
@@ -9,8 +9,6 @@ PREEMPT_RT=$5 · 8 unmodified lines
99 CC_VERSION="$6"
1010 LD=$7
1111
12−vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
13−
1412 # Do not expand names
1513 set -f
1614
@@ -82,7 +80,7 @@ if [ -r $TARGET ] && \ · 65 unmodified lines
8280 cmp -s .tmpver.1 .tmpver.2; then
8381 rm -f .tmpcompile
8482 else
85− vecho " UPD $TARGET"
83+ echo " UPD $TARGET"
8684 mv -f .tmpcompile $TARGET
8785 fi
8886 rm -f .tmpver.1 .tmpver.2