aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-01-02 20:16:54 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-01-05 20:22:35 -0500
commitba97df45581f09a987ffa38444c33ed6a0a9479e (patch)
tree82ac6f321415ebfad378c249abb1779aeeb95c59 /scripts
parentd6e4b3e326d8b44675b9e19534347d97073826aa (diff)
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 <yamada.masahiro@socionext.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include8
-rw-r--r--scripts/kconfig/Makefile4
2 files changed, 5 insertions, 7 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 74a3fe7ddc01..525bff667a52 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -41,11 +41,11 @@ kecho := $($(quiet)kecho)
41### 41###
42# filechk is used to check if the content of a generated file is updated. 42# filechk is used to check if the content of a generated file is updated.
43# Sample usage: 43# Sample usage:
44# define filechk_sample 44#
45# echo $KERNELRELEASE 45# filechk_sample = echo $(KERNELRELEASE)
46# endef 46# version.h: FORCE
47# version.h : Makefile
48# $(call filechk,sample) 47# $(call filechk,sample)
48#
49# The rule defined shall write to stdout the content of the new file. 49# The rule defined shall write to stdout the content of the new file.
50# The existing file will be compared with the new one. 50# The existing file will be compared with the new one.
51# - If no file exist it is created 51# - If no file exist it is created
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index ec204fa54c9a..679e62e5a15c 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -201,9 +201,7 @@ HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags)
201$(obj)/gconf.o: $(obj)/.gconf-cfg 201$(obj)/gconf.o: $(obj)/.gconf-cfg
202 202
203# check if necessary packages are available, and configure build flags 203# check if necessary packages are available, and configure build flags
204define filechk_conf_cfg 204filechk_conf_cfg = $(CONFIG_SHELL) $<
205 $(CONFIG_SHELL) $<
206endef
207 205
208$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE 206$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE
209 $(call filechk,conf_cfg) 207 $(call filechk,conf_cfg)