From 0048cc350e5562eba0a892c3ff1be71318d1e12b Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 23 Mar 2018 16:03:16 +0100 Subject: [PATCH] Makefile: Don't create invalid sub-project targets At the moment targets are created for any file that is in a sub-directory of the project directory. This is not the intended behavior. Targets should only be generated for sub-projects. We can identify those by filtering for sub-directories that have a Makefile. E.g. some of those invalid targets were "adv7511.Makefile" and "scripts.adi_board.tcl". Signed-off-by: Lars-Peter Clausen --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 78b9fae8c..df60677e4 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ help: PROJECTS := $(filter-out $(NO_PROJ), $(notdir $(wildcard projects/*))) SUBPROJECTS := $(foreach projname,$(PROJECTS), \ - $(foreach archname,$(notdir $(wildcard projects/$(projname)/*)), \ + $(foreach archname,$(notdir $(subst /Makefile,,$(wildcard projects/$(projname)/*/Makefile))), \ $(projname).$(archname))) .PHONY: lib all clean clean-all $(SUBPROJECTS)