Subject: toolchain/18875: "nbmake install" fails poorly if kernel wasn't previously built
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jcline@globespanvirata.com>
List: netbsd-bugs
Date: 10/31/2002 16:02:20
>Number:         18875
>Category:       toolchain
>Synopsis:       "nbmake install" fails poorly if kernel wasn't previously built
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 31 16:03:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     jcline@globespanvirata.com
>Release:        NetBSD 1.5.2 release
>Organization:
>Environment:
NetBSD 1.5.2 GENERIC_LAPTOP

>Description:
I'm building -current on NetBSD 1.5.2 in /usr/src.  
I've copied GENERIC_LAPTOP to JC-THINKPAD600X and
have mucked with it a bit.  I noticed that:

cd /usr/src/sys/arch/i386/compile/JC-THINKPAD600X
/usr/obj/tools/tools.NetBSD-1.5.2-i386/bin/nbmake-i386 clean
/usr/obj/tools/tools.NetBSD-1.5.2-i386/bin/nbmake-i386 depend
/usr/obj/tools/tools.NetBSD-1.5.2-i386/bin/nbmake-i386 install

This will happily attempt to "install" (cp without ever building).
I assume that 'install' does not have a dependency on the build
itself?  Shouldn't it?  The following output is generated:

-- cut & paste --

bash-2.05# /usr/obj/tools/tools.NetBSD-1.5.2-i386/bin/nbmake-i386 install
rm -f /onetbsd
ln /netbsd /onetbsd
cp netbsd /nnerbsd
cp: netbsd: No such file or directory
*** Error code 1

Stop.
-- cut --


Assuming the first thing the make rule does is 'rm -f /onetbsd' 
I think a dependency-protection is nice to have for 'install'.  
Not a real problem since I have my 1.5.2 kernel copied to a backup,
but otherwise /onetbsd would have been my only backup.  But I was surprised it didn't at least complain, "hey why don't you build a kernel first", or go ahead and build it. (Maybe there is good reason
for this.)

Sorry if this sounds picky.

>How-To-Repeat:
See above.

>Fix:
"Run 'make' before 'make install'"
or,
make the dependency do it automatically,
or,
make the dependency complain about it and abort.

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