From 51c42f7dda6e9d48f120ab15f277bed95c60f5d0 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 3 Sep 2026 13:19:54 +0200 Subject: [PATCH] defs-dirs.mk: Filter out non-existing ordered subdirs SUBDIRS combines $(ORDERED_SUBDIRS) with the subdirectories found on disk. An $(ORDERED_SUBDIRS) entry that does not exist in the tree is still passed to the recursive make loop, which then errors out over the missing directory. Filter the ordered subdirectories through the wildcard of their Makefile paths, keeping only the ones that are actually there. Signed-off-by: Jan Lindemann --- make/defs-dirs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/defs-dirs.mk b/make/defs-dirs.mk index 45682b6d..3e1bc613 100644 --- a/make/defs-dirs.mk +++ b/make/defs-dirs.mk @@ -5,6 +5,6 @@ SUBDIRS_TO_ITERATE = $(filter-out $(IGNORE_SUBDIRS),$(SUBDIRS)) EXTRA_SUBDIR_TARGETS ?= ALLOWED_SUBDIR_TARGETS ?= all install clean distclean test link-in $(EXTRA_SUBDIR_TARGETS) -SUBDIRS ?= $(ORDERED_SUBDIRS) $(filter-out $(ORDERED_SUBDIRS),$(FIND_SUBDIRS)) +SUBDIRS ?= $(dir $(wildcard $(addsuffix /Makefile,$(ORDERED_SUBDIRS)))) $(filter-out $(ORDERED_SUBDIRS),$(FIND_SUBDIRS)) #SUBDIRS ?= $(filter-out $(ORDERED_SUBDIRS),$(FIND_SUBDIRS)) #SUBDIRS ?= $(FIND_SUBDIRS)