Subject: toolchain/20061: distrib/sets/makeobsolete uses host's make
To: None <gnats-bugs@gnats.netbsd.org>
From: None <uwe@netbsd.org>
List: netbsd-bugs
Date: 01/25/2003 20:40:59
>Number:         20061
>Category:       toolchain
>Synopsis:       distrib/sets/makeobsolete uses host's make
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 25 20:42:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Valeriy E. Ushakov
>Release:        1.6M
>Organization:
>Environment:
FreeBSD sampo.xxx.xxx.xx 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Jun 27 04:33:50 MSD 2002     toor@sampo.xxx.xxx.xx:/usr/obj/usr/src/sys/SAMPO  i386
>Description:
Shell scripts in distrib/sets start with:

make="${MAKE:-make} ..."

and the Makefile in taht directory takes care of passing MAKE in environment

MAKE=${MAKE:Q}

via the SETSENV variable.


However the makeobsolete script is not run from that directory 
and in places where it is invoked the MAKE is not being set in the environment - so makeobsolete invokes host's make that will be very confused about NetBSD makefiles.


E.g. obsolete check in postinstall checks when building on FreeBSD host produces a lot of warnign from (host's make):

"/nb/src/share/mk/bsd.own.mk", line 7: Need an operator
"/nb/src/share/mk/bsd.own.mk", line 7: Need an operator
"/nb/src/share/mk/bsd.own.mk", line 133: Malformed conditional (${USETOOLS_BINUT
"/nb/src/share/mk/bsd.own.mk", line 133: Need an operator
"/nb/src/share/mk/bsd.own.mk", line 145: Malformed conditional (${USETOOLS_GCC:U
"/nb/src/share/mk/bsd.own.mk", line 145: Need an operator
[...etc...]


Similarly, when a miniroot is built distrib/common/Makefile.image
will cause makeobsolete to be invoked (produced by PARSELIST via CMD entry in distrib/common/list.sysinst) with simlar errors.

>How-To-Repeat:
Try building a release on a non-NetBSD host.
>Fix:
MAKE=${MAKE:Q} should be passed in the environment in appropriate places.

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