Remove codecgen-generated file before building package

This commit is contained in:
Alfonso Acosta
2016-03-07 10:00:46 +00:00
parent 657af33864
commit 125a0bfacd

View File

@@ -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)