diff mbox series

[03/13] kbuild: use assignment instead of define ... endef for filechk_* rules

Message ID 20250531084449.4125187-3-ilias.apalodimas@linaro.org
State New
Headers show
Series [01/13] kbuild: add -fno-PIE flag unconditionally | expand

Commit Message

Ilias Apalodimas May 31, 2025, 8:44 a.m. UTC
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   | 7 +++----
 scripts/kconfig/Makefile | 4 +---
 2 files changed, 4 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index c0d3440a4b3e..fd7a744478fc 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -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
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index ba30652f01aa..f0f93c56bdb5 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -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)