Rename raw_getmakevar to bomb_getmakevar. It wasn't "raw" at all; it
was (and is) a wrapper around nobomb_getmakevar.
This commit is contained in:
parent
f1ead22021
commit
d1373a044c
37
build.sh
37
build.sh
|
@ -1,5 +1,5 @@
|
||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
# $NetBSD: build.sh,v 1.209 2009/09/27 17:28:38 apb Exp $
|
# $NetBSD: build.sh,v 1.210 2009/09/27 17:48:19 apb Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
|
# Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
@ -455,6 +455,10 @@ validatearch()
|
||||||
bomb "MACHINE_ARCH '${MACHINE_ARCH}' does not support MACHINE '${MACHINE}'"
|
bomb "MACHINE_ARCH '${MACHINE_ARCH}' does not support MACHINE '${MACHINE}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# nobomb_getmakevar --
|
||||||
|
# Given the name of a make variable in $1, print make's idea of the
|
||||||
|
# value of that variable, or return 1 if there's an error.
|
||||||
|
#
|
||||||
nobomb_getmakevar()
|
nobomb_getmakevar()
|
||||||
{
|
{
|
||||||
[ -x "${make}" ] || return 1
|
[ -x "${make}" ] || return 1
|
||||||
|
@ -466,22 +470,27 @@ _x_:
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
raw_getmakevar()
|
# nobomb_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.
|
||||||
|
#
|
||||||
|
bomb_getmakevar()
|
||||||
{
|
{
|
||||||
[ -x "${make}" ] || bomb "raw_getmakevar $1: ${make} is not executable"
|
[ -x "${make}" ] || bomb "bomb_getmakevar $1: ${make} is not executable"
|
||||||
nobomb_getmakevar "$1" || bomb "raw_getmakevar $1: ${make} failed"
|
nobomb_getmakevar "$1" || bomb "bomb_getmakevar $1: ${make} failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# nobomb_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
|
||||||
|
# messages that need to be readable even if $make hasn't been built,
|
||||||
|
# such as when build.sh is run with the "-n" option.
|
||||||
|
#
|
||||||
getmakevar()
|
getmakevar()
|
||||||
{
|
{
|
||||||
# raw_getmakevar() doesn't work properly if $make hasn't yet been
|
|
||||||
# built, which can happen when running with the "-n" option.
|
|
||||||
# getmakevar() deals with this by emitting a literal '$'
|
|
||||||
# followed by the variable name, instead of trying to find the
|
|
||||||
# variable's value.
|
|
||||||
#
|
|
||||||
if [ -x "${make}" ]; then
|
if [ -x "${make}" ]; then
|
||||||
raw_getmakevar "$1"
|
bomb_getmakevar "$1"
|
||||||
else
|
else
|
||||||
echo "\$$1"
|
echo "\$$1"
|
||||||
fi
|
fi
|
||||||
|
@ -1011,8 +1020,8 @@ validatemakeparams()
|
||||||
TOOLCHAIN_MISSING=no
|
TOOLCHAIN_MISSING=no
|
||||||
EXTERNAL_TOOLCHAIN=""
|
EXTERNAL_TOOLCHAIN=""
|
||||||
else
|
else
|
||||||
TOOLCHAIN_MISSING=$(raw_getmakevar TOOLCHAIN_MISSING)
|
TOOLCHAIN_MISSING=$(bomb_getmakevar TOOLCHAIN_MISSING)
|
||||||
EXTERNAL_TOOLCHAIN=$(raw_getmakevar EXTERNAL_TOOLCHAIN)
|
EXTERNAL_TOOLCHAIN=$(bomb_getmakevar EXTERNAL_TOOLCHAIN)
|
||||||
fi
|
fi
|
||||||
if [ "${TOOLCHAIN_MISSING}" = "yes" ] && \
|
if [ "${TOOLCHAIN_MISSING}" = "yes" ] && \
|
||||||
[ -z "${EXTERNAL_TOOLCHAIN}" ]; then
|
[ -z "${EXTERNAL_TOOLCHAIN}" ]; then
|
||||||
|
@ -1223,7 +1232,7 @@ createmakewrapper()
|
||||||
eval cat <<EOF ${makewrapout}
|
eval cat <<EOF ${makewrapout}
|
||||||
#! ${HOST_SH}
|
#! ${HOST_SH}
|
||||||
# Set proper variables to allow easy "make" building of a NetBSD subtree.
|
# Set proper variables to allow easy "make" building of a NetBSD subtree.
|
||||||
# Generated from: \$NetBSD: build.sh,v 1.209 2009/09/27 17:28:38 apb Exp $
|
# Generated from: \$NetBSD: build.sh,v 1.210 2009/09/27 17:48:19 apb Exp $
|
||||||
# with these arguments: ${_args}
|
# with these arguments: ${_args}
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue