From d9a401e5bcd7ba611ecbc5b0f4d66cf053f7bad4 Mon Sep 17 00:00:00 2001 From: apb Date: Mon, 7 Jul 2008 10:57:03 +0000 Subject: [PATCH] Verify that MAKEFLAGS contains "-j" before trying to manipulate it with :C///. --- tools/Makefile.gmakehost | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Makefile.gmakehost b/tools/Makefile.gmakehost index 7bbc214cd968..9bcaf6c28e7c 100644 --- a/tools/Makefile.gmakehost +++ b/tools/Makefile.gmakehost @@ -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})