Skip to content

tools: pass TOPDIR in SDIR_template and MAKE_template#19310

Open
Zepp-Hanzj wants to merge 1 commit into
apache:masterfrom
Zepp-Hanzj:fix/sdir-template-topdir
Open

tools: pass TOPDIR in SDIR_template and MAKE_template#19310
Zepp-Hanzj wants to merge 1 commit into
apache:masterfrom
Zepp-Hanzj:fix/sdir-template-topdir

Conversation

@Zepp-Hanzj

Copy link
Copy Markdown
Contributor

Summary

SDIR_template and MAKE_template in tools/Config.mk 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 into nested subdirectories), TOPDIR was missing and the include silently failed via -include.

Changes

Pass TOPDIR in both templates so recursive makes have full access to the build system configuration.

Motivation

Companion PR for apache/nuttx-apps#3585 which fixes distclean for partial builds. Without TOPDIR being passed, the distclean targets defined inline in Directory.mk cannot recurse into sub-subdirectories.

Signed-off-by: hanzhijian hanzhijian@zepp.com

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 <hanzhijian@zepp.com>
@github-actions github-actions Bot added Area: Build system Size: XS The size of the change in this PR is very small labels Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Build system Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants