Subject: Build.sh script changes
To: Greywolf <greywolf@starwolf.com>
From: Srinivasa Kanduru <ksraghavan@yahoo.com>
List: tech-toolchain
Date: 11/24/2003 15:29:10
I would suggest some trivial changes in build.sh script ..

a) the DEFTOOLDIR seems to be a good way of avoiding rebuild of nbmake which is
inevitable if TOOLDIR is not set and is to be decided in a standard way.

b) it might be useful to be able to pass the makeenv variables to makewrapper

Thanks,
Srini

***************************
diff -u build.sh build.sh.orig
--- build.sh    Mon Nov 24 06:08:07 2003
+++ build.sh.orig       Sat Nov 22 15:15:07 2003
@@ -82,7 +82,7 @@
 getmakevar () {
        $make -m ${TOP}/share/mk -s -f- _x_ <<EOF
 _x_:
-       @echo \${$1}
+       echo \${$1}
 .include <bsd.prog.mk>
 EOF
 }
@@ -130,11 +130,10 @@
 do_buildonlytools=false
 do_rebuildmake=false
 do_removedirs=false
-envprefix=
 makeenv=
 makewrapper=
 opt_a=no
-opts='a:B:bde:hj:m:nortuw:D:M:O:R:T:U'
+opts='a:B:bdhj:m:nortuw:D:M:O:R:T:U'
 runcmd=
 
 if type getopts >/dev/null 2>&1; then
@@ -165,9 +164,6 @@
 
        -d)     buildtarget=distribution;;
 
-       -e)     eval $optargcmd;
-               envprefix="$envprefix $OPTRG";;
-
        -j)     eval $optargcmd
                parallel="-j $OPTARG";;
 
@@ -218,8 +214,6 @@
        -'?'|-h)        usage;;
 esac; done
 
-makeenv="$makeenv envprefix";
-
 # Set up MACHINE*.  On a NetBSD host, these are allowed to be unset.
 if [ -z "$MACHINE" ]; then
        if [ "`uname -s 2>/dev/null`" != "NetBSD" ]; then
@@ -248,8 +242,7 @@
 # can only work if the user has pre-set TOOLDIR in the environment or
 # used the -T option to build.sh.
 #
-DEFTOOLDIR=${TOP}/tools/tools.`uname -s`-`uname -r`-`uname -m`
-make="${DEFTOOLDIR-nonexistent}/bin/nbmake"
+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
@@ -404,7 +397,7 @@
 
 eval cat <<'EOF' $makewrapout
 
-exec env $envprefix "$TOOLDIR/bin/nbmake" ${1+"$@"}
+exec "$TOOLDIR/bin/nbmake" ${1+"$@"}
 EOF
 [ "$runcmd" = "echo" ] && echo EOF
 $runcmd chmod +x "$makewrapper"
****************************



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/