summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-06-28 17:17:26 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-06-28 17:17:26 -0400
commitf309285f7d43b1946b415bbdfce975664cc7fd15 (patch)
tree5c2cf5fc1bd71a4221edd68a0cd15755c00d16ee /Makefile
parent0473beaa2e3a46dd782af1182413fcdd4d33e275 (diff)
downloadbfs-f309285f7d43b1946b415bbdfce975664cc7fd15.tar.xz
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files 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