Makefile: fixes manpage installation location

This commit is contained in:
Emma Tebibyte 2024-09-05 12:57:55 -06:00
parent 87c9e29932
commit fde682a10e
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -22,9 +22,9 @@ OS_INCLUDE != test -e include/$(OS).mk && printf 'include/$(OS).mk\n' \
|| printf '/dev/null\n'
# normalized prefix
PREFIX_N != dirname $(PREFIX)/.
PREFIX_N != realpath $(PREFIX)
MANDIR != test $(PREFIX_N) = / && printf '/usr/share/man\n' \
|| printf '/share/man\n'
|| printf '$(PREFIX)/man\n'
SYSEXITS != printf '\043include <sysexits.h>\n' | cpp -M - | tr ' ' '\n' \
| sed -n 's/sysexits\.h//p' || printf 'include\n'
@ -54,9 +54,9 @@ clean:
rm -rf build dist
dist: all docs
mkdir -p $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(PREFIX)/$(MANDIR)/man1
mkdir -p $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(MANDIR)/man1
cp build/bin/* $(DESTDIR)/$(PREFIX)/bin
cp build/docs/*.1 $(DESTDIR)/$(PREFIX)/$(MANDIR)/man1
cp build/docs/*.1 $(DESTDIR)/$(MANDIR)/man1
.PHONY: install
install: dist