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
This commit is contained in:
William Hubbs 2012-08-31 15:54:52 -05:00
parent ea696b47c8
commit 8e4169e29e

View File

@ -11,9 +11,14 @@ SED?= sed
SH= /bin/sh SH= /bin/sh
PREFIX?= PREFIX?=
_UPREFIX_SH= case "${PREFIX}" in "") echo /usr;; *) echo "${PREFIX}";; esac ifeq (${PREFIX},)
_UPREFIX:= $(shell ${_UPREFIX_SH}) UPREFIX= /usr
UPREFIX= ${_UPREFIX} else
UPREFIX= ${PREFIX}
ifeq (${MKPREFIX},yes)
UPREFIX= ${PREFIX}/usr
endif
endif
LOCAL_PREFIX= /usr/local LOCAL_PREFIX= /usr/local
PICFLAG?= -fPIC PICFLAG?= -fPIC