Rev | Line | |
---|
[4a5f10f] | 1 | GO ?= go
|
---|
| 2 | RM ?= rm
|
---|
| 3 | GOFLAGS ?= -v -mod=vendor
|
---|
| 4 | PREFIX ?= /usr/local
|
---|
| 5 | BINDIR ?= bin
|
---|
| 6 | MANDIR ?= share/man
|
---|
| 7 | MKDIR ?= mkdir
|
---|
| 8 | CP ?= cp
|
---|
| 9 | SYSCONFDIR ?= /etc
|
---|
| 10 |
|
---|
| 11 | VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"`
|
---|
| 12 | COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"`
|
---|
| 13 | BRANCH = `git rev-parse --abbrev-ref HEAD`
|
---|
| 14 | BUILD = `git show -s --pretty=format:%cI`
|
---|
| 15 |
|
---|
| 16 | GOARCH ?= amd64
|
---|
| 17 | GOOS ?= linux
|
---|
| 18 |
|
---|
| 19 | all: yukari
|
---|
| 20 |
|
---|
| 21 | yukari: vendor
|
---|
| 22 | env GOARCH=${GOARCH} GOOS=${GOOS} ${GO} build ${GOFLAGS} ./cmd/yukari
|
---|
| 23 | clean:
|
---|
| 24 | ${RM} -f yukari
|
---|
| 25 | install:
|
---|
| 26 | ${MKDIR} -p ${DESTDIR}${PREFIX}/${BINDIR}
|
---|
| 27 | ${MKDIR} -p ${DESTDIR}${PREFIX}/${MANDIR}/man1
|
---|
| 28 | ${MKDIR} -p ${DESTDIR}${PREFIX}/${MANDIR}/man5
|
---|
| 29 |
|
---|
| 30 | ${CP} -f yukari ${DESTDIR}${PREFIX}/${BINDIR}
|
---|
| 31 | ${CP} -f yukari.1 ${DESTDIR}${PREFIX}/${MANDIR}/man1
|
---|
| 32 | ${CP} -f yukari.ini.5 ${DESTDIR}${PREFIX}/${MANDIR}/man5
|
---|
| 33 | test:
|
---|
| 34 | go test
|
---|
| 35 | bench:
|
---|
| 36 | go test -benchmem -bench .
|
---|
| 37 | vendor:
|
---|
| 38 | go mod vendor
|
---|
| 39 | .PHONY: yukari clean install
|
---|
Note:
See
TracBrowser
for help on using the repository browser.