From f8ff088b98dbf9cd03916f5c3e73bec434fd2bfe Mon Sep 17 00:00:00 2001 From: hanzhijian Date: Sun, 5 Jul 2026 09:33:30 +0800 Subject: [PATCH] tools: pass TOPDIR in SDIR_template and MAKE_template SDIR_template and MAKE_template did not pass TOPDIR to recursive makes. When a sub-make needed to include $(TOPDIR)/Make.defs (e.g. to define SDIR_template for further recursion), TOPDIR was missing and the include silently failed via '-include'. Pass TOPDIR in both templates so recursive makes have full access to the build system configuration. Signed-off-by: hanzhijian --- tools/Config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Config.mk b/tools/Config.mk index e767c148269..49020965636 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -768,13 +768,13 @@ endif # Invoke make define MAKE_template - +$(Q) $(MAKE) -C $(1) $(2) APPDIR="$(APPDIR)" + +$(Q) $(MAKE) -C $(1) $(2) APPDIR="$(APPDIR)" TOPDIR="$(TOPDIR)" endef define SDIR_template $(1)_$(2): - +$(Q) $(MAKE) -C $(1) $(2) APPDIR="$(APPDIR)" + +$(Q) $(MAKE) -C $(1) $(2) APPDIR="$(APPDIR)" TOPDIR="$(TOPDIR)" endef