Subject: bin/12937: cd /usr/src ; make BSDOBJDIR=/dne doesn't fail
To: None <>
From: None <>
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
>Originator:     Andrew Cagney
>Release:        1.5.1-beta
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

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).

	See above

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

Fix? I think the problem is in <> which reads:

        @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.