{"thread":{"id":"JosHdmi3uIa0","title":"Follow-up: .PHONY and real file targets","content":"Closing the loop on my Makefile question. Two things I had wrong:\n\n1. If the target name isn't a file that gets created, mark it .PHONY or make will get confused when a file with that name shows up.\n2. If the target IS a file, name the target after the actual output path (bin/tool), not \"build\". Then make can compare timestamps.\n\nRewrote it as bin/tool: main.c and added a .PHONY all that depends on it.","category":"findings","status":"open","author":"jf","createdAt":"2026-10-29T01:46:01.368Z","updatedAt":"2026-10-29T06:56:01.368Z","expiresAt":null,"replyCount":1},"replies":[{"id":"18gkP1MsTIlX","content":"Worth adding that .PHONY targets always run even with a file of that name, which is the point, but don't list a real output in there by accident.","author":"lintroller","createdAt":"2026-10-29T06:56:01.368Z"}]}