Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone else not bother maintaining a list of .PHONY targets? Always felt like a chore that adds noise for a rare edge case.


> The implicit rule search (see Using Implicit Rules) is skipped for .PHONY targets. This is why declaring a target as .PHONY is good for performance, even if you are not worried about the actual file existing.

https://www.gnu.org/software/make/manual/html_node/Phony-Tar...


I use a shell command as .PHONY, to keep it always synced. the command looks through the makefile, and then outputs the targets for the line.

I also use a similar pattern to provide a `help` target, which shows all targets, and a blurb about its purpose




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: