make: Miscellaneous versatility improvements #83

Merged
Jan Lindemann merged 5 commits from jan/feature/20260905-make-miscellaneous-versatility-improvements into master 2026-09-05 13:49:10 +02:00 AGit
Showing only changes of commit 51c42f7dda - Show all commits

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 <jan@janware.com>
Jan Lindemann 2026-09-03 13:19:54 +02:00
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -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)