Although this was not for you, I came across the same error message for a different reason. Therefore, I also answer so that he can help people in the future when they encounter an error message, but the reason is not as obvious as in your case.
, , , $(wildcard) (, =). , , $(FILES).
FILES := $(wildcard ./*=*)
.PHONY: all
define foo
all: something-$(1)
something-$(1): $(1)
cat $$^ > $$@
endef
$(foreach goal,$(sort $(FILES)),$(eval $(call foo,$(goal))))
, - , - .
, , , make - - . , - . .