I use Makefiles with Go projects. For many of the reasons already given but it's especially useful for me for cross compilation to the target platforms at release time. So, when running "make release" I have "test" and "generate" targets as dependencies to make sure I've not missed anything.
I don't need a build system to do that but it's good to have a script for that kind of thing, IMO. I also use it in the git pre-commit hook. For example, I have "make lint" in that script which runs whatever linter I'm using at the moment and I can be assured that it's the same linter I'm using at the command line. As for why not another build system, for the same reason as other respondents have said. Make has been around forever and I don't need anything more sophisticated. > Make does not come alone for end-users. Usually it comes bundled with several hundreds of megabytes of > the devel packages user gets after issuing eg. `sudo apt-get install build-essential`. Surely, you would just do: `sudo apt-get install make` On Tuesday, 24 August 2021 at 12:14:50 UTC+1 ohir wrote: > Dnia 2021-08-24, o godz. 07:54:35 > Reto <re...@labrat.space> napisał(a): > > > It may be nicer, however the beauty of make is that it is ubiquitous, > > everybody already has it. > > No, not everybody has it. Esp. on Windows host. > > > With mage, your installation instructions now need to contain how / > > where to get mage in the first place, leaving the user with a random > > binary somewhere which they probably never ever need nor update again. > > Nope. If user is going to compile from sources she also needs to install > Go compiler and tools. Once she has it the mage is a `go install` command > away. Shorter than typical line of "prerequisites" needed by non-developer > user on most of linux distros. (If she is about to install binary she does > not need mage at all - 99% deployments of Go based apps are just the single > executable.) > > > leaving the user with ... they probably never ever need nor update again. > > Make does not come alone for end-users. Usually it comes bundled with > several hundreds of megabytes of the devel packages > user gets after issuing eg. `sudo apt-get install build-essential`. Then > she's left with a bit more more unused stuff than a single > mage binary. > > TC, > > -- > Wojciech S. Czarnecki > << ^oo^ >> OHIR-RIPE > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/039b0cac-a81c-40ae-bb46-f12d11261707n%40googlegroups.com.