Subject: Re: New possibility to move "obj" logic *out* of make(1)
To: Simon Gerraty <sjg@juniper.net>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-toolchain
Date: 10/31/2001 15:11:33
On Wed, 31 Oct 2001, Simon Gerraty wrote:

: >Basically, the idea here is to cause make(1) to have zero innate knowledge
: >of objdirs by default, relegating handling to explicit .OBJDIR: rules only.
: >The command line option would re-enable the old logic, in the case that a
:
: You'd still need to move the code - since currentl objdir handling is
: done before the command line is parsed.

...which is easy enough to do.  I've become quite familiar with the innards
of {main,parse}.c in the past few days.  :)

: >user of a new make(1) might want to build a tree, such as an old NetBSD
: >tree, expecting classical BSD-make objdir handling.[*]
: >
: >[*] With the advent of the "POSIX compliance code" added by sjg, would
: >    compatibility with Old trees be possible anyway?  Should this
:
: I use -current make on all my boxes - 1.4.x onwards. I've not noticed
: any issues.

OK, that's what I wanted to know.  In which case:

: Besides, command line options suck for something you want every time.

I can just as easily leave the code inside make(1) as-is and override it in
<bsd.obj.mk>; the downside, of course, is that the default "find my objdir"
logic will get executed twice, causing more inode lookups and so forth.
And it won't fix the referenced PR.

To try this another way, how about a command line option that *turns off*
the built-in objdir logic?  This could be used to address the PR.

===

In any case, I'll fiddle up an implementation of the <bsd.obj.mk> portion of
this proposal and post it to tech-toolchain for review as soon as it's done.
This will essentially duplicate some of the default .OBJDIR searching, but
with the mentioned benefits of more flexibility and less ugliness such as
that caused by the current implementation of BSDSRCDIR/BSDOBJDIR rewriting.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/