From: Thomas Anderson Date: Wed, 8 Apr 2015 00:28:07 +0000 (-0700) Subject: Add support for differing PREFIX and MANPREFIX. X-Git-Tag: 2.10~35^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=12709cc751121d8c8c3ead02d9f1056c37e5ed89;p=i3%2Fi3status Add support for differing PREFIX and MANPREFIX. Sometimes we do not want man pages to go to $(PREFIX)/man, as in the case of cross-compiling on distributions such as Exherbo. --- diff --git a/Makefile b/Makefile index d357b41..cf52d90 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ ifndef PREFIX PREFIX=/usr endif +ifndef MANPREFIX + MANPREFIX=$(PREFIX) +endif ifndef SYSCONFDIR ifeq ($(PREFIX),/usr) SYSCONFDIR=/etc @@ -95,12 +98,12 @@ manpage: install: install -m 755 -d $(DESTDIR)$(PREFIX)/bin install -m 755 -d $(DESTDIR)$(SYSCONFDIR) - install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 755 -d $(DESTDIR)$(MANPREFIX)/share/man/man1 install -m 755 i3status $(DESTDIR)$(PREFIX)/bin/i3status # Allow network configuration for getting the link speed (which setcap && setcap cap_net_admin=ep $(DESTDIR)$(PREFIX)/bin/i3status) || true install -m 644 i3status.conf $(DESTDIR)$(SYSCONFDIR)/i3status.conf - install -m 644 man/i3status.1 $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 644 man/i3status.1 $(DESTDIR)$(MANPREFIX)/share/man/man1 release: [ -f i3status-${VERSION} ] || rm -rf i3status-${VERSION}