Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Check if this platform is supported for USE_NEW_TOOLCHAIN an...



details:   https://anonhg.NetBSD.org/src/rev/4fa05c454508
branches:  trunk
changeset: 518688:4fa05c454508
user:      jmc <jmc%NetBSD.org@localhost>
date:      Tue Dec 04 04:28:23 2001 +0000

description:
Check if this platform is supported for USE_NEW_TOOLCHAIN and exit with a
complaint if it's not. Point out to run a traditional make and also how to
force a new toolchain build if one wants to test

diffstat:

 build.sh |  25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 56f1f6a59008 -r 4fa05c454508 build.sh
--- a/build.sh  Tue Dec 04 04:25:21 2001 +0000
+++ b/build.sh  Tue Dec 04 04:28:23 2001 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-#  $NetBSD: build.sh,v 1.29 2001/12/03 08:18:00 jmc Exp $
+#  $NetBSD: build.sh,v 1.30 2001/12/04 04:28:23 jmc Exp $
 #
 # Top level build wrapper, for a system containing no tools.
 #
@@ -58,7 +58,7 @@
 }
 
 getmakevar () {
-       cat <<EOF | $make -m ${TOP}/share/mk -s -f- _x_
+       $make -m ${TOP}/share/mk -s -f- _x_ <<EOF
 _x_:
        echo \${$1}
 .include <bsd.prog.mk>
@@ -243,6 +243,25 @@
        $runcmd rm -f usr.bin/make/*.o usr.bin/make/lst.lib/*.o
 fi
 
+USE_NEW_TOOLCHAIN=`getmakevar USE_NEW_TOOLCHAIN`
+if [ "${USE_NEW_TOOLCHAIN}" != "nowarn" ]; then
+       echo "ERROR: build.sh (new toolchain) is not yet enabled for"
+       echo
+       echo "MACHINE: ${MACHINE}"
+       echo "MACHINE_ARCH: ${MACHINE_ARCH}"
+       echo
+       echo "All builds for this platform should be done via a traditional make"
+       echo
+       echo "If you wish to test using the new toolchain set"
+       echo
+       echo "USE_NEW_TOOLCHAIN=yes"
+       echo
+       echo "in either the environment or mk.conf and rerun"
+       echo
+       echo "$0 $*"
+       exit 1
+fi
+
 # If TOOLDIR isn't already set, make objdirs in "tools" in case the
 # default setting from <bsd.own.mk> is used.
 if [ -z "$TOOLDIR" ] && [ "$MKOBJDIRS" != "no" ]; then
@@ -325,7 +344,7 @@
 eval cat <<EOF $makewrapout
 #! /bin/sh
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.29 2001/12/03 08:18:00 jmc Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.30 2001/12/04 04:28:23 jmc Exp $
 #
 
 EOF



Home | Main Index | Thread Index | Old Index