Subject: bin/3938: make(1) erroneously builds in ./obj if it exists
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mcnab@nas.nasa.gov>
List: netbsd-bugs
Date: 08/04/1997 16:22:56
>Number:         3938
>Category:       bin
>Synopsis:       make(1) erroneously builds in ./obj if it exists
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug  4 16:35:01 1997
>Last-Modified:
>Originator:     David McNab
>Organization:
NAS Parallel Systems, MRJ at NASA/Ames
>Release:        NetBSD 1.2E
>Environment:

System: NetBSD aargh 1.2E NetBSD 1.2E (MCNAB-AARGH) #1: Tue Jun 10 15:46:15 PDT 1997 root@aargh:/usr/src/sys/arch/i386/compile/MCNAB-AARGH i386

>Description:

If make(1) is invoked in a directory with a 'obj' subdirectory,
by default it builds in 'obj' instead of the current directory.

>How-To-Repeat:

Create a simple makefile that touches a file and create an
'obj' subdirectory.  Type make(1) and the file will be created
in the subdirectory.

>Fix:

If the user hasn't asked for a non-cwd build, don't do one.

It looks like make(1) sets .OBJDIR from _PATH_OBJDIR (#def'd 
in make/pathnames.h) by default if the user hasn't set MAKEOBJDIR.
_PATH_OBJDIR should either be empty or the code shouldn't even
look at it.
>Audit-Trail:
>Unformatted: