svn commit: r325696 - head/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Sat Nov 11 01:10:43 UTC 2017


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


More information about the svn-src-all mailing list