Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX.

This commit is contained in:
thorpej 2003-03-14 05:22:50 +00:00
parent c5007c219b
commit d2809fcf8a
3 changed files with 30 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh
# $NetBSD: build.sh,v 1.94 2003/03/07 01:22:16 lukem Exp $
# $NetBSD: build.sh,v 1.95 2003/03/14 05:22:50 thorpej Exp $
#
# Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
# All rights reserved.
@ -88,7 +88,16 @@ initdefaults()
# Set defaults.
toolprefix=nb
MAKEFLAGS=
# Some systems have a small ARG_MAX. -X prevents make(1) from
# exporting variables in the environment redundantly.
case "${uname_s}" in
Darwin | FreeBSD)
MAKEFLAGS=-X
;;
*)
MAKEFLAGS=
;;
esac
makeenv=
makewrapper=
runcmd=
@ -689,7 +698,7 @@ createmakewrapper()
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.94 2003/03/07 01:22:16 lukem Exp $
# Generated from: \$NetBSD: build.sh,v 1.95 2003/03/14 05:22:50 thorpej Exp $
#
EOF

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.gnuhost,v 1.17 2003/02/07 01:52:51 lukem Exp $
# $NetBSD: Makefile.gnuhost,v 1.18 2003/03/14 05:22:51 thorpej Exp $
#
# Rules used when building a GNU host package. Expects MODULE to be set.
#
@ -52,7 +52,14 @@ CONFIGURE_ENV+= CC=${HOST_CC:Q} \
CONFIGURE_ARGS+=--prefix=${TOOLDIR} --disable-shared
.ifndef _NOWRAPPER
MAKE_ARGS:= -f ${.PARSEDIR}/Makefile.gnuwrap ${MAKE_ARGS}
# Some systems have a small ARG_MAX. On such systems, prevent Make
# variables set on the command line from being exported in the
# environment (they will still be set in MAKEOVERRIDES).
BUILD_OSTYPE!= uname -s
.if ${BUILD_OSTYPE} == "Darwin" || ${BUILD_OSTYPE} == "FreeBSD"
__noenvexport= -X
.endif
MAKE_ARGS:= ${__noenvexport} -f ${.PARSEDIR}/Makefile.gnuwrap ${MAKE_ARGS}
.else
MAKE_ARGS+= _NOWRAPPER=1
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.gnuwrap,v 1.8 2001/11/22 08:20:07 jmc Exp $
# $NetBSD: Makefile.gnuwrap,v 1.9 2003/03/14 05:22:51 thorpej Exp $
#
# Wrapper for GNU Makefiles.
@ -20,7 +20,14 @@ _srcdir:= ${srcdir}
# Make sure this file gets re-loaded recursively.
.ifndef _NOWRAPPER
# Some systems have a small ARG_MAX. On such systems, prevent Make
# variables set on the command line from being exported in the
# environment (they will still be set in MAKEOVERRIDES).
BUILD_OSTYPE!= uname -s
.if ${BUILD_OSTYPE} == "Darwin" || ${BUILD_OSTYPE} == "FreeBSD"
__noenvexport= -X
.endif
_GNUWRAPPER:= ${.PARSEDIR}/${.PARSEFILE}
MAKE:= ${MAKE} -f ${_GNUWRAPPER}
MAKE:= ${MAKE} ${__noenvexport} -f ${_GNUWRAPPER}
.endif
.endif