blob: 1745ef292c458d9c004fb391fc9fd4ecf119d8a6 (
plain)
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
|
.POSIX:
.SUFFIXES:
GO = go
RM = rm
GOFLAGS = -o keep
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
CONFIGDIR = $(HOME)/.keep
goflags = $(GOFLAGS)
all: keep
keep:
$(GO) build $(goflags) -ldflags "-X main.buildPrefix=$(PREFIX)"
clean:
$(RM) -f keep
test:
$(GO) test -v ./...
install: all
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(CONFIGDIR)
cp -f keep $(DESTDIR)$(BINDIR)
cp -n keep.json $(DESTDIR)$(CONFIGDIR)
|