Subject: Re: Should make create $MAKEOBJDIR ?
To: David Laight <david@l8s.co.uk>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-userlevel
Date: 03/18/2003 13:55:26
>OK have (yet another) random environment variable that causes make to
>either:
>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 bsd.obj.mk (freebsd derrived btw)
objwarn:
.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}'"
.endif
@echo "ERROR: Need to run 'mk${OBJTOP:T:Mobj-${MACHINE_ARCH}:S/obj//} obj' in ${_CURDIR}"; false
.endif
.endif
ie. it spews out the command line(s) needed to remedy the situation
before bailing.
--sjg