Other [make] File with different name than target

Hi folks!

I'd need to run a target only once, but without actually generating a file for the target i.e. matching it's name. What would work well is a ${target:tu}_COOKIE like the FreeBSD ports system does. Unfortunately I don't really understand how it works? In https://cgit.freebsd.org/ports/tree/Mk/bsd.port.mk#n5385 these targets are actually made PHONY, which should be the exact opposite to "run only once"? And how exactly play these together with {pre,do,post}-${target} targets?

Are there any ports gurus around?
Thanks in advance for helping!