From owner-freebsd-current Thu Jun 27 03:19:28 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA16545 for current-outgoing; Thu, 27 Jun 1996 03:19:28 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA16513 for ; Thu, 27 Jun 1996 03:18:22 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id UAA05121; Thu, 27 Jun 1996 20:12:55 +1000 Date: Thu, 27 Jun 1996 20:12:55 +1000 From: Bruce Evans Message-Id: <199606271012.UAA05121@godzilla.zeta.org.au> To: bde@zeta.org.au, freebsd-current@FreeBSD.ORG, mark@linus.demon.co.uk, nate@sri.MT.net Subject: Re: Building inside of /usr/src? Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> Fix: restore the old behaviour of make and introduce a new environment >> variable MAKEOBJTREE to control the new behaviour. The priorities should >> be: >> >> $MAKEOBJDIR (if MAKEOBJDIR is set) (highest) >> obj.$machine >> obj >> $MAKEOBJTREE/`pwd` (if MAKEOBJTREE is set) >> . >I dislike the redundant MAKEOBJTREE (since BSDOBJDIR already contains >that location). Actually, isn't the only thing required here a *boolean* >variable, complementary to NOOBJ and NOOBJLINK in bsd.obj.mk? MAKEOBJTREE is named to suggest that it belongs to make(1). BSDOBJDIR was only a little-known variable in the (Free?)BSD makefiles. Now it is only a little-used variable in bsd.port.mk. There has to be such a (tree) variable if make knows nothing about object trees. The reason for putting this knowledge in make is that builtins are easier to use. Getting the current behaviour using the old MAKEOBJDIR semantics would involve lots of substitutions: MAKEOBJDIR= ${.CURDIR:S;^;/usr/obj;} # current behaviour MAKEOBJDIR= ${.CURDIR:S;^/usr/src;/usr/obj;} # old behaviour MAKEOBJDIR= ${.CURDIR:S${BSDOBJTREESUBST}} # I couldn't get this to work Hmm, this isn't very hard. Put this in bsd.src.mk (a new file that centralizes common stuff for building /usr/src) and avoid touching make(1) or *.mk. Why did the old way use all those shell commands with pwd's? :-) Bruce