|
|
|
|
|
by akerl_
2386 days ago
|
|
I think there’s a distinction to be drawn here between a couple use cases for Makefiles (specifically for building software): * Makefiles can act as shortcuts for common existing functionality of the build toolchain * Makefiles can add new functionality that is not part of the build toolchain * Makefiles can add new functionality that replicates existing functionality in the build toolchain An example of the first case is one of the first examples in the article: using `make build` to run `go build`. The second includes things like the later example for `make docker-push`. The third includes things like makefiles that generate intermediate files or other things that `go generate` could do. Only the 3rd thing can really meaningfully harm productivity, but in my experience it’s the least common usage of `make`. A Makefiles that wraps `go generate && go build` into `make build` seems fully outside the scope of the portability concern, since a user without Make could just run the same commands themselves. Likewise, a Makefiles that adds `make release` which uploads the build artifact to GitHub Releases or similar isn’t replacing something the go toolchain could do, so it’s also not affecting portability. The user without Make couldn’t have used docker-push anyways, since the go compiler doesn’t support pushing release assets. |
|