From 21a1afb72878a292fdc6f3615c62162b7f1aed28 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 c000d64480853..cdcd49cfc8a09 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -718,13 +718,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