diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-25 01:16:11 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-27 21:34:10 -0400 |
| commit | 43fee2b238959a7b46e2e8c0cd3305c7c044ded8 (patch) | |
| tree | 930bb1b64865e593bc8bcfc6aedfbe1b675d44aa /scripts | |
| parent | 6b0709f5a50a98df5919ade32fd131dde10bdcb0 (diff) | |
kbuild: do not redirect the first prerequisite for filechk
Currently, filechk unconditionally opens the first prerequisite and
redirects it as the stdin of a filechk_* rule. Hence, every target
using $(call filechk,...) must list something as the first prerequisite
even if it is unneeded.
'< $<' is actually unneeded in most cases. Each rule can explicitly
adds it if necessary.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Kbuild.include | 2 | ||||
| -rw-r--r-- | scripts/Makefile.lib | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 02bb3163cd8d..7eabe80cb9fb 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -56,7 +56,7 @@ kecho := $($(quiet)kecho) | |||
| 56 | define filechk | 56 | define filechk |
| 57 | $(Q)set -e; \ | 57 | $(Q)set -e; \ |
| 58 | mkdir -p $(dir $@); \ | 58 | mkdir -p $(dir $@); \ |
| 59 | $(filechk_$(1)) < $< > $@.tmp; \ | 59 | $(filechk_$(1)) > $@.tmp; \ |
| 60 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ | 60 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
| 61 | rm -f $@.tmp; \ | 61 | rm -f $@.tmp; \ |
| 62 | else \ | 62 | else \ |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f56bb4b8bc60..df0fff252619 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -415,7 +415,7 @@ define filechk_offsets | |||
| 415 | echo " * This file was generated by Kbuild"; \ | 415 | echo " * This file was generated by Kbuild"; \ |
| 416 | echo " */"; \ | 416 | echo " */"; \ |
| 417 | echo ""; \ | 417 | echo ""; \ |
| 418 | sed -ne $(sed-offsets); \ | 418 | sed -ne $(sed-offsets) < $<; \ |
| 419 | echo ""; \ | 419 | echo ""; \ |
| 420 | echo "#endif" ) | 420 | echo "#endif" ) |
| 421 | endef | 421 | endef |
