Verify that MAKEFLAGS contains "-j" before trying to manipulate it

with :C///.
This commit is contained in:
apb 2008-07-07 10:57:03 +00:00
parent 37d1079aad
commit d9a401e5bc

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.gmakehost,v 1.3 2008/07/07 05:43:56 mrg Exp $
# $NetBSD: Makefile.gmakehost,v 1.4 2008/07/07 10:57:03 apb Exp $
#
# Rules used when building a GNU host package. Expects MODULE to be set.
# This version runs ${TOOL_GMAKE} instead of ${MAKE}
@ -98,7 +98,7 @@ INSTALL_TARGET?=install
# sub-gmake's get them, otherwise tools/gcc tries to build libgcc and
# fails. it also uses "env -i" to entirely clear out MAKEFLAGS.
GMAKE_J_ARGS?= ${MAKEFLAGS:C/.*(-j ?[0-9]*).*/\1/W}
GMAKE_J_ARGS?= ${MAKEFLAGS:[*]:M*-j*:C/.*(-j ?[0-9]*).*/\1/W}
.build_done: .configure_done
@(cd build && /usr/bin/env -i ${BUILD_ENV} ${MAKE_ARGS} ${TOOL_GMAKE} ${GMAKE_J_ARGS} -e ${MAKE_ARGS} ${ALL_TARGET})