Provide the correct system Makefile path to the tools make. This is needed

because although the arch-specific make wrapper sets $MAKEFLAGS to include
the proper system Makefile path, configure clears $MAKEFLAGS before it invokes
$MAKE to figure out which dependency style to use. This made the build fail
during the gcc build.
This commit is contained in:
christos 2016-04-29 16:08:09 +00:00
parent 3694604d12
commit c3fb96a2cc

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh
# $NetBSD: build.sh,v 1.308 2015/06/27 06:00:28 matt Exp $
# $NetBSD: build.sh,v 1.309 2016/04/29 16:08:09 christos Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@ -1593,11 +1593,19 @@ rebuildmake()
fi
# Build bootstrap ${toolprefix}make if needed.
if ${do_rebuildmake}; then
if ! ${do_rebuildmake}; then
return
fi
statusmsg "Bootstrapping ${toolprefix}make"
${runcmd} cd "${tmpdir}"
${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \
CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \
${runcmd} env \
\
CC="${HOST_CC-cc}" \
CPPFLAGS="${HOST_CPPFLAGS} -D_PATH_DEFSYSPATH="'\"'${NETBSDSRCDIR}/share/mk'\"' \
CFLAGS="${HOST_CFLAGS--O}" \
LDFLAGS="${HOST_LDFLAGS}" \
\
${HOST_SH} "${TOP}/tools/make/configure" ||
( cp ${tmpdir}/config.log ${tmpdir}-config.log
bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" )
@ -1607,7 +1615,6 @@ rebuildmake()
${runcmd} cd "${TOP}"
${runcmd} rm -f usr.bin/make/*.o usr.bin/make/lst.lib/*.o
done_rebuildmake=true
fi
}
# validatemakeparams --
@ -1869,7 +1876,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.308 2015/06/27 06:00:28 matt Exp $
# Generated from: \$NetBSD: build.sh,v 1.309 2016/04/29 16:08:09 christos Exp $
# with these arguments: ${_args}
#