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
56 exit56 exit
57fi57fi
58 58
59if [ "${quiet}" != "silent_" ]; then59echo " GEN $tarfile"
60 echo " GEN $tarfile"
61fi
62 60
63rm -rf $cpio_dir61rm -rf $cpio_dir
64mkdir $cpio_dir62mkdir $cpio_dir
scripts/link-vmlinux.sh+1−3
@@ -38,9 +38,7 @@ LDFLAGS_vmlinux="$3" · 37 unmodified lines
38# Will be supressed by "make -s"38# Will be supressed by "make -s"
39info()39info()
40{40{
41 if [ "${quiet}" != "silent_" ]; then41 printf " %-7s %s\n" "${1}" "${2}"
42 printf " %-7s %s\n" "${1}" "${2}"
43 fi
44}42}
45 43
46# Generate a linker script to ensure correct ordering of initcalls.44# 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
9CC_VERSION="$6"9CC_VERSION="$6"
10LD=$710LD=$7
11 11
12vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
13
14# Do not expand names12# Do not expand names
15set -f13set -f
16 14
@@ -82,7 +80,7 @@ if [ -r $TARGET ] && \ · 65 unmodified lines
82 cmp -s .tmpver.1 .tmpver.2; then80 cmp -s .tmpver.1 .tmpver.2; then
83 rm -f .tmpcompile81 rm -f .tmpcompile
84else82else
85 vecho " UPD $TARGET"83 echo " UPD $TARGET"
86 mv -f .tmpcompile $TARGET84 mv -f .tmpcompile $TARGET
87fi85fi
88rm -f .tmpver.1 .tmpver.286rm -f .tmpver.1 .tmpver.2