From f81d9e789b179465f54a5aa41b136751b3ff21f7 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Mon, 26 Aug 2024 16:25:42 +0200 Subject: [PATCH] make: switch to install and copy manpage - use `install` instead of `cp` to create leading directories should they not yet exist - install manpage to have documentation present along with the binary Signed-off-by: Georg Pfuetzenreuter --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9d9000a..6ebd8e0 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,15 @@ # ########################################################################## # default installation directory -INSTALLDIR=/usr/local/bin +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man all: install: - cp roffit $(DESTDIR)$(INSTALLDIR) + install -Dm0755 roffit $(DESTDIR)$(BINDIR)/roffit + install -Dm0644 roffit.1 $(DESTDIR)$(MANDIR)/man1/roffit.1 test: @perl roffit --bare < testpage.1 > testpage.dump