From f309285f7d43b1946b415bbdfce975664cc7fd15 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 28 Jun 2019 17:17:26 -0400 Subject: Makefile: Allow MANDIR to be overridden This should eliminate the need for things like this OpenBSD patch: https://github.com/openbsd/ports/blob/a3201446fc3b7c21d65855a4163576dd12206c97/sysutils/bfs/patches/patch-Makefile --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6195eca..961a896 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ DEPFLAGS ?= -MD -MP -MF $(@:.o=.d) DESTDIR ?= PREFIX ?= /usr +MANDIR ?= $(PREFIX)/share/man LOCAL_CPPFLAGS := \ -D__EXTENSIONS__ \ @@ -120,12 +121,12 @@ clean: install: $(MKDIR) $(DESTDIR)$(PREFIX)/bin $(INSTALL) -m755 bfs $(DESTDIR)$(PREFIX)/bin/bfs - $(MKDIR) $(DESTDIR)$(PREFIX)/share/man/man1 - $(INSTALL) -m644 bfs.1 $(DESTDIR)$(PREFIX)/share/man/man1/bfs.1 + $(MKDIR) $(DESTDIR)$(MANDIR)/man1 + $(INSTALL) -m644 bfs.1 $(DESTDIR)$(MANDIR)/man1/bfs.1 uninstall: $(RM) $(DESTDIR)$(PREFIX)/bin/bfs - $(RM) $(DESTDIR)$(PREFIX)/share/man/man1/bfs.1 + $(RM) $(DESTDIR)$(MANDIR)/man1/bfs.1 .PHONY: all release check distcheck clean install uninstall -- cgit v1.2.3