remove $(SOURCES) when complie binary

Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
changzhen 2022-11-10 14:34:58 +08:00
parent e7c9cd0ccf
commit a534ebaedb
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
GOOS ?= $(shell go env GOOS) GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH) GOARCH ?= $(shell go env GOARCH)
SOURCES := $(shell find . -type f -name '*.go')
LDFLAGS='$(shell hack/version.sh)' LDFLAGS='$(shell hack/version.sh)'
# Images management # Images management
@ -50,7 +49,7 @@ CMD_TARGET=$(TARGETS) $(CTL_TARGETS)
all: $(CMD_TARGET) all: $(CMD_TARGET)
.PHONY: $(CMD_TARGET) .PHONY: $(CMD_TARGET)
$(CMD_TARGET): $(SOURCES) $(CMD_TARGET):
LDFLAGS=$(LDFLAGS) BUILD_PLATFORMS=$(GOOS)/$(GOARCH) hack/build.sh $@ LDFLAGS=$(LDFLAGS) BUILD_PLATFORMS=$(GOOS)/$(GOARCH) hack/build.sh $@
# Build image. # Build image.