b=$(word 2,$1) f=$(if $b,$(if $(findstring $(word 1,$1),$b),$(call f,$(wordlist 2,9,$1)),NO),YES) $(foreach l,$(strip $(subst $z ,!,$(STDIN))),$(info $(call f,$(subst !, ,$l))))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).