You cannot simply strip bytes after '#'.
foo:=foo#bar $(info $(foo)) # foo define id $(1) endef $(info $(call id,foo#bar)) # foo#bar foobar: @echo foo#bar # foo#bar