kbuild: use assignment instead of define ... endef for filechk_* rules
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Wed, 11 Jun 2025 20:24:30 +0000 (23:24 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 11 Jun 2025 22:21:36 +0000 (16:21 -0600)
Backported from kernel
commit ba97df45581f ("kbuild: use assignment instead of define ... endef for filechk_* rules")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
scripts/Kbuild.include
scripts/kconfig/Makefile

index c0d3440..fd7a744 100644 (file)
@@ -49,11 +49,10 @@ kecho := $($(quiet)kecho)
 ###
 # filechk is used to check if the content of a generated file is updated.
 # Sample usage:
-# define filechk_sample
-#      echo $KERNELRELEASE
-# endef
-# version.h : Makefile
+# filechk_sample = echo $(KERNELRELEASE)
+# version.h: FORCE
 #      $(call filechk,sample)
+#
 # The rule defined shall write to stdout the content of the new file.
 # The existing file will be compared with the new one.
 # - If no file exist it is created
index ba30652..f0f93c5 100644 (file)
@@ -220,9 +220,7 @@ $(obj)/gconf.o: $(obj)/.gconf-cfg
 $(obj)/zconf.tab.o: $(obj)/zconf.lex.c
 
 # check if necessary packages are available, and configure build flags
-define filechk_conf_cfg
-       $(CONFIG_SHELL) $<
-endef
+filechk_conf_cfg = $(CONFIG_SHELL) $<
 
 $(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE
        $(call filechk,conf_cfg)