From 8e4169e29e419bfd986455bb809463a3fa433afb Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 31 Aug 2012 15:54:52 -0500 Subject: [PATCH] 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: X-Gentoo-Bug: 415899 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=415899 --- mk/sys.mk | 11 ++++++++--- 1 file 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