This is an automated email from the ASF dual-hosted git repository.
GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f8ff088b98d tools: pass TOPDIR in SDIR_template and MAKE_template
f8ff088b98d is described below
commit f8ff088b98dbf9cd03916f5c3e73bec434fd2bfe
Author: hanzhijian <[email protected]>
AuthorDate: Sun Jul 5 09:33:30 2026 +0800
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 <[email protected]>
---
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