On Sun, Aug 22, 2021 at 8:11 PM jlfo...@berkeley.edu <jlforr...@berkeley.edu>
wrote:

> I've noticed that few, if any, Go programs use Makefiles. Is that because
> the overhead of using make is greater than the overhead of just always
> compiling and linking everything?
> One piece of evidence for this is that the Go compiler leaves no
> artifacts, like object files, so as is make wouldn't fit into the current
> build method.
>

I have no idea how many projects using Go also use makefiles. The sole Go
project I contribute changes to does have a makefile. See the Elvish shell
project: https://github.com/elves/elvish/. It does so for a few reasons:

1) There should be a simple mechanism to executed several tasks that don't
involve the "go" command.

2) The flags used for unit tests (e.g., whether to enable race detection)
varies by platform.

3) Building the binary for installation involves passing "-ldflags"
arguments built from running shell commands.

It's not clear if your use of "program" was meant to be read as "project".
If you did mean something like "individual program" then, yes, I have no
doubt that scenario is probably unlikely to have a makefile.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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/CABx2%3DD_m%3D9%3D7GFYeod5WeJ%3Dn2WgrnVz7eLSLN0zwNHN%3D8WUhQA%40mail.gmail.com.

Reply via email to