Re: buildworld: specifying an alternate make.conf

From: Ede Wolf <listac_at_nebelschwaden.de>
Date: Tue, 03 Oct 2023 14:54:53 UTC
Am 03.10.23 um 15:52 schrieb Matthew Seaman:
> On 03/10/2023 13:48, Ede Wolf wrote:
> 
>> to my understanding of man make and make.conf, which admittedly is 
>> very limited, I should be able to specify an alternate make.conf with 
>> this syntax:
>>
>> # make -D __MAKE_CONF=<PATH>/make.conf buildworld
>>
>> Now, since this looks somewhat strage - nowhere else I have found make 
>> variables with double underscores - and before wasting hours of 
>> compiling, I am wondering, is above correct? Or did I miss[understand] 
>> anything?
> 
> Adding a leading underscore to a variable name is a common idiom for 
> "this variable is implementation defined, do not mess with it."  Two 
> underscores re-emphasizes all that, and typically means the value is 
> considered private and internal -- useful in languages which have no 
> built-in capability to hide their internals.
> 
> In your case, however, it seems that overriding __MAKE_CONF really is 
> the documented method of pointing your build environment at a different 
> make.conf file.  Presumably the concept was that almost everyone would 
> just edit /etc/make.conf to suit themselves, and almost no-one would 
> ever need to switch between alternative make.conf files.
> 
> Note: if you're trying to configure building the base system, then you 
> probably want to customize /etc/src.conf as described in the src.conf(5) 
> man page.  There's a lot of overlap between make.conf and src.conf, but 
> make.conf also affects building ports whereas src.conf only applies to 
> building the base system.
> 
>      Cheers,
> 
>      Matthew
> 

Hello Matthew,

Thanks for the advise, this is what I am trying to archive, as I am 
using make.conf exactly to primarily  point to another src.conf and 
src-env.conf (shortend, the full version is in another reply):
#

MAKE_SHELL?=sh

SRCCONF=/data/admin/build/vbox/src.conf
SRC_ENV_CONF=/data/admin/build/vbox/src-env.conf

Basically I want all three {make,src,src-env}.conf to reside within the 
same folder (that is not /etc), one for each host this machine is 
buiding base for.

However, it seems, my src-env.conf is not being honored, not sure about 
the contents of src.conf.