aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-01 22:12:33 +0000
committerRoy Marples <roy@marples.name>2008-03-01 22:12:33 +0000
commita135d0d93b6ff1aebd0064b4b2afbc7e0313b1fd (patch)
tree6636e575cb3d0b48288662c5a713810809028049 /mk
parent924ae8cadd589230b876c14d25dc8970b5842336 (diff)
Fix installing into PREFIX.
Diffstat (limited to 'mk')
-rw-r--r--mk/sys.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/mk/sys.mk b/mk/sys.mk
index e3111e37..2e62b652 100644
--- a/mk/sys.mk
+++ b/mk/sys.mk
@@ -7,7 +7,10 @@ INSTALL?= install
RANLIB?= ranlib
SH= /bin/sh
-PREFIX=
+PREFIX?=
+_UPREFIX_SH= case "${PREFIX}" in "") echo /usr;; *) echo "${PREFIX}";; esac
+_UPREFIX!= ${_UPREFIX_SH}
+UPREFIX= ${_UPREFIX}$(shell ${_UPREFIX_SH})
PKG_PREFIX= /usr/local
PICFLAG?= -fPIC
@@ -15,18 +18,18 @@ PICFLAG?= -fPIC
BINDIR?= ${PREFIX}/sbin
BINMODE?= 0755
-INCDIR?= ${PREFIX}/usr/include
+INCDIR?= ${UPREFIX}/include
INCMODE?= 0444
LIBNAME?= lib
-LIBDIR?= ${PREFIX}/usr/${LIBNAME}
+LIBDIR?= ${UPREFIX}/${LIBNAME}
LIBMODE?= 0444
SHLIBDIR?= ${PREFIX}/${LIBNAME}
-MANDIR?= ${PREFIX}/usr/share/man/man
+MANDIR?= ${UPREFIX}/share/man/man
MANMODE?= 0444
-DOCDIR?= ${PREFIX}/usr/share/doc
+DOCDIR?= ${UPREFIX}/share/doc
DOCMODE?= 0644
CONFMODE?= 0644