Attention is currently required from: Martin L Roth.
Nikolai Vyssotski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68800 )
Change subject: Makefile: Get rid of invalid paths ......................................................................
Makefile: Get rid of invalid paths
When wildcards are used in toplevel Makefile.inc it ends up appending all items including regular files into subdirs-y which then are treated as directories in "evaluate_subdirs" with "Makefile.inc" appended to them. Check for a valid path (existing Makefiles.inc) before attempting to process it.
Change-Id: I368b5b9a7ece3c675674fcb24303276a87c15668 --- M Makefile 1 file changed, 27 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/68800/1
diff --git a/Makefile b/Makefile index 58cd85b..f360fdb 100644 --- a/Makefile +++ b/Makefile @@ -269,17 +269,18 @@ # Add paths to files in X-y to X-srcs # Add subdirs-y to subdirs includemakefiles= \ - $(foreach class,classes subdirs $(classes) $(special-classes), $(eval $(class)-y:=)) \ - $(eval -include $(1)) \ - $(foreach class,$(classes-y), $(call add-class,$(class))) \ - $(foreach special,$(special-classes), \ - $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \ - $(foreach class,$(classes), \ - $(eval $(class)-srcs+= \ - $$(subst $(absobj)/,$(obj)/, \ - $$(subst $(top)/,, \ - $$(abspath $$(subst $(dir $(1))/,/,$$(addprefix $(dir $(1)),$$($(class)-y)))))))) \ - $(eval subdirs+=$$(subst $(CURDIR)/,,$$(wildcard $$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))) + $(if $(wildcard $(1)), \ + $(foreach class,classes subdirs $(classes) $(special-classes), $(eval $(class)-y:=)) \ + $(eval -include $(1)) \ + $(foreach class,$(classes-y), $(call add-class,$(class))) \ + $(foreach special,$(special-classes), \ + $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \ + $(foreach class,$(classes), \ + $(eval $(class)-srcs+= \ + $$(subst $(absobj)/,$(obj)/, \ + $$(subst $(top)/,, \ + $$(abspath $$(subst $(dir $(1))/,/,$$(addprefix $(dir $(1)),$$($(class)-y)))))))) \ + $(eval subdirs+=$$(subst $(CURDIR)/,,$$(wildcard $$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))))
# For each path in $(subdirs) call includemakefiles # Repeat until subdirs is empty