Re:Golang: Don't be afraid of makefiles
by bacongobbler on Wednesday September 20, 2017 @12:17PM
(#15295455)
My only gripe with Makefiles is the lack of support on Windows. I work on several Go projects, all of which use a Makefile. It makes for a great experience on MacOS and Linux, but on Windows I have to break down the Makefile logic into powershell scripts or run raw `go test/build`. Both are fine, but just pointing out the fact that it's not a silver bullet if your project is intended to work across multiple platforms (like a CLI).
[ Parent
| on HN ]
Re:Golang: Don't be afraid of makefiles
by rpeden on Wednesday September 20, 2017 @01:28PM
(#15296203)
If you use Cmder[1] as your terminal, and you install the full package, make is bundled with it and works exactly as you'd expect it to. I do this with a couple of cross platform Go projects, and make works nicely on macOS, Linux, and Windows.
Of course, this is less useful if it's a team project, because then everyone will have to install Cmder (or at least msys) to use the Makefile on a Windows system.
Re:Golang: Don't be afraid of makefiles
by bacongobbler on Thursday September 21, 2017 @11:06AM
(#15304160)
Sure, I have `make` installed and I'm using cmder, but some things do not translate well in Windows.
Re:Golang: Don't be afraid of makefiles
by int_19h on Wednesday September 20, 2017 @06:20PM
(#15298853)
MSYS2 offers a nice and relatively lean Unix-like build environment on top of Win32. It's especially convenient if your dependencies happen to be in their Pacman package repo (and if not, you can submit them to it...).
Re:Golang: Don't be afraid of makefiles
by firethief on Wednesday September 20, 2017 @12:42PM
(#15295745)
Does WSL not solve that?
Re:Golang: Don't be afraid of makefiles
by wtetzner on Wednesday September 20, 2017 @01:18PM
(#15296108)
If you do your build under WSL, you'll get a Linux binary. Which may or may not be OK, depending on what you're after.
Re:Golang: Don't be afraid of makefiles
by wtetzner on Wednesday September 20, 2017 @05:03PM
(#15298226)
Ah, that's a good point. You just need to remember to set the right environment variables. Unless you need to link against MSVC stuff, although I don't know if Go supports that anyway.
Re:Golang: Don't be afraid of makefiles
by e12e on Wednesday September 20, 2017 @06:40PM
(#15299005)
Doesn't look like go works with msvc yet - the following issue was a fascinating read (partly because of the optimism and persistence displayed, partly in a ohmigoditsatrainwreckcantlookaway-way ;)