Date: Tue, 6 May 2025 16:07:12 -0700 From: "Simon J. Gerraty" <sjg@juniper.net> To: Mark Millard <marklmi@yahoo.com> Cc: Nuno Teixeira <eduardo@FreeBSD.org>, FreeBSD Current <freebsd-current@FreeBSD.org>, <sjg@juniper.net> Subject: Re: incremental bulds from scratch with beinstall.sh Message-ID: <4421.1746572832@kaos.jnpr.net> In-Reply-To: <4ACBBC16-3BB6-436A-B0B1-A18F088B000E@yahoo.com> References: <28F2BDE7-5903-4C04-A570-6A407F19D5F2@yahoo.com> <49396.1746554966@kaos.jnpr.net> <C9CCEA0D-C397-4FAA-8459-E8A2CD468358@yahoo.com> <87401.1746562441@kaos.jnpr.net> <4ACBBC16-3BB6-436A-B0B1-A18F088B000E@yahoo.com>
index | next in thread | previous in thread | raw e-mail
Mark Millard <marklmi@yahoo.com> wrote:
> Yes, if the value of MAKEOBJDIRPREFIX isn't consistent that's going to
> cause problems (I'd call it a bug). If so don't use MAKEOBJDIRPREFIX
> directly, set some other variable and export that.
> Hmm src.sys.obj.mk plays games with MAKEOBJDIRPREFIX so that's
> probably not a good option.
> Perhaps:
>
> diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk
> index 3b48fc3c5514..3c7e570dbdbd 100644
> --- a/share/mk/src.sys.obj.mk
> +++ b/share/mk/src.sys.obj.mk
> @@ -67,6 +67,9 @@ SB_OBJROOT?= ${SB}/obj/
> OBJROOT?= ${SB_OBJROOT}
> .endif
> OBJROOT?= ${_default_makeobjdirprefix}${SRCTOP}/
> +# save the value before we mess with it
> +_OBJROOT:= ${OBJROOT:tA}
> +.export _OBJROOT
> .if ${OBJROOT:M*/} != ""
> OBJROOT:= ${OBJROOT:H:tA}/
> .else
I think you could use something like this, which should be safe to
commit:
diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk
index 708559edcdb8..e4fe3fa9a2aa 100644
--- a/share/mk/src.sys.obj.mk
+++ b/share/mk/src.sys.obj.mk
@@ -73,6 +73,12 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T}
.endif
# Must export since OBJDIR will dynamically be based on it
.export OBJROOT SRCTOP
+# if we didn't get SB_OBJROOT from env,
+# it is handy to set it now, so we can remember it
+.if empty(SB_OBJROOT)
+SB_OBJROOT:= ${OBJROOT}
+.export SB_OBJROOT
+.endif
.endif
.if ${MK_DIRDEPS_BUILD} == "no"
You can then use ${SB_OBJROOT} in your .MAKE.META.IGNORE_PATHS
The difference is that nothing in the FreeBSD build should ever touch
SB_OBJROOT so it should meet your need.
I think ;-)
And the above won't break our builds - which set SB_OBJROOT
before running make.
--sjg
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4421.1746572832>
