Subject: Trailing / in pathnames passed to build.sh
To: None <tech-toolchain@NetBSD.org>
From: Bang Jun-Young <junyoung@mogua.com>
List: tech-toolchain
Date: 08/17/2004 03:46:23
Hi,

Currently, build.sh doesn't remove trailing / in pathnames given to it.
That caused unnecessary rebuild of tools today when I misspecified
"/u0/netbsd-2-0/tools" as "/u0/netbsd-2-0/tools/".

(cd /u0/netbsd-2-0/src/tools && /u0/netbsd-2-0/tools//bin/nbmake dependall)
*** WARNING: TOOLDIR has moved?
*** PREVIOUSTOOLDIR '/u0/netbsd-2-0/tools'
***     !=  TOOLDIR '/u0/netbsd-2-0/tools/'
*** Cleaning mis-matched tools
rm -f PREVIOUSTOOLDIR
(... start building tools ...)

The following patch removes trailing /.

--- build.sh    6 Feb 2004 23:19:30 -0000       1.127
+++ build.sh    16 Aug 2004 18:40:20 -0000
@@ -324,6 +324,7 @@

 resolvepath()
 {
+       OPTARG=`echo ${OPTARG} | sed -e 's/\/$//'`
        case "${OPTARG}" in
        /*)
                ;;

Any comments?

Jun-Young