Date: Tue, 6 May 2025 13:14:01 -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: <87401.1746562441@kaos.jnpr.net> In-Reply-To: <C9CCEA0D-C397-4FAA-8459-E8A2CD468358@yahoo.com> References: <28F2BDE7-5903-4C04-A570-6A407F19D5F2@yahoo.com> <49396.1746554966@kaos.jnpr.net> <C9CCEA0D-C397-4FAA-8459-E8A2CD468358@yahoo.com>
index | next in thread | previous in thread | raw e-mail
Mark Millard <marklmi@yahoo.com> wrote:
> > Of course trying to get too clever can end up being counter productive,
> > but the tools are there...
>
> I still have the addition that we found was needed
> in my experiments years ago (white space details
> below may not have been preserved):
IIRC there are a few problem locations in the build where this or
similar caused problems. I think this relates to some hierarchies being
built with custom env - which makes it hard for src.sys.obj.mk to always
get things right.
I think the change below or close to it has been committed and reverted
in the past.
>
> # git -C /usr/main-src/ diff share/
> diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk
> index 708559edcdb8..e710ae057fc6 100644
> --- a/share/mk/src.sys.obj.mk
> +++ b/share/mk/src.sys.obj.mk
> @@ -66,6 +66,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
>
> where I had to use _OBJROOT to have 2 appropriate paths
> built. (See later below.)
>
> It is still not part of the official share/mk/src.sys.obj.mk
> so I normally avoid referencing it or what would involve
> its use. But I've not checked if it has been added via some
> other place providing the definition.
>
> Used via:
>
> # grep -r "\<_OBJROOT\>" ~/src.configs/
> /root/src.configs/make.conf:# _OBJROOT is an addition to share/mk/src.sys.obj.mk
> /root/src.configs/make.conf:# +_OBJROOT:= ${OBJROOT:tA}
> /root/src.configs/make.conf:# +.export _OBJROOT
> /root/src.configs/make.conf:IGNORELEGACY_NOSYMLINKPREFIX= ${_OBJROOT}/${TARGET}.${TARGET_ARCH}/tmp/legacy/usr
> /root/src.configs/make.conf:IGNOREOTHER_NOSYMLINKPREFIX= ${_OBJROOT}/${TARGET}.${TARGET_ARCH}/tmp/usr/bin
>
> It was associated with symbolic links begin involved.
Your use of _OBJROOT looks similar to how we (Juniper) use SB_OBJROOT.
We run make via a wrapper which defines SB (location of the tree) and a
number of SB_* variables which can be assumed correct. It also obviates
the need for make.conf
Of course our build is never used to "install" anything - we just build
packages which are then installed, so it is much simpler.
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87401.1746562441>
