Update make targets: (#1900)

* Update make targets:

* `make dev` now shows a message indicating the new commands
* `make build` builds the binary into bin/
* `make install` will subsequently `mv` (not copy) the binary into
  GOPATH/bin

The reason for the `mv` is that M1 Macs seem to get pretty unhappy about
executing a copied binary if it's been modified, so an initial binary is
fine, then after changing and recompiling the command keeps getting
killed.

* Make the 'make install' text more clear
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2022-03-09 16:20:44 -05:00
1 parent bc6689fb16
commit b53e4d4c3e
2 files changed
+21 -9

No files matched your search

+15 -4
View File
@@ -29,12 +29,23 @@ cleangen:
@rm -f ${GENERATED_CODE}
.PHONY: dev
dev: BUILD_TAGS+=dev
dev: BUILD_TAGS+=ui
dev: build-ui-ifne
@echo "==> Building Boundary with dev and UI features enabled"
dev:
@echo "This command has changed. Please use:"
@echo "==> make build"
@echo " to build the binary into the bin/ directory"
@echo "==> make install"
@echo " to build the binary and install it into GOPATH/bin"
.PHONY: build
build: BUILD_TAGS+=ui
build: build-ui-ifne
@echo "==> Building Boundary with UI features enabled"
@CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'"
.PHONY: install
install: export BOUNDARY_INSTALL_BINARY=1
install: build
.PHONY: fmt
fmt:
gofumpt -w $$(find . -name '*.go' | grep -v pb.go | grep -v pb.gw.go)