~porcellis/t

c87b79b854a4c9c3bce755521ad5ce4406d096ba — Pedro Lucas Porcellis 1 year, 6 months ago 030ef4f
Introduce installation script to Makefile
2 files changed, 13 insertions(+), 2 deletions(-)

M .gitignore
M Makefile
M .gitignore => .gitignore +1 -0
@@ 1,3 1,4 @@
bin/*
.go
t
docs/*.gz

M Makefile => Makefile +12 -2
@@ 2,7 2,17 @@ PKGNAME = git.sr.ht/~porcellis/t
GOPATH = $(realpath .go)
PKGPATH = .go/src/$(PKGNAME)

all: t
PREFIX?=/usr/local
_INSTDIR=$(DESTDIR)$(PREFIX)
BINDIR?=$(_INSTDIR)/bin
MANDIR?=$(_INSTDIR)/share/man

all: t doc

install: all
	mkdir -m755 -p $(BINDIR) $(MANDIR)/man1
	install -m755 t $(BINDIR)/t
	install -m644 docs/t.1 $(MANDIR)/man1/t.1

.go:
		mkdir -p $(dir $(PKGPATH))


@@ 18,7 28,7 @@ get: .go
	env GOPATH=$(GOPATH) go get -d ./...

clean:
	rm -rf t
	rm -rf t docs/*.gz

.PHONY:
	t get clean doc