Deal with MAKEOBJDIRPREFIX

MAKEOBJDIRPREFIX does not really fit our model.
Use it to set OBJROOT to about where user expects
and set MAKEOBJDIR to do what we want.
This commit is contained in:
Simon J. Gerraty 2015-06-20 21:48:07 +00:00
parent 764a9bbee1
commit 916c1cd0ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284650

View File

@ -8,6 +8,18 @@
MK_INSTALL_AS_USER= yes
.if empty(OBJROOT) || ${.MAKE.LEVEL} == 0
.if defined(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX})
.warning MAKEOBJDIRPREFIX not supported; setting MAKEOBJDIR...
# put things approximately where they want
OBJROOT:=${MAKEOBJDIRPREFIX}${SRCTOP:S,/src,,}/
# OBJTOP set below
MAKEOBJDIR=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},}
MAKEOBJDIRPREFIX=
# export but do not track
.export-env MAKEOBJDIRPREFIX MAKEOBJDIR
# now for our own use
MAKEOBJDIR= ${.CURDIR:S,${SRCTOP},${OBJTOP},}
.endif
.if !empty(SB)
SB_OBJROOT ?= ${SB}/obj/
# this is what we use below