diff --git a/Makefile b/Makefile index 54e4dc062..bd3ec046f 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ $(SCOPE_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE) } %.codecgen.go: $(SCOPE_BACKEND_BUILD_UPTODATE) - env -u GOARCH -u GOOS $(GO) build -i -tags $(GO_BUILD_TAGS) ./$(@D) + 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))) $(CODECGEN_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE)