Re: mergemaster internally using make [for example] vs. WITH_META_MODE?

From: Mark Millard <markmi_at_dsl-only.net>
Date: Tue, 14 Jun 2016 17:13:22 -0700
On 2016-Jun-14, at 9:25 AM, Bryan Drewery <bdrewery at FreeBSD.org> wrote:

> On 6/13/2016 4:31 PM, Mark Millard wrote:
>> On 2016-Jun-13, at 3:27 PM, Bryan Drewery <bdrewery at FreeBSD.org> wrote:
>> 
>>> On 6/11/2016 7:28 PM, Mark Millard wrote:
>>>> mergemaster [as an example] has code like:
>>>> 
>>>>> # grep -i make /usr/sbin/mergemaster | more
>>>> . . .
>>>>> MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk"
>>>>>       ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs >/dev/null
>>>>>     ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs >/dev/null &&
>>>>>     ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc >/dev/null &&
>>>>>     ${MM_MAKE} everything SUBDIR_OVERRIDE=etc >/dev/null &&
>>>>>     ${MM_MAKE} DESTDIR=${TEMPROOT} distribution >/dev/null;} ||
>>>> . . .
>>>> 
>>>> If one is using WITH_META_MODE= for buildworld, buidlkernel, installkernel, installworld what is appropriate for scripts or other uses of make for other makefile-targets?
>>>> 
>>>> Are there explicit mixes of using WITH_META_MODE= for some makefile targets and not using WITH_META_MODE= for other makefile targets that need to be avoided? Does one need to force some scripts to use [or not use] WITH_META_MODE= for their "internal" make usage?
>>>> 
>>> 
>>> Is there an actual bug with mergemaster with WITH_META_MODE?
>>> 
>>> 
>>> -- 
>>> Regards,
>>> Bryan Drewery
>> 
>> I do not know. I was not sure if lack of WITH_META_MODE=yes for mergemaster's internal make uses might mess up later make commands that use WITH_META_MODE=yes for explicit make activities. Overall that would be a mix of with and without.
>> 
>> As stands I use the following script for mergemaster (TARGET_ARCH=amd64 example):
>> 
>> # more ~/sys_build_scripts.amd64-host/mergemaster_amd64-amd64-host.sh 
>> script ~/sys_typescripts/typescript_mergemaster_amd64-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \
>> env __MAKE_CONF="/root/src.configs/make.conf" SRC_ENV_CONF="/root/src.configs/src.conf.amd64-clang-bootstrap.amd64-host" \
>> MAKEOBJDIRPREFIX="/usr/obj/clang/amd64.amd64" \
>> mergemaster -A amd64 $*
>> 
>> I've not added WITH_META_MODE=yes to the env yet.
>> 
>> 
>> I've been wondering if I should add WITH_META_MODE=yes to such scripts when the matching "make" script uses WITH_META_MODE=yes --such as:
>> 
>> # more ~/sys_build_scripts.amd64-host/make_amd64_nodebug_clang_bootstrap-amd64-host.sh 
>> kldload -n filemon && \
>> script ~/sys_typescripts/typescript_make_amd64_nodebug_clang_bootstrap-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \
>> env __MAKE_CONF="/root/src.configs/make.conf" SRC_ENV_CONF="/root/src.configs/src.conf.amd64-clang-bootstrap.amd64-host" \
>> WITH_META_MODE=yes \
>> MAKEOBJDIRPREFIX="/usr/obj/clang/amd64.amd64" \
>> make $*
>> 
> 
> The targets (at top-level) that META_MODE is applied to is a whitelist
> now after r301887.  So it's safe to always pass it when building from
> the top-level.  If it's an unsupported target it will internally disable
> META_MODE.

So WITH_META_MODE=yes is now always allowed. That still leaves the questions of when WITH_META_MODE=yes is necessary: For example, is it ever required for the likes of mergemaster? (I'll use mergemaster to illustrate a more general question that applies to other potential scripts as well.)

As far as I can tell scripts such as mergemaster currently never supply WITH_META_MODE=yes to their internal make commands on their own.

It may be that this never interferes with anything, including use of WITH_META_MODE=yes for buildworld, installworld, and the like. If so then WITH_META_MODE=yes need never be used for mergemaster.

But if omitting WITH_META_MODE=yes for mergemaster can interfere with WITH_META_MODE=yes for buildworld, installworld, and the like then it would be important that "env WITH_META_MODE=yes mergemaster" be used if one is using WITH_META_MODE=yes for buildworld and the like.

Is it known which is the case? If yes, then which is the case?

If one orientation for meta mode status always is okay for mergemaster no matter which way is in use for buildworld and the like, then it would likely be best if mergemaster was coded to always/automatically use that orientation.

>> 
>> [Based on current behavior I normally only use WITH_META_MODE=yes for the host targeting its own architecture.]
> 
> Cross should be fine now.

At some point I'll experiment with it again. It may be a while before I get to that.

>> ===
>> Mark Millard
>> markmi at dsl-only.net
>> 
> 
> 
> -- 
> Regards,
> Bryan Drewery


===
Mark Millard
markmi at dsl-only.net
Received on Tue Jun 14 2016 - 22:13:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC