Re: buildkernel broken for META_MODE

From: Simon J. Gerraty <sjg_at_juniper.net>
Date: Tue, 18 Apr 2017 15:26:45 -0700
> > [Creating objdir /usr/obj/usr/obj/root/git/freebsd/sys/GENERIC...]
> Wrong^
> 
> Note we have 'cd /usr/obj/....' and 'MAKEOBJDIRPREFIX=/usr/obj' in
> there, so we get a nested /usr/obj/.CURDIR problem of /usr/obj/usr/obj.

The following would probably help that case:

Index: auto.obj.mk
===================================================================
RCS file: /volume/cvs/sjg/mk/auto.obj.mk,v
retrieving revision 1.13
diff -u -p -r1.13 auto.obj.mk
--- auto.obj.mk	24 Mar 2017 20:53:22 -0000	1.13
+++ auto.obj.mk	18 Apr 2017 22:25:08 -0000
_at__at_ -41,6 +41,10 _at__at_ MKOBJDIRS= auto
 # Use __objdir here so it is easier to tweak without impacting
 # the logic.
 .if !empty(MAKEOBJDIRPREFIX)
+.if ${.CURDIR:M${MAKEOBJDIRPREFIX}/*} != ""
+# we are already in obj tree!
+__objdir?= ${.CURDIR}
+.endif
 __objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR}
 .endif
 __objdir?= ${MAKEOBJDIR:Uobj}
Received on Tue Apr 18 2017 - 20:26:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC