-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (32 loc) · 742 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (32 loc) · 742 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
VERSION ?= $(shell git describe --tags 2>/dev/null)
ifeq "$(VERSION)" ""
VERSION := UNKNOWN
endif
LDFLAGS=\
-X github.com/kevinschoon/pomo/pkg/internal.Version=$(VERSION)
.PHONY: \
test \
docs \
pomo-build \
readme \
bin/pomo
default: bin/pomo test
clean:
[[ -f bin/pomo ]] && rm bin/pomo || true
bin/pomo:
cd cmd/pomo && \
go build -ldflags '${LDFLAGS}' -o ../../$@
test:
go test ./...
go vet ./...
install:
go install ./cmd/...
man/pomo.1: man/pomo.1.scd
scdoc < $< > $@
manpages: man/pomo.1
docs: www/data/readme.json
cd www && hugo -d ../docs
www/data/readme.json: www/data README.md
cat README.md | python -c 'import json,sys; print(json.dumps({"content": sys.stdin.read()}))' > $@
www/data bin:
mkdir -p $@