Subject: Re: Should make create $MAKEOBJDIR ?
To: David Laight <>
From: Simon J. Gerraty <>
List: tech-userlevel
Date: 03/18/2003 13:55:26
>OK have (yet another) random environment variable that causes make to
>1) abort if MAKEOBJDIR is set and the directory doesn't exist

FWIW this is what I do with my builds at work.
BUT I have a reasonably tightly controlled build env.
We only support doing objdirs _one_ way ($MAKEOBJDIR) and only
in what we call a "sandbox" (name comes from ODE - basically means
the environment is properly conditioned for the build).

In (freebsd derrived btw)

.if !defined(NOOBJ) && ${.OBJDIR} != ${CANONICALOBJDIR}
.if ${.OBJDIR} == ${.CURDIR}
.if ${MACHINE_ARCH} != "i386" && ${HOST_OBJTOP} == ${OBJTOP}
	@echo "ERROR: Need to run 'mksb -n ${SB} -cvs no -obj arch ${CVS_RELEASE_TAG}'"
	@echo "ERROR: Need to run 'mk${OBJTOP:T:Mobj-${MACHINE_ARCH}:S/obj//} obj' in ${_CURDIR}"; false

ie. it spews out the command line(s) needed to remedy the situation
before bailing.