-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 656 Bytes
/
Makefile
File metadata and controls
42 lines (30 loc) · 656 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
.PHONY: build run test clean install lint fmt vet install-man uninstall-man
BINARY_NAME=pulsego
GO=go
MAIN_PATH=cmd/pulsego
PREFIX?=/usr/local
MAN_DIR=$(PREFIX)/share/man/man1
build:
$(GO) build -o $(BINARY_NAME) ./$(MAIN_PATH)
run:
$(GO) run ./$(MAIN_PATH)
test:
$(GO) test -v ./...
clean:
$(GO) clean
rm -f $(BINARY_NAME)
install:
$(GO) install ./...
install-man:
install -d $(DESTDIR)$(MAN_DIR)
install -m 644 man/man1/pulsego.1 $(DESTDIR)$(MAN_DIR)/
gzip -f $(DESTDIR)$(MAN_DIR)/pulsego.1
uninstall-man:
rm -f $(DESTDIR)$(MAN_DIR)/pulsego.1.gz
lint:
golangci-lint run
fmt:
$(GO) fmt ./...
vet:
$(GO) vet ./...
all: clean build