Skip to content

Commit

Permalink
Makefile: allow passing go build flags
Browse files Browse the repository at this point in the history
Distro builders often need to pass additional go build flags, so
introducing a variable GO_BUILD_FLAGS for that.

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
  • Loading branch information
metux committed Aug 23, 2023
1 parent 939061a commit 481d64b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
PACKAGES=$(shell go list ./... | grep -v /vendor/)
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)
GO ?= go
GO_BUILD_FLAGS ?=

all: cgutil
$(GO) build -v $(GO_TAGS)

cgutil:
cd cmd/cgctl && $(GO) build -v $(GO_TAGS)
cd cmd/cgctl && $(GO) build $(GO_BUILD_FLAGS) -v $(GO_TAGS)

proto:
protobuild --quiet ${PACKAGES}
Expand Down

0 comments on commit 481d64b

Please sign in to comment.