mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Provide identical go variables to codecgen
This commit is contained in:
committed by
Simon Howe
parent
805bedf3e1
commit
ab6b00adf9
5
Makefile
5
Makefile
@@ -22,7 +22,8 @@ CODECGEN_TARGETS=report/report.codecgen.go render/render.codecgen.go render/deta
|
||||
RM=--rm
|
||||
RUN_FLAGS=-ti
|
||||
BUILD_IN_CONTAINER=true
|
||||
GO ?= env GO15VENDOREXPERIMENT=1 GOGC=off go
|
||||
GO_ENVS=GO15VENDOREXPERIMENT=1 GOGC=off
|
||||
GO ?= env $(GO_ENVS) go
|
||||
GO_BUILD_INSTALL_DEPS=-i
|
||||
GO_BUILD_TAGS='netgo unsafe'
|
||||
GO_BUILD_FLAGS=$(GO_BUILD_INSTALL_DEPS) -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION)" -tags $(GO_BUILD_TAGS)
|
||||
@@ -80,7 +81,7 @@ $(SCOPE_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE)
|
||||
|
||||
%.codecgen.go: $(SCOPE_BACKEND_BUILD_UPTODATE)
|
||||
rm -f $@ && env -u GOARCH -u GOOS $(GO) build -i -tags $(GO_BUILD_TAGS) ./$(@D) # workaround for https://github.com/ugorji/go/issues/145
|
||||
cd $(@D) && env -u GOARCH -u GOOS GOGC=off $(shell pwd)/$(CODECGEN_EXE) -rt $(GO_BUILD_TAGS) -u -o $(@F) $(notdir $(call GET_CODECGEN_DEPS,$(@D)))
|
||||
cd $(@D) && env -u GOARCH -u GOOS $(GO_ENVS) $(shell pwd)/$(CODECGEN_EXE) -rt $(GO_BUILD_TAGS) -u -o $(@F) $(notdir $(call GET_CODECGEN_DEPS,$(@D)))
|
||||
|
||||
$(CODECGEN_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE)
|
||||
mkdir -p $(@D)
|
||||
|
||||
Reference in New Issue
Block a user