3 ms·
Anyone else not bother maintaining a list of .PHONY targets? Always felt like a chore that adds noise for a rare edge case.
by seanwilson 1y ago
Anyone else not bother maintaining a list of .PHONY targets? Always felt like a chore that adds noise for a rare edge case.
- leetrout 1y ago> 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-Targets.html https://www.gnu.org/software/make/manual/html_node/Phony-Tar...
- CableNinja 1y agoI 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