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 <lars@metafoo.de>
main
Lars-Peter Clausen 2018-03-23 16:03:16 +01:00 committed by István Csomortáni
parent 685f2eaf1e
commit 0048cc350e
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ help:
PROJECTS := $(filter-out $(NO_PROJ), $(notdir $(wildcard projects/*))) PROJECTS := $(filter-out $(NO_PROJ), $(notdir $(wildcard projects/*)))
SUBPROJECTS := $(foreach projname,$(PROJECTS), \ SUBPROJECTS := $(foreach projname,$(PROJECTS), \
$(foreach archname,$(notdir $(wildcard projects/$(projname)/*)), \ $(foreach archname,$(notdir $(subst /Makefile,,$(wildcard projects/$(projname)/*/Makefile))), \
$(projname).$(archname))) $(projname).$(archname)))
.PHONY: lib all clean clean-all $(SUBPROJECTS) .PHONY: lib all clean clean-all $(SUBPROJECTS)