Subject: toolchain: silently rebuilding make if make-sources are newer
To: None <tech-toolchain@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-toolchain
Date: 08/19/2003 10:00:36
I found that 'make' is rebuild even if -T is given to build.sh if the
make-sources are newer than the make-binary:

        make="${TOOLDIR-nonexistent}/bin/${toolprefix}make"
        if [ -x "${make}" ]; then
                for f in usr.bin/make/*.[ch] usr.bin/make/lst.lib/*.[ch]; do
===>                    if [ "${f}" -nt "${make}" ]; then
                                do_rebuildmake=true
                                break
                        fi
                done
        else
                do_rebuildmake=true
        fi

If would be nice to print a warning if that's the reason for rebuilding,
as one might think that something is wrong with the tools else.

How about the patch below?


 - Hubert


Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.114
diff -u -r1.114 build.sh
--- build.sh	2003/08/16 11:46:44	1.114
+++ build.sh	2003/08/19 08:00:10
@@ -632,11 +632,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


-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/