Skip to content

Commit aecea77

Browse files
committed
Copy go binary seperately in make install
Signed-off-by: hemildesai <[email protected]>
1 parent d83cc47 commit aecea77

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ else ifeq ($(OS),Darwin)
2222
else
2323
@echo Unknown OS: $(OS)
2424
endif
25+
cd go && $(MAKE) copy-binary
2526

2627
.PHONY: develop
2728
develop: verify-dev-env venv

go/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@ build-all:
5151

5252
# install without sudo if the install path exists and is writeable,
5353
# or if it doesn't exist and its directory is writeable
54-
.PHONY: install
55-
install: build
54+
.PHONY: copy-binary
55+
copy-binary:
5656
if [[ (-f "$(INSTALL_PATH)" && -w "$(INSTALL_PATH)") || (! -f "$(INSTALL_PATH)" && -w $$(dirname "$(INSTALL_PATH)")) ]]; then \
5757
cp $(BINARY) $(INSTALL_PATH); \
5858
else \
5959
sudo cp $(BINARY) $(INSTALL_PATH); \
6060
fi
6161

62+
.PHONY: install
63+
install: build copy-binary
64+
6265
.PHONY: clean
6366
clean:
6467
rm -rf $(RELEASE_DIR)

0 commit comments

Comments
 (0)