I know that the Go source comes with a Makefile (It's in $GOROOT/doc
) which I am using right now, but have other popular build systems added support for Go yet? Has anyone written build scripts for scons, waf etc...
What do you use to build your Go programs?
You can find in Go Utils and Tools all the available build tools for Go.
But more of them are superseded by the "
go build
" command and the lack of Makefile with Go 1.See "The go tool" blog post.
Even if Makefile can still be used, for pure Go source code, they can be removed (like in this code review for instance)
I've built my own little tool called gobuild for that, and am still working on it. It should be able to compile most programs/libs that don't interfacing with C code without having to write any build-scripts/makefiles.
I've been using scons; this is an example
SConstruct
file:I haven't written a large enough project yet to require a build system, so a simple
build.sh
is sufficient.You can use
$GOROOT
,$GOARCH
and$GOOS
to determine what you need:If it's enough for Go, it's enough for me.