From fde682a10ed1dd8bac28dd811c049874edf56c4a Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 5 Sep 2024 12:57:55 -0600 Subject: [PATCH 1/2] Makefile: fixes manpage installation location --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3536877..e48e8a4 100644 --- a/Makefile +++ b/Makefile @@ -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 \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 From accec333017ed1b9c6cccb555fc6a8e68556b8fd Mon Sep 17 00:00:00 2001 From: emma Date: Thu, 5 Sep 2024 17:12:39 -0600 Subject: [PATCH 2/2] Makefile: fixes abuse of relative paths --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e48e8a4..11f1954 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ OS_INCLUDE != test -e include/$(OS).mk && printf 'include/$(OS).mk\n' \ # normalized prefix PREFIX_N != realpath $(PREFIX) MANDIR != test $(PREFIX_N) = / && printf '/usr/share/man\n' \ - || printf '$(PREFIX)/man\n' + || printf '$(PREFIX_N)/man\n' SYSEXITS != printf '\043include \n' | cpp -M - | tr ' ' '\n' \ | sed -n 's/sysexits\.h//p' || printf 'include\n' @@ -54,8 +54,8 @@ clean: rm -rf build dist dist: all docs - mkdir -p $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(MANDIR)/man1 - cp build/bin/* $(DESTDIR)/$(PREFIX)/bin + mkdir -p $(DESTDIR)/$(PREFIX_N)/bin $(DESTDIR)/$(MANDIR)/man1 + cp build/bin/* $(DESTDIR)/$(PREFIX_N)/bin cp build/docs/*.1 $(DESTDIR)/$(MANDIR)/man1 .PHONY: install