1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-05 17:40:26 +00:00

Update Makefile for ease of packaging

This commit is contained in:
Umar Getagazov 2022-03-24 22:42:55 +07:00
parent aa5027ab95
commit f1b45dc2ac
2 changed files with 15 additions and 15 deletions

View File

@ -1,19 +1,20 @@
.POSIX:
include config.example.mk
-include config.mk
.SUFFIXES:
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
GO=go
all: mycorrhiza
mycorrhiza:
go build .
$(GO) generate $(GOFLAGS)
$(GO) build $(GOFLAGS) . -o mycorrhiza
generate:
go generate
install:
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
install -m755 mycorrhiza $(DESTDIR)$(BINDIR)/mycorrhiza
install -m644 doc/mycorrhiza.1 $(DESTDIR)$(MANDIR)/man1/mycorrhiza.1
run: mycorrhiza
./mycorrhiza ${WIKIPATH}
dev: generate run
check:
go test .
.PHONY: mycorrhiza generate run dev check
.PHONY: all mycorrhiza install

View File

@ -1 +0,0 @@
WIKIPATH=~/src/example-wiki