-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 818 Bytes
/
Makefile
File metadata and controls
45 lines (37 loc) · 818 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
42
43
44
45
build:
go mod download
go build -o manager
default: build
upgrade:
go mod download
go get -u -v
go mod tidy
go mod verify
test:
go test
man: build
./manager --help-man | man -l -
install:
@if ! test -f manager;then echo 'run "make build" first'; exit 1; fi
ifneq ($(shell id -u), 0)
@echo "You must be root to perform this action."
@exit 1
endif
@mkdir -p /usr/local/share/man/man8
cp manager /usr/bin/manager
/usr/bin/manager --help-man > manager.1
install -Dm644 manager.1 /usr/share/man/man8/manager.8
@rm manager.1
@echo Installed successfully!
uninstall:
ifneq ($(shell id -u), 0)
@echo "You must be root to perform this action."
@exit 1
endif
rm /usr/bin/manager
rm -f /usr/share/man/man8/manager.8
@echo Uninstalled successfully!
clean:
rm -f manager.1
rm -f manager
rm -f main