Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)
- Reply: Simon J. Gerraty: "Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)"
- In reply to: Simon J. Gerraty: "Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Feb 2023 21:12:35 UTC
On Feb 23, 2023, at 12:15, Simon J. Gerraty <sjg@juniper.net> wrote: > Mark Millard <marklmi@yahoo.com> wrote: >> The contribution to the list is currently generated via >> use of: >> >> .if ${.MAKE.LEVEL} == 0 > > Why is this guarded by .MAKE.LEVEL 0? > .MAKE.META.IGNORE_* should be largely irrelevant at level 0 > which in the DIRDEPS_BUILD is reserved for orchestration. > Even in the legacy build, level 0 would be just the top-level makefiles > and anything dealing with meta files would be expected to be level 1 or > greater. I never found a stable notation that provides a reference to whichever of my /usr/obj/BUILDs/*/usr/main-src/*.*/ the build is for. (I've been showing just main-amd64-nodbg-clang amd64.amd64 examples but there are many more.) MAKEOBJDIR, OBJTOP, etc. all looked to vary. But here the only place relevant is that one absolute path, no alternatives should be used as these other things move around for where they reference. MAKEOBJDIRPREFIX is another one that looked to vary, despite the environment assignment that I use to get things started. Note, too the := use. .MAKE.META.IGNORE_PATHS ends up with no references to MAKEOBJDIR or the like for my additions, just absolute paths. (I've also done experiments with :tA in use in the := assignment.) -V.MAKE.META.IGNORE_PATHS showed the correct result with my content. I may have inferred too much from that for my := use. (May be -V should not be based on .MAKE.LEVEL zero content as it can be misleading vs. what will actually be used?) So I was hoping for a "assigned once and inherited" status relative to submakes for .MAKE.META.IGNORE_PATHS . >> .for ignore_legacy_tool in awk cap_mkdb cat cp crunchgen crunchide dd egrep env file2c gencat grep gzip jot lex lb ln m4 mkcsmapper mktemp mv patch realpath rm sed sh touch truncate uudecode uuencode xargs >> .MAKE.META.IGNORE_PATHS+= ${MAKEOBJDIR}/tmp/legacy/usr/sbin/${ignore_legacy_tool} >> .endfor >> .for ignore_other_tool in ctfconvert objcopy nm >> .MAKE.META.IGNORE_PATHS+= ${MAKEOBJDIR}/tmp/usr/bin/${ignore_other_tool} >> .endfor >> .MAKE.META.IGNORE_PATHS:= ${.MAKE.META.IGNORE_PATHS} >> .endif >> >> The := use is how I avoided needing to worry about late binding >> substitutions for my additions (independent of the internals of >> make's specific .MAKE.META.IGNORE_PATHS handling). > > Depending on value of MAKEOBJDIR the above may not work at all. > The default is > > share/mk/src.sys.obj.mk:_default_makeobjdir= $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} > > In which case the above would not be correct. And I've not found any notation that is always correct but adjusts to what /usr/obj/BUILDs/*/usr/main-src/*.*/ I happen to be building for. The example that I've been showing is main-amd64-nodbg-clang with amd64.amd64 but there are other *-*-*dbg-* and *.* that I build for. (I have found multiple notations that work for -V.MAKE.META.IGNORE_PATHS .) I'm wondering if I need to invent a new, personal name that will not clash with official names and just use reference to to my name, adjusting my build scripts to provide the definition. So: I'm still searching for approriate notation, at least for the tmp/legacy/usr/ related paths. (The tmp/usr/bin/ experiment is more questionable it is appropriate overall.) Until I know a valid notational technique, expect to see experiments involved in what I do. Going the other way: if I'm to test something for you, let me know the context you want used instead of whatever my experiment status happens to be. >> For reference: >> >> # more ~/sys-build-scripts.amd64-host/make-main-amd64-nodbg-clang.amd64-host.sh >> kldload -n filemon && \ >> cd /usr/main-src/ && \ >> mkdir -p /usr/obj/BUILDs/main-amd64-nodbg-clang/sys-typescripts/ && \ >> script /usr/obj/BUILDs/main-amd64-nodbg-clang/sys-typescripts/typescript-make-amd64-nodbg-clang-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \ >> env __MAKE_CONF="/usr/home/root/src.configs/make.conf" SRCCONF="/dev/null" SRC_ENV_CONF="/usr/home/root/src.configs/src.conf.amd64-nodbg-clang.amd64-host" \ >> WITH_META_MODE=yes \ >> MAKEOBJDIRPREFIX="/usr/obj/BUILDs/main-amd64-nodbg-clang" \ >> make $* === Mark Millard marklmi at yahoo.com