Subject: misc/15781: minor enhancement for build.sh
To: None <gnats-bugs@gnats.netbsd.org>
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
List: netbsd-bugs
Date: 03/02/2002 09:39:40
>Number:         15781
>Category:       misc
>Synopsis:       TOOLDIR enhancement to build.sh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 01 12:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Lloyd Parkes
>Release:        NetBSD 1.5ZA
>Organization:
Must Have Coffee
>Environment:
System: NetBSD ophidian.must-have-coffee.gen.nz 1.5ZA NetBSD 1.5ZA (GENERIC) #4: Sat Feb 23 11:24:21 NZDT 2002 lloyd@ophidian.must-have-coffee.gen.nz:/vol/NetBSD/build/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:

Enhance build.sh so that it will extract TOOLDIR from /etc/mk.conf.
This will reduce the number of times that nbmake is needlessly
rebuilt.

>How-To-Repeat:

N/A

>Fix:

Index: build.sh
===================================================================
RCS file: /vol/NetBSD/cvs-src/basesrc/build.sh,v
retrieving revision 1.45
diff -c -r1.45 build.sh
*** build.sh	2002/02/27 21:19:08	1.45
--- build.sh	2002/03/01 20:04:54
***************
*** 216,222 ****
  
  # Test make source file timestamps against installed nbmake binary,
  # if TOOLDIR is pre-set.
! make=${TOOLDIR-nonexistent}/bin/nbmake
  if [ -x $make ]; then
  	for f in usr.bin/make/*.[ch] usr.bin/make/lst.lib/*.[ch]; do
  		if [ $f -nt $make ]; then
--- 216,223 ----
  
  # Test make source file timestamps against installed nbmake binary,
  # if TOOLDIR is pre-set.
! mkTOOLDIR=`sed -e 's/\#.*//' -e '/TOOLDIR/!d' -e 's/TOOLDIR[ 	]*=[ 	]*//' -e 's/[ 	]*$//' /etc/mk.conf`
! make=${TOOLDIR-${mkTOOLDIR:-nonexistent}}/bin/nbmake
  if [ -x $make ]; then
  	for f in usr.bin/make/*.[ch] usr.bin/make/lst.lib/*.[ch]; do
  		if [ $f -nt $make ]; then

>Release-Note:
>Audit-Trail:
>Unformatted:
 Current as of 2002/03/02