Source-Changes-HG archive

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

[src/trunk]: src When using random versions of make to try to find the TOOLDIR,



details:   https://anonhg.NetBSD.org/src/rev/f0e37928396c
branches:  trunk
changeset: 769568:f0e37928396c
user:      apb <apb%NetBSD.org@localhost>
date:      Wed Sep 14 17:35:44 2011 +0000

description:
When using random versions of make to try to find the TOOLDIR,
redirect 2>/dev/null.  This should hide error messages like
"*** missing separator.  Stop." when GNU make doesn't
understand ".include".

diffstat:

 build.sh |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r 85ba03f92c47 -r f0e37928396c build.sh
--- a/build.sh  Wed Sep 14 16:35:22 2011 +0000
+++ b/build.sh  Wed Sep 14 17:35:44 2011 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#      $NetBSD: build.sh,v 1.249 2011/09/09 18:48:34 apb Exp $
+#      $NetBSD: build.sh,v 1.250 2011/09/14 17:35:44 apb Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -746,7 +746,7 @@
 EOF
 }
 
-# nobomb_getmakevar --
+# bomb_getmakevar --
 # Given the name of a make variable in $1, print make's idea of the
 # value of that variable, or bomb if there's an error.
 #
@@ -756,7 +756,7 @@
        nobomb_getmakevar "$1" || bomb "bomb_getmakevar $1: ${make} failed"
 }
 
-# nobomb_getmakevar --
+# getmakevar --
 # Given the name of a make variable in $1, print make's idea of the
 # value of that variable, or print a literal '$' followed by the
 # variable name if ${make} is not executable.  This is intended for use in
@@ -1222,8 +1222,9 @@
 #   a copy of ${toolprefix}make (this should work for everybody who
 #   doesn't override TOOLDIR via /etc/mk.conf);
 # * Failing that, search for ${toolprefix}make, nbmake, bmake, or make,
-#   in the PATH (this might accidentally find a non-NetBSD version of
-#   make, which will lead to failure in the next step);
+#   in the PATH (this might accidentally find a version of make that
+#   does not understand the syntax used by NetBSD make, and that will
+#   lead to failure in the next step);
 # * If a copy of make was found above, try to use it with
 #   nobomb_getmakevar to find the correct value for TOOLDIR, and believe the
 #   result only if it's a directory that already exists;
@@ -1300,7 +1301,8 @@
        #
        if [ -x "${possible_make}" ]; then
                possible_TOOLDIR="$(
-                       make="${possible_make}" nobomb_getmakevar TOOLDIR
+                       make="${possible_make}" \
+                       nobomb_getmakevar TOOLDIR 2>/dev/null
                        )"
                if [ $? = 0 ] && [ -n "${possible_TOOLDIR}" ] \
                    && [ -d "${possible_TOOLDIR}" ];
@@ -1630,7 +1632,7 @@
        eval cat <<EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.249 2011/09/09 18:48:34 apb Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.250 2011/09/14 17:35:44 apb Exp $
 # with these arguments: ${_args}
 #
 



Home | Main Index | Thread Index | Old Index