News for hackers. Stuff that matters.
Re:Learn Makefiles with the Tastiest Examples by evancordell on Monday May 15, 2023 @09:48PM (#35956904)
I have long held similar opinions on make, and I've recently started using mage[0] in more and more go projects and have been happy with the result.

It's more task-oriented, the way people tend to write Makefiles with .PHONY rules, but it's all in go. It can be bootstrapped just with go too, and comes with some utilities to do make-like incremental builds if you need to.

[0]: https://magefile.org/

Re:Learn Makefiles with the Tastiest Examples by emptysongglass on Tuesday May 16, 2023 @01:32AM (#35958040)
How does it compare to Just?
Re:Learn Makefiles with the Tastiest Examples by evancordell on Thursday May 18, 2023 @10:20AM (#35988316)
I looked at both and came away thinking mage was more convenient for go-only projects. Just looked good and I would probably pick it for something that wasn't go-only (if make didn't make sense instead).
Re:Learn Makefiles with the Tastiest Examples by tpoacher on Tuesday May 16, 2023 @11:15AM (#35962988)
Couldn't you have achieved this even more simply by using make with a go shell?

Btw, from the linked page:

> Makefiles are hard to read and hard to write. Mostly because makefiles are essentially fancy bash scripts with significant white space and additional make-related syntax.

Wait what? What does bash have to do with anything? Mage may well be amazing, but it doesn't sound like this person knows make that well at all. Which makes me think they're simply trying to reinvent the wheel -- in 'go'.

Re:Learn Makefiles with the Tastiest Examples by evancordell on Thursday May 18, 2023 @10:18AM (#35988300)
> Couldn't you have achieved this even more simply by using make with a go shell?

Make is still really about file to file transformations, and `go` already wraps up all of the behavior one would normally use make for. Plus you need make + a shell + go, vs. mage where all that's needed is go.

I can't speak for the author, but I assume they're reacting to how Makefiles tend to be used in go projects and not how make works generally.