GO ?= go RM ?= rm GOFLAGS ?= -v -mod=vendor PREFIX ?= /usr/local BINDIR ?= bin MANDIR ?= share/man MKDIR ?= mkdir CP ?= cp SYSCONFDIR ?= /etc VERSION = `git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION"` COMMIT = `git rev-parse --short HEAD || echo "$COMMIT"` BRANCH = `git rev-parse --abbrev-ref HEAD` BUILD = `git show -s --pretty=format:%cI` GOARCH ?= amd64 GOOS ?= linux all: yukari yukari: vendor env GOARCH=${GOARCH} GOOS=${GOOS} ${GO} build ${GOFLAGS} ./cmd/yukari clean: ${RM} -f yukari install: ${MKDIR} -p ${DESTDIR}${PREFIX}/${BINDIR} ${MKDIR} -p ${DESTDIR}${PREFIX}/${MANDIR}/man1 ${MKDIR} -p ${DESTDIR}${PREFIX}/${MANDIR}/man5 ${CP} -f yukari ${DESTDIR}${PREFIX}/${BINDIR} ${CP} -f yukari.1 ${DESTDIR}${PREFIX}/${MANDIR}/man1 ${CP} -f yukari.ini.5 ${DESTDIR}${PREFIX}/${MANDIR}/man5 test: go test bench: go test -benchmem -bench . vendor: go mod vendor .PHONY: yukari clean install