News for hackers. Stuff that matters.
Re:I Like Makefiles by gbuk2013 on Saturday September 21, 2024 @05:36AM (#41608763)
Here is a slightly more complex example of a Makefile I use when spinning up a new TypeScript project (but I switch out to use pnpm these days): https://github.com/borisovg/node-ts-template/blob/main/Makef...

I still wouldn’t say it’s that complicated - you do need to know your way around the syntax a bit but it’s less challenging than getting all the other tooling working in the first place. :)

Re:I Like Makefiles by orbisvicis on Saturday September 21, 2024 @07:30AM (#41609297)
I didn't know you could redefine .PHONY like that and what... all the phony targets are accumulated into a list?
Re:I Like Makefiles by gbuk2013 on Saturday September 21, 2024 @07:49AM (#41609379)
Not just .PHONY - you can do that for any target: https://www.gnu.org/software/make/manual/html_node/Multiple-...

“One file can be the target of several rules. All the prerequisites mentioned in all the rules are merged into one list of prerequisites for the target.”