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 | |
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>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls/Makefile | 6 | ||||
-rw-r--r-- | arch/um/Makefile | 2 | ||||
-rw-r--r-- | scripts/Kbuild.include | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 2 |
5 files changed, 7 insertions, 7 deletions
@@ -1117,7 +1117,7 @@ define filechk_version.h | |||
1117 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) | 1117 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) |
1118 | endef | 1118 | endef |
1119 | 1119 | ||
1120 | $(version_h): $(srctree)/Makefile FORCE | 1120 | $(version_h): FORCE |
1121 | $(call filechk,version.h) | 1121 | $(call filechk,version.h) |
1122 | $(Q)rm -f $(old_version_h) | 1122 | $(Q)rm -f $(old_version_h) |
1123 | 1123 | ||
diff --git a/arch/s390/kernel/syscalls/Makefile b/arch/s390/kernel/syscalls/Makefile index 8ff96c08955f..4d929edc80a6 100644 --- a/arch/s390/kernel/syscalls/Makefile +++ b/arch/s390/kernel/syscalls/Makefile | |||
@@ -25,15 +25,15 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ | |||
25 | $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') | 25 | $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') |
26 | 26 | ||
27 | define filechk_syshdr | 27 | define filechk_syshdr |
28 | $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" | 28 | $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $< |
29 | endef | 29 | endef |
30 | 30 | ||
31 | define filechk_sysnr | 31 | define filechk_sysnr |
32 | $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) | 32 | $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $< |
33 | endef | 33 | endef |
34 | 34 | ||
35 | define filechk_syscalls | 35 | define filechk_syscalls |
36 | $(CONFIG_SHELL) '$(systbl)' -S | 36 | $(CONFIG_SHELL) '$(systbl)' -S < $< |
37 | endef | 37 | endef |
38 | 38 | ||
39 | syshdr_abi_unistd_32 := common,32 | 39 | syshdr_abi_unistd_32 := common,32 |
diff --git a/arch/um/Makefile b/arch/um/Makefile index e54dda8a0363..8c35261f5706 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -169,7 +169,7 @@ define filechk_gen-asm-offsets | |||
169 | echo " *"; \ | 169 | echo " *"; \ |
170 | echo " */"; \ | 170 | echo " */"; \ |
171 | echo ""; \ | 171 | echo ""; \ |
172 | sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ | 172 | sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" < $<; \ |
173 | echo ""; ) | 173 | echo ""; ) |
174 | endef | 174 | endef |
175 | 175 | ||
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 |