diff --git a/test/tools/Makefile b/test/tools/Makefile index 512cb2a1d..768420b2f 100644 --- a/test/tools/Makefile +++ b/test/tools/Makefile @@ -1,7 +1,7 @@ # (C) Copyright Confidential Containers Contributors # SPDX-License-Identifier: Apache-2.0 -.PHONY: clean provisioner-cli +.PHONY: all clean force ARCH ?= $(subst x86_64,amd64,$(shell uname -m)) BUILTIN_CLOUD_PROVIDERS ?= aws azure ibmcloud vsphere libvirt @@ -17,8 +17,12 @@ ifneq (,$(filter libvirt,$(BUILTIN_CLOUD_PROVIDERS))) GOOPTIONS := $(subst CGO_ENABLED=0,CGO_ENABLED=1,$(GOOPTIONS)) endif +all: $(BINARIES) + .PHONY: provisioner-cli -provisioner-cli: ## Build provisioner-cli for developer +provisioner-cli: caa-provisioner-cli + +caa-provisioner-cli: force ## Build provisioner-cli for developer $(GOOPTIONS) go build $(GOFLAGS) -o caa-provisioner-cli "provisioner-cli/main.go" .PHONY: clean diff --git a/test/tools/README.md b/test/tools/README.md index dac29dc11..73ec57807 100644 --- a/test/tools/README.md +++ b/test/tools/README.md @@ -9,13 +9,13 @@ tools for development and testing. ### Build provisioner-cli In the root directory of `test/tools`, run command as below to build the cli program: ```bash -make provisioner-cli +make all ``` Program is generated: `test/tools/caa-provisioner-cli`. Optionally, `BUILTIN_CLOUD_PROVIDERS` could also be used to build the CLI for specific providers, like: ```bash -make BUILTIN_CLOUD_PROVIDERS="ibmcloud" provisioner-cli +make BUILTIN_CLOUD_PROVIDERS="ibmcloud" all ``` ### Use provisioner-cli