Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)

From: Simon J. Gerraty <sjg_at_juniper.net>
Date: Fri, 24 Feb 2023 03:54:40 UTC
> 
> First some output log lines around a few sbin/realpath "is newer than"
> related Building lines, with the .info lines in place now (I've
> got both kmod.mk and kern.mk with the .info line, likely producing
> redundant output but I did not know up front for sure):
> 
> make[4]: "/usr/main-src/sys/conf/kmod.mk" line 72:
> .CURDIR=/usr/main-src/sys/modules/aac
> .OBJDIR=/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/sys/GENERIC-NODBG/modules/usr/main-src/sys/modules/aac
> OBJTOP=/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/sys/GENERIC-NODBG/modules/usr/main-src

So as you can see that OBJTOP not does provide a match for where
/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/legacy/usr/sbin/realpath is

you really want it fixed at

/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64

which is difficult given the way it is defined in
src.sys.obj.mk

Perhaps you want to be using

.MAKE.META.IGNORE_PATHS+= ${MAKEOBJDIRPREFIX}/tmp/legacy/usr
or is that ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}/tmp/legacy/usr