aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2012-08-31 15:54:52 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-08-31 16:50:49 -0500
commit8e4169e29e419bfd986455bb809463a3fa433afb (patch)
treeba565914bd9fa9a38f7866f7438b016d293d12d0 /mk
parentea696b47c875755a28ffd5dea15680172db1f50d (diff)
Fix UPREFIX for Gentoo Prefix installations
Make sure UPREFIX in our make files gets set correctly when MKPREFIX=yes. In this situation, UPREFIX should be ${PREFIX}/usr. Reported-by: <heroxdb@gentoo.org> X-Gentoo-Bug: 415899 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=415899
Diffstat (limited to 'mk')
-rw-r--r--mk/sys.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/sys.mk b/mk/sys.mk
index efa478c1..251287f1 100644
--- a/mk/sys.mk
+++ b/mk/sys.mk
@@ -11,9 +11,14 @@ SED?= sed
SH= /bin/sh
PREFIX?=
-_UPREFIX_SH= case "${PREFIX}" in "") echo /usr;; *) echo "${PREFIX}";; esac
-_UPREFIX:= $(shell ${_UPREFIX_SH})
-UPREFIX= ${_UPREFIX}
+ifeq (${PREFIX},)
+UPREFIX= /usr
+else
+UPREFIX= ${PREFIX}
+ifeq (${MKPREFIX},yes)
+UPREFIX= ${PREFIX}/usr
+endif
+endif
LOCAL_PREFIX= /usr/local
PICFLAG?= -fPIC