Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 13:12:35 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        "Simon J. Gerraty" <sjg@juniper.net>
Cc:        Bryan Drewery <bdrewery@FreeBSD.org>, Current FreeBSD <freebsd-current@FreeBSD.org>, Peter <pmc@citylink.dinoex.sub.org>
Subject:   Re: FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)
Message-ID:  <AE95CF5D-0B7E-4DA3-8777-5FA47E1751D8@yahoo.com>
In-Reply-To: <42586.1677183334@kaos.jnpr.net>
References:  <B74790D9-FBC2-4818-BEAF-34E5B705C460@yahoo.com> <3345EBA5-A09C-4E3F-B94D-39F57F56BDBB@yahoo.com> <DB0C7B41-2101-4C5C-BFC8-3C95CC0B9F6F@yahoo.com> <73088.1611797582@kaos.jnpr.net> <CB7040D0-3BF4-496F-A54F-87E5378016E0@yahoo.com> <F6BF110D-7855-4A10-A53F-52B34282234F@yahoo.com> <10819.1677108389@kaos.jnpr.net> <76FA98EF-6184-4D7E-A01F-0EE8117D0D10@yahoo.com> <29887.1677115125@kaos.jnpr.net> <27790339-240F-4C97-97C7-38AFD8DE03D5@yahoo.com> <7FB6F619-6E71-4075-8A6C-573564371DD5@yahoo.com> <2655.1677134606@kaos.jnpr.net> <242BB478-B2FE-4BCC-A56E-098F3FEB3EE1@yahoo.com> <42586.1677183334@kaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>>=20
>> .if ${.MAKE.LEVEL} =3D=3D 0
>=20
> 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.=20

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 :=3D 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 :=3D assignment.)

-V.MAKE.META.IGNORE_PATHS showed the correct
result with my content. I may have inferred too
much from that for my :=3D 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+=3D =
${MAKEOBJDIR}/tmp/legacy/usr/sbin/${ignore_legacy_tool}
>> .endfor
>> .for ignore_other_tool in ctfconvert objcopy nm
>> .MAKE.META.IGNORE_PATHS+=3D =
${MAKEOBJDIR}/tmp/usr/bin/${ignore_other_tool}
>> .endfor
>> .MAKE.META.IGNORE_PATHS:=3D ${.MAKE.META.IGNORE_PATHS}
>> .endif
>>=20
>> The :=3D 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).
>=20
> Depending on value of MAKEOBJDIR the above may not work at all.
> The default is
>=20
> share/mk/src.sys.obj.mk:_default_makeobjdir=3D =
$${.CURDIR:S,^$${SRCTOP},$${OBJTOP},}
>=20
> 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=20
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:
>>=20
>> # 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-amd=
64-nodbg-clang-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \
>> env __MAKE_CONF=3D"/usr/home/root/src.configs/make.conf" =
SRCCONF=3D"/dev/null" =
SRC_ENV_CONF=3D"/usr/home/root/src.configs/src.conf.amd64-nodbg-clang.amd6=
4-host" \
>> WITH_META_MODE=3Dyes \
>> MAKEOBJDIRPREFIX=3D"/usr/obj/BUILDs/main-amd64-nodbg-clang" \
>> make $*



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AE95CF5D-0B7E-4DA3-8777-5FA47E1751D8>