forked from OctopusDeploy/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 711 Bytes
/
Makefile
File metadata and controls
41 lines (32 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
EXE=
ifeq ($(GOOS),windows)
EXE = .exe
endif
RMCMD = rm -rf
ifeq ($(GOOS),windows)
rmdir /s /q bin/
endif
ifeq (run,$(firstword $(MAKECMDGOALS)))
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
endif
.PHONY: bin/octopus$(EXE)
bin/octopus$(EXE):
go build -o bin/octopus cmd/octopus/main.go
.PHONY: run
run:
go run cmd/octopus/main.go $(RUN_ARGS)
.PHONY: clean
clean:
$(RMCMD) bin/
## Install/Uninstall (*nix Only)
DESTDIR :=
prefix := /usr/local
bindir := ${prefix}/bin
.PHONY: install
install: bin/octopus
install -d ${DESTDIR}${bindir}
install -m755 bin/octopus ${DESTDIR}${bindir}/
.PHONY: uninstall
uninstall:
rm -f ${DESTDIR}${bindir}/octopus