kbuild: use assignment instead of define ... endef for filechk_* rules

You do not have to use define ... endef for filechk_* rules.

For simple cases, the use of assignment looks cleaner, IMHO.

I updated the usage for scripts/Kbuild.include in case somebody
misunderstands the 'define ... endif' is the requirement.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Heiko Carstens <[email protected]>
This commit is contained in:
Masahiro Yamada 2019-01-03 10:16:54 +09:00
commit ba97df4558
6 changed files with 12 additions and 26 deletions

4
Kbuild
View file

@ -26,9 +26,7 @@ timeconst-file := include/generated/timeconst.h
targets += $(timeconst-file)
define filechk_gentimeconst
echo $(CONFIG_HZ) | bc -q $<
endef
filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
$(timeconst-file): kernel/time/timeconst.bc FORCE
$(call filechk,gentimeconst)