Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Nov 2017 01:10:41 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325696 - head/share/mk
Message-ID:  <201711110110.vAB1AfMx006689@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Sat Nov 11 01:10:41 2017
New Revision: 325696
URL: https://svnweb.freebsd.org/changeset/base/325696

Log:
  Handle MAKEOBJDIRPREFIX when already inside of .OBJDIR.
  
  This can happen in obscure cases with things like the kernel build.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  head/share/mk/src.sys.obj.mk

Modified: head/share/mk/src.sys.obj.mk
==============================================================================
--- head/share/mk/src.sys.obj.mk	Sat Nov 11 01:10:08 2017	(r325695)
+++ head/share/mk/src.sys.obj.mk	Sat Nov 11 01:10:41 2017	(r325696)
@@ -102,7 +102,12 @@ OBJROOT:=	${OBJTOP}/
 # __objdir is the expected .OBJDIR we want to use and that auto.obj.mk will
 # try to create.
 .if !empty(MAKEOBJDIRPREFIX)
+.if ${.CURDIR:M${MAKEOBJDIRPREFIX}/*} != ""
+# we are already in obj tree!
+__objdir=	${.CURDIR}
+.else
 __objdir:=	${MAKEOBJDIRPREFIX}${.CURDIR}
+.endif
 .elif !empty(MAKEOBJDIR)
 __objdir:=	${MAKEOBJDIR}
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711110110.vAB1AfMx006689>