Merge pull request #4898 from timchenxiaoyu/makefile

standard makefile,fix not work no  macos
This commit is contained in:
Maksym Pavlenko 2021-03-19 16:05:46 -07:00 committed by GitHub
commit a47feaf462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,14 +196,14 @@ benchmark: ## run benchmarks tests
FORCE: FORCE:
define BUILD_BINARY = define BUILD_BINARY
@echo "$(WHALE) $@" @echo "$(WHALE) $@"
@go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$< @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$<
endef endef
# Build a binary from a cmd. # Build a binary from a cmd.
bin/%: cmd/% FORCE bin/%: cmd/% FORCE
$(BUILD_BINARY) $(call BUILD_BINARY)
bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
@echo "$(WHALE) bin/containerd-shim" @echo "$(WHALE) bin/containerd-shim"