kmesh
kmesh copied to clipboard
`make build` should build kmeshctl
What would you like to be added:
Now when running make build, it does not build kmeshctl. We have to run make kmeshctl. I would think make build should build all the components
Why is this needed:
I thought to replace in Makefile:
.PHONY: build
build:
VERSION=$(VERSION) ./kmesh_compile.sh
OUT ?= kmeshctl
.PHONY: kmeshctl
kmeshctl:
$(call printlog, BUILD, $(APPS4))
$(QUIET) (export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(ROOT_DIR)mk; \
CGO_ENABLED=0 $(GO) build -gcflags $(GOGCFLAGS) -ldflags $(GOLDFLAGS) -o $(OUT) $(GOFLAGS) ./ctl/main.go)
with
.PHONY: build
OUT ?= kmeshctl
build:
VERSION=$(VERSION) ./kmesh_compile.sh
$(QUIET) (export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(ROOT_DIR)mk; \
CGO_ENABLED=0 $(GO) build -gcflags $(GOGCFLAGS) -ldflags $(GOLDFLAGS) -o $(OUT) $(GOFLAGS) ./ctl/main.go)
I tried this and it works fine and no test error.
@Insomniac2904 My mistake, seems build.sh is calling make in the container, but does not copy the built binaries to the host. We should fix the copy_to_host in hack/utils.sh
/assign
/assign