Makefile -rw-r--r-- 451 B
1VERSION ?= $(shell git describe --tags 2>/dev/null)
2ifeq "$(VERSION)" ""
3 VERSION := UNKNOWN
4endif
5
6LDFLAGS=\
7 -X kevinschoon.com/hierarchy/pkg/version/internal.Version=$(VERSION)
8
9.PHONY: bin/hierarchy
10
11bin/hierarchy: bin
12 cd cmd/hierarchy && \
13 go build -ldflags '${LDFLAGS}' -o ../../$@
14
15bin:
16 mkdir $@
17
18clean:
19 [[ -d bin ]] && rm -r bin
20
21watch:
22 ./watch.sh "go build -o bin/hierarchy"
23
24man/hierarchy.8: bin/hierarchy
25 bin/hierarchy gen_man > $@
26