Subject: Re: New possibility to move "obj" logic *out* of make(1)
To: Christos Zoulas <>
From: Todd Vierling <>
List: tech-userlevel
Date: 10/31/2001 10:43:29
On Wed, 31 Oct 2001, Christos Zoulas wrote:

: >While musing about it this morning, I realized that this new ability will
: >make it possible to move the logic which finds the obj directory out of
: >make(1) entirely, and into <>.
: >
: >This would fix PR bin/3938, which describes how our make(1) will happily
: >make use of an "obj" directory if it exists--even for third-party sources
: >that probably do not want that kind of handling.
: I would not go that far, but as a first step we could make it so that
: an empty
: rule, disables objdir handling in make. For that to work, we probably
: need to move the objdir directory changing code...

Well, this would require modifications to affected third-party code as
described by bin/3938.  It also doesn't address the points of being able to
maintain the detection code within <> so as to simplify

How about this?:

- move objdir handling to <>
- disable the built-in make(1) logic by default
- add command line option to *enable* the built-in make(1) objdir handling

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
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
    command line option possibly also turn on and "old BSD make"
    compatibility mode whereby the new POSIX behavior is turned off?

-- Todd Vierling <>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --