Subject: Re: toolchain: silently rebuilding make if make-sources are newer
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-toolchain
Date: 08/19/2003 19:07:46
On Tue, Aug 19, 2003 at 10:00:36AM +0200, Hubert Feyrer wrote:
  | 
  | 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?

I would consider changing the first message to "needs rebuilding.",
but other than that it looks fine.  Commit it.


  | 
  | 
  |  - 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/