make makefile compatible with AUR
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-08-06 02:39:45 +02:00
parent f77a7c0e7c
commit baaa41d60f
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
3 changed files with 5 additions and 4 deletions

View file

@ -19,8 +19,8 @@ install:
$(GO) install $(GOFLAGS) .
else
install: all
install -m755 $(PROG) $(PREFIX)/$(BIN)
install -m644 doc/$(PROG).1 $(MAN)/man1
install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -Dm644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
endif
.PHONY: install

View file

@ -8,7 +8,7 @@ $(PROG): $(SOURCES)
## install: installs awl and the manpage, RUN AS ROOT
install: all
install -m755 $(PROG) $(PREFIX)/$(BIN)
install -m644 doc/$(PROG).1 $(MAN)/man1
install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -Dm644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
.PHONY: install

View file

@ -12,6 +12,7 @@ GO ?= go
TEST ?= $(GO) test -v -race
COVER ?= $(GO) tool cover
GOFLAGS ?= -ldflags "-s -w -X=main.version=$(VERSION)" -trimpath
DESTDIR :=
PREFIX ?= /usr/local
BIN ?= bin