From d7607cf54769259077acc3acc1f224960639476a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 22 May 2022 06:00:33 +0200 Subject: Makefile: Use `prefix` etc. variables I'm getting a destroot error in MacPorts: Failed to activate wajir: Image error: /bin already exists and does not belong to a registered port. Trying to see if this fixes it. --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b160710..fdec23f 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,14 @@ # along with Wajir. If not, see . +prefix ?= /usr/local +exec_prefix ?= $(prefix) +bindir ?= $(exec_prefix)/bin +datarootdir ?= $(prefix)/share +mandir ?= $(datarootdir)/man +man1dir ?= $(mandir)/man1 + + LISP ?= sbcl VERSION := $(shell fgrep ':version' wajir.asd | awk -F '"' '{ print $$2 }') @@ -73,7 +81,7 @@ wajir_$(VERSION).tar.bz2: bundle wajir.asd src/*.lisp .PHONY: install install: bundle/bundled-local-projects/0000/wajir/wajir $(MAN_PAGE) - install -m 755 bundle/bundled-local-projects/0000/wajir/wajir $(DESTDIR)/bin + install -m 755 bundle/bundled-local-projects/0000/wajir/wajir $(DESTDIR)$(bindir)/wajir - install -d $(DESTDIR)/share/man/man1 - install -m 644 $(MAN_PAGE) $(DESTDIR)/share/man/man1 + install -d $(DESTDIR)$(man1dir) + install -m 644 $(MAN_PAGE) $(DESTDIR)$(man1dir)/$(MAN_PAGE) -- cgit v1.2.3