-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 678 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (27 loc) · 678 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
PKGNAME = git.sr.ht/~porcellis/t
GOPATH = $(realpath .go)
PKGPATH = .go/src/$(PKGNAME)
PREFIX?=/usr/local
_INSTDIR=$(DESTDIR)$(PREFIX)
BINDIR?=$(_INSTDIR)/bin
SHAREDIR?=$(_INSTDIR)/share/t
MANDIR?=$(_INSTDIR)/share/man
all: t doc
install: all
mkdir -m755 -p $(BINDIR) $(MANDIR)/man1 $(SHAREDIR)
install -m755 t $(BINDIR)/t
install -m644 docs/t.1 $(MANDIR)/man1/t.1
install -m644 config/t.conf $(SHAREDIR)
.go:
mkdir -p $(dir $(PKGPATH))
ln -fTrs $(realpath .) $(PKGPATH)
doc:
gzip -c docs/t.1 > docs/t.1.gz
t: .go
env GOPATH=$(GOPATH) go build -o $@ ./main.go
get: .go
env GOPATH=$(GOPATH) go get -d ./...
clean:
rm -rf t docs/*.gz
.PHONY:
t get clean doc