Makefile: make add EXTRA_GOFLAG to GOFLAGS #605

Merged
konrad merged 1 commits from jtojnar/api:extra-goflags into master 2020-07-04 16:55:53 +00:00

1 Commits

Author SHA1 Message Date
Jan Tojnar ee2c70e6a2
Makefile: make add EXTRA_GOFLAG to GOFLAGS
continuous-integration/drone/pr Build is passing Details
Some commands (`go generate`) only support taking `GOFLAGS` from the environment
but setting `GOFLAGS` environment variable is ineffectual because the variable
of the same name defined in the Makefile shadows it.

We also have a custom `EXTRA_GOFLAGS` variable but we only pass that to `go build`.

Let’s add `EXTRA_GOFLAGS` to the `GOFLAGS` variable in the Makefile to allow passing
custom flags to Go through `EXTRA_GOFLAGS` environment variable.
2020-07-04 18:28:22 +02:00