Whenever we try to parse the output from make, run make with the -B
flag. This ensures that -j<N> isn't accidentally inherited from the environment, because the "--- foo ---" headers printed with -j<N> would interfere with parsing the output.
This commit is contained in:
parent
b552802596
commit
f7004b0cbc
6
build.sh
6
build.sh
|
@ -1,5 +1,5 @@
|
|||
#! /usr/bin/env sh
|
||||
# $NetBSD: build.sh,v 1.160 2007/01/29 00:08:13 matt Exp $
|
||||
# $NetBSD: build.sh,v 1.161 2007/02/05 18:26:01 apb Exp $
|
||||
#
|
||||
# Copyright (c) 2001-2005 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -418,7 +418,7 @@ validatearch()
|
|||
raw_getmakevar()
|
||||
{
|
||||
[ -x "${make}" ] || bomb "raw_getmakevar $1: ${make} is not executable"
|
||||
"${make}" -m ${TOP}/share/mk -s -f- _x_ <<EOF || bomb "raw_getmakevar $1: ${make} failed"
|
||||
"${make}" -m ${TOP}/share/mk -s -B -f- _x_ <<EOF || bomb "raw_getmakevar $1: ${make} failed"
|
||||
_x_:
|
||||
echo \${$1}
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -990,7 +990,7 @@ createmakewrapper()
|
|||
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.160 2007/01/29 00:08:13 matt Exp $
|
||||
# Generated from: \$NetBSD: build.sh,v 1.161 2007/02/05 18:26:01 apb Exp $
|
||||
# with these arguments: ${_args}
|
||||
#
|
||||
EOF
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# $NetBSD: regpkg,v 1.14 2006/01/28 19:01:23 apb Exp $
|
||||
# $NetBSD: regpkg,v 1.15 2007/02/05 18:26:01 apb Exp $
|
||||
#
|
||||
# Copyright (c) 2003 Alistair G. Crooks. All rights reserved.
|
||||
#
|
||||
|
@ -599,7 +599,7 @@ register_syspkg()
|
|||
# environment, not the target.
|
||||
echo "OPSYS=$(${UNAME} -s)"
|
||||
echo "OS_VERSION=$(${UNAME} -r)"
|
||||
${MAKE} -f- all <<EOF
|
||||
${MAKE} -B -f- all <<EOF
|
||||
.include <bsd.own.mk>
|
||||
all:
|
||||
@echo OBJECT_FMT=${OBJECT_FMT}
|
||||
|
@ -635,7 +635,7 @@ EOF
|
|||
# "@name" line and a lot of "@comment MD5:" lines.
|
||||
#
|
||||
{
|
||||
rcsid='$NetBSD: regpkg,v 1.14 2006/01/28 19:01:23 apb Exp $'
|
||||
rcsid='$NetBSD: regpkg,v 1.15 2007/02/05 18:26:01 apb Exp $'
|
||||
utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \
|
||||
${DATE} '+%Y-%m-%d %H:%M')"
|
||||
user="${USER:-root}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# $NetBSD: regpkgset,v 1.8 2006/01/28 19:01:23 apb Exp $
|
||||
# $NetBSD: regpkgset,v 1.9 2007/02/05 18:26:01 apb Exp $
|
||||
#
|
||||
# Copyright (c) 2003 Alistair G. Crooks. All rights reserved.
|
||||
#
|
||||
|
@ -138,7 +138,7 @@ if ${cache}; then
|
|||
# environment, not the target.
|
||||
echo "OPSYS=$(${UNAME} -s)"
|
||||
echo "OS_VERSION=$(${UNAME} -r)"
|
||||
${MAKE} -f- all <<EOF
|
||||
${MAKE} -B -f- all <<EOF
|
||||
.include <bsd.own.mk>
|
||||
all:
|
||||
@echo OBJECT_FMT=${OBJECT_FMT}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: sets.subr,v 1.55 2006/12/29 15:52:20 pooka Exp $
|
||||
# $NetBSD: sets.subr,v 1.56 2007/02/05 18:26:01 apb Exp $
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -219,7 +219,7 @@ fi
|
|||
# In each file, a record consists of a path and a System Package name,
|
||||
# separated by whitespace. E.g.,
|
||||
#
|
||||
# # $NetBSD: sets.subr,v 1.55 2006/12/29 15:52:20 pooka Exp $
|
||||
# # $NetBSD: sets.subr,v 1.56 2007/02/05 18:26:01 apb Exp $
|
||||
# . base-sys-root [keyword[,...]]
|
||||
# ./altroot base-sys-root
|
||||
# ./bin base-sys-root
|
||||
|
@ -454,7 +454,7 @@ list_set_lists()
|
|||
#
|
||||
arch_to_cpu()
|
||||
{
|
||||
MACHINE_ARCH=${1} ${MAKE} -f- all <<EOMAKE
|
||||
MACHINE_ARCH=${1} ${MAKE} -B -f- all <<EOMAKE
|
||||
.include <bsd.own.mk>
|
||||
all:
|
||||
@echo \${MACHINE_CPU}
|
||||
|
@ -468,7 +468,7 @@ EOMAKE
|
|||
#
|
||||
arch_to_endian()
|
||||
{
|
||||
MACHINE_ARCH=${1} ${MAKE} -f- all <<EOMAKE
|
||||
MACHINE_ARCH=${1} ${MAKE} -B -f- all <<EOMAKE
|
||||
.include <bsd.endian.mk>
|
||||
all:
|
||||
@echo \${TARGET_ENDIANNESS}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp $
|
||||
# $NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp $
|
||||
#
|
||||
# from: NetBSD: mknative,v 1.12 2003/03/05 06:17:17 mrg Exp
|
||||
#
|
||||
|
@ -34,7 +34,7 @@ _x_:
|
|||
EOF
|
||||
;;
|
||||
*)
|
||||
$MAKE -f - _x_ <<EOF || bomb "getvars $_mf $* failed"
|
||||
$MAKE -B -f - _x_ <<EOF || bomb "getvars $_mf $* failed"
|
||||
_x_:
|
||||
.for var in $*
|
||||
@echo G_\${var}=\${\${var}:Q} | sed -e 's,\([^\.]\)\./\([a-zA-Z0-9_-]*\.o\),\1\2,g' -e 's,$_VPATH,\$\${GNUHOSTDIST},g' -e 's,$_GNU_DIST,\$\${GNUHOSTDIST},g'
|
||||
|
@ -52,7 +52,7 @@ write_c()
|
|||
echo '/* This file is automatically generated. DO NOT EDIT! */' >$_TOP/$1.tmp || \
|
||||
bomb "cannot create $1"
|
||||
grep '$''NetBSD' $0 | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp $' | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp $' | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
|
||||
echo '' >>$_TOP/$1.tmp
|
||||
writefile $1
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ write_mk()
|
|||
echo '# This file is automatically generated. DO NOT EDIT!' >$_TOP/$1.tmp || \
|
||||
bomb "cannot create $1"
|
||||
grep '$''NetBSD' $0 | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp $' | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp $' | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
|
||||
echo '#' >>$_TOP/$1.tmp
|
||||
writefile $1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue