Skip to content

Commit 1caa37a

Browse files
committed
Makefile: support passing build tags via environment
build tags can be passed via GO_BUILDTAGS environment variable. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
1 parent 0701e9b commit 1caa37a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
# limitations under the License.
1414

1515
PACKAGES=$(shell go list ./... | grep -v /vendor/)
16+
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)
1617

1718
all: cgutil
18-
go build -v
19+
go build -v $(GO_TAGS)
1920

2021
cgutil:
21-
cd cmd/cgctl && go build -v
22+
cd cmd/cgctl && go build -v $(GO_TAGS)
2223

2324
proto:
2425
protobuild --quiet ${PACKAGES}

0 commit comments

Comments
 (0)