Subject: port-i386/10997: snapshot on i386 broken on 1.5
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jchacon@genuity.net>
List: netbsd-bugs
Date: 09/12/2000 08:30:15
>Number:         10997
>Category:       port-i386
>Synopsis:       Snapshots won't build on 1.5 if you don't happen to have
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 12 08:31:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     James Chacon
>Release:        Netbsd-1.5 ALPHA2 tree (sup'd as of 09/11)
>Organization:
>Environment:
System: NetBSD quix 1.5_ALPHA NetBSD 1.5_ALPHA (QUIX) #0: Mon Jul 10 20:31:02 EDT 2000 root@quix:/usr/src/sys/arch/i386/compile/QUIX i386


>Description:

Attempt to build a snapshot on x86 without MAKEOBJDIRPREFIX set. It'll either
die in cleandir in sys/arch/i386/stand/biosboot or when it tries to make there.
The error is non-obvious because of the way shell works here.

sys/arch/i386/stand/lib/Makefile.inc was brought up from the trunk to support
objdir builds again. In doing so there's an unset MAKEOBJDIRPREFIX in there
when it goes to run the real make. Shell however sets $? to 1 if you unset
a var that wasn't defined. There's no output so make appears to die silently
here (and tracking this down is very painful).

>How-To-Repeat:

unset MAKEOBJDIRPREFIX
cd <src>/sys/arch/i386/stand/biosboot
make

>Fix:

Do what the trunk code does (and should have been in the pullup). Null the
value out (and therefore define the var if it wasn't.). Then unset it.

cvs diff Makefile.inc
Index: Makefile.inc
===================================================================
RCS file: /usr/local/cvs/src/sys/arch/i386/stand/lib/Makefile.inc,v
retrieving revision 1.2
diff -u -r1.2 Makefile.inc
--- Makefile.inc        2000/09/10 01:18:39     1.2
+++ Makefile.inc        2000/09/12 14:52:54
@@ -20,7 +20,7 @@
 I386LIB=               ${I386DST}/libi386.a

 I386MAKE= \
-       cd ${I386DIR} && unset MAKEOBJDIRPREFIX && \
+       cd ${I386DIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
          MAKEOBJDIR=${I386DST} ${MAKE} \
            CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
            AS=${AS:Q} AFLAGS=${AFLAGS:Q} \


>Release-Note:
>Audit-Trail:
>Unformatted:
 		MAKEOBJDIRPREFIX already set.