Subject: bin/12937: cd /usr/src ; make BSDOBJDIR=/dne doesn't fail
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cagney@tpgi.com.au>
List: netbsd-bugs
Date: 05/13/2001 14:17:17
>Number:         12937
>Category:       bin
>Synopsis:       cd /usr/src ; make BSDOBJDIR=/dne doesn't fail
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 14 08:55:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Cagney
>Release:        1.5.1-beta
>Organization:
	
>Environment:
	
NetBSD localhost 1.5V NetBSD 1.5V (NETLUX) #0: Sat May 12 23:09:17 EDT 2001     boor@localhost:/usr/trunk.src/sys/arch/macppc/compile/NETLUX macppc

>Description:
The command sequence:

	cd /usr/src
	make BSDOBJSDIR=/does/not/exist obj

does not fail.  I think it should.  It instead ends up seting the
obj links to /does/not/exist/.../<dir> but ignores the lack of
a directory.

The later build phase then comes through droping all the object files
in $srcdir rather than $srcdir/obj (since the latter doesn't exist).

>How-To-Repeat:
	See above
>Fix:
Workaround:

	mkdir -p ${BSDOBJDIR} ; ....

Fix? I think the problem is in <bsd.obj.mk> which reads:

obj:
        @cd ${.CURDIR}; \
	.....
                if test -d ${__usrobjdir} -a ! -d $$dest; then \
                        mkdir -p $$dest; \
                else \
                        true; \
                fi; \

If ${__usrobjdir} doesn't exist then I think it should fail rather
than ignore the problem.


>Release-Note:
>Audit-Trail:
>Unformatted: