Skip to content
  1. May 27, 2021
    • Masahiro Yamada's avatar
      scripts/setlocalversion: remove mercurial, svn and git-svn supports · 2a73cce2
      Masahiro Yamada authored
      
      
      The mercurial, svn, git-svn supports were added by the following commits:
      
       - 3dce174c ("kbuild: support mercurial in setlocalversion")
      
       - ba3d05fb ("kbuild: add svn revision information to setlocalversion")
      
       - ff80aa97 ("setlocalversion: add git-svn support")
      
      They did not explain why they are useful for the kernel source tree.
      Let's revert all of them, and see if somebody will complain about it.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: default avatarNico Schottelius <nico-linuxsetlocalversion@schottelius.org>
      2a73cce2
    • Masahiro Yamada's avatar
      kbuild: clean up ${quiet} checks in shell scripts · c39013ee
      Masahiro Yamada authored
      
      
      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.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      c39013ee
    • Masahiro Yamada's avatar
      kbuild: sink stdout from cmd for silent build · 174a1dcc
      Masahiro Yamada authored
      When building with 'make -s', no output to stdout should be printed.
      
      As Arnd Bergmann reported [1], mkimage shows the detailed information
      of the generated images.
      
      I think this should be suppressed by the 'cmd' macro instead of by
      individual scripts.
      
      Insert 'exec >/dev/null;' in order to redirect stdout to /dev/null for
      silent builds.
      
      [Note about this implementation]
      
      'exec >/dev/null;' may look somewhat tricky, but this has a reason.
      
      Appending '>/dev/null' at the end of command line is a common way for
      redirection, so I first tried this:
      
        cmd = @set -e; $(echo-cmd) $(cmd_$(1)) >/dev/null
      
      ... but it would not work if $(cmd_$(1)) itself contains a redirection.
      
      For example, cmd_wrap in scripts/Makefile.asm-generic redirects the
      output from the 'echo' command into the target file.
      
      It would be expanded into:
      
        echo "#include <asm-generic/$*.h>" > $@ >/dev/null
      
      Then, the target file gets empty because the string will go to /dev/null
      instead of $@.
      
      Next, I tried this:
      
        cmd = @set -e; $(echo-cmd) { $(cmd_$(1)); } >/dev/null
      
      The form above would be expanded into:
      
        { echo "#include <asm-generic/$*.h>" > $@; } >/dev/null
      
      This works as expected. However, it would be a syntax error if
      $(cmd_$(1)) is empty.
      
      When CONFIG_TRIM_UNUSED_KSYMS is disabled, $(call cmd,gen_ksymdeps) in
      scripts/Makefile.build would be expanded into:
      
        set -e;  { ; } >/dev/null
      
      ..., which causes an syntax error.
      
      I also tried this:
      
        cmd = @set -e; $(echo-cmd) ( $(cmd_$(1)) ) >/dev/null
      
      ... but this causes a syntax error for the same reason.
      
      So, finally I adopted:
      
        cmd = @set -e; $(echo-cmd) exec >/dev/null; $(cmd_$(1))
      
      [1]: https://lore.kernel.org/lkml/20210514135752.2910387-1-arnd@kernel.org/
      
      
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      174a1dcc
    • Masahiro Yamada's avatar
      init: use $(call cmd,) for generating include/generated/compile.h · 41eba23e
      Masahiro Yamada authored
      
      
      The 'cmd' macro shows the short log only when $(quiet) is quiet_.
      Do not do it manually.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      41eba23e
    • Masahiro Yamada's avatar
      kbuild: merge scripts/mkmakefile to top Makefile · 2728fcfa
      Masahiro Yamada authored
      
      
      scripts/mkmakefile is simple enough to be merged in the Makefile.
      
      Use $(call cmd,...) to show the log instead of doing it in the
      shell script.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      2728fcfa
  2. May 26, 2021
  3. May 24, 2021
  4. May 23, 2021
  5. May 22, 2021