Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2020 07:47:16 +0200
From:      Ede Wolf <>
Subject:   Re: Moving sources (base/ports) from /usr
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

> 	SRCDIR you can leave alone, just move /usr/src anywhere you like
> and so long as you change into that directory to build all should be good
> because the Makefile sets everything up based on CURDIR. 

Basically you are right. For makebuild[world|kernel] that is correct, it 
is just that setting SOURCEDIR saves a question during mergemaster:

# mergemaster -Ui

*** /usr/src was not found.
     Found Makefile.inc1 in the current directory.
     Would you like to set SOURCEDIR to /clutter/src? [no and exit]

Since mergemaster is most of the time interactive anyway, you really do 
not lose very much, if unset.

But if one decides to define it, it has to be in the shell environment 
(export SOURCEDIR...), as src-env.conf or make.conf do not seem to work, 
unless I've missed something.

Verdict: So far for base only  setting MAKEOBJDIRPREFIX?= is required. 
Nice. Way easier than anticipated.

Side note: The use of "?=" seems a little counter intuitive, as one 
would suspect, that any predefined value of MAKEOBJDIRPREFIX will point 
to /usr/obj and thus render our setting useless, but in reality it does 
somehow work.
Having completely removed /usr/obj and /usr/src beforehand, no /usr/obj 
is being created (until installworld, that is) and the build still 
finishes cleanly.
It also does work with just "=", this choice just generates a whole 
bunch of warning of the kind:

make[1]: "/clutter/src/share/mk/" line 50: warning: 
/etc/src-env.conf: Ignoring MAKEOBJDIRPREFIX entry in sub-make.  Use 
'?=' to avoid this warning.

Some information on this (mostly way above my level of understanding):

And I figured, build(7) is a little outdated, as the recommended 
WITH_UNIFIED_OBJDIR has been removed with 12, there just is an 
WITHOUT_UNIFIED_OBJDIR now. See "20171101" in src/UPDATING

On to ports now.

Thanks again to all

Want to link to this message? Use this URL: <>