On May 6, 2025, at 11:09, Simon J. Gerraty <s...@juniper.net> wrote: > Mark Millard <mark...@yahoo.com> wrote: >>>> # cd /usr/src >>>> # make buildworld-jobs buildkernel-jobs >> >> The above used older commands and files from before >> the following install. META_MODE recorded the use of >> those commands. > > I'm sure you are aware, but maybe not everyone is, that bmake contains a > number of methods to tame META_MODEs enthusiasm for finding things to > make a target out-of-date. > > .MAKE.META.IGNORE_PATHS is the cheapest and generally most useful > > .MAKE.META.IGNORE_PATTERNS can be more selective and > > .MAKE.META.IGNORE_FILTER can be expensive, but let you do a lot more. > > With recent bmake (MAKE_VERSION > 20220126) you can also set target local > variables which means you can set say .MAKE.META.IGNORE_PATHS to apply > only to a given target. > > 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): # 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. === Mark Millard marklmi at yahoo.com