1st build stops when WITH_AUTO_OBJ=yes

Simon J. Gerraty sjg at juniper.net
Sat Nov 12 01:43:04 UTC 2016


Renato Botelho <garga at freebsd.org> wrote:
> > Interesting; what .OBJDIR do you end up with for say bin/cat ?
> 
> 
> In this case it fails the first time pointing to expected .OBJDIR, then second time I run it builds
> 
> /u/s/b/cat # ❯❯❯ make -DWITH_AUTO_OBJ
> [Creating objdir obj...]
> make: "/usr/src/share/mk/auto.obj.mk" line 61: could not use obj: .OBJDIR=/usr/obj/usr/src/bin/cat

The creating line is the clue, it is just obj
rather than say /usr/obj/usr/src/bin/cat

Do you have MAKEOBJDIRPREFIX set in env?
Or are you relying on bsd.obj.mk to set
CANONICALOBJDIR:=/usr/obj${.CURDIR}

?

Since we need to do auto.obj.mk *very* early (so .PATH is correct),
it is probably relying on MAKEOBJDIRPREFIX or MAKEOBJDIR
(I always have MAKEOBJDIR set) since bsd.obj.mk will not be included
yet.

If that's all the case though I wouldn't expect it to work any better on
subsequent runs.


More information about the freebsd-current mailing list