Subject: toolchain/23156: build.sh doesn't always say why it's rebuilding toolchain
To: None <gnats-bugs@gnats.netbsd.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: netbsd-bugs
Date: 10/13/2003 23:37:01
>Number:         23156
>Category:       toolchain
>Synopsis:       build.sh doesn't always say why it's rebuilding toolchain
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 13 21:37:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Hubert Feyrer
>Release:        NetBSD 1.6ZC
>Organization:
bla!
>Environment:
	
	
System: NetBSD miyu 1.6ZC NetBSD 1.6ZC (MIYU) #25: Sat Oct 11 17:15:37 MEST 2003 feyrer@miyu:/home/cvs/src-current/sys/arch/i386/compile/MIYU i386
Architecture: i386
Machine: i386
>Description:
	build.sh sometimes rebuilds tools (make, ...) even when -T
	is given. One starts wondering what's wrong then. 
	Investigation shows that build.sh checks if the make sources 
	are newer than the binary and if so, rebuilds make. That
	should be said - a suggested patch is added below.

>How-To-Repeat:
	"build.sh -T ..." and see it rebuild make. wonder.

>Fix:

Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.117
diff -u -r1.117 build.sh
--- build.sh	24 Sep 2003 00:24:53 -0000	1.117
+++ build.sh	13 Oct 2003 21:34:35 -0000
@@ -636,11 +636,13 @@
 	if [ -x "${make}" ]; then
 		for f in usr.bin/make/*.[ch] usr.bin/make/lst.lib/*.[ch]; do
 			if [ "${f}" -nt "${make}" ]; then
+				statusmsg "${make} outdated (older than ${f}), needs building."
 				do_rebuildmake=true
 				break
 			fi
 		done
 	else
+		statusmsg "No ${make}, needs building."
 		do_rebuildmake=true
 	fi
 
>Release-Note:
>Audit-Trail:
>Unformatted:
 	-current source