From owner-svn-src-all@freebsd.org Wed Oct 21 00:25:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55724A1A6E7; Wed, 21 Oct 2015 00:25:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217B97DC; Wed, 21 Oct 2015 00:25:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9L0PIj1042916; Wed, 21 Oct 2015 00:25:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L0PI7L042915; Wed, 21 Oct 2015 00:25:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510210025.t9L0PI7L042915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 00:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289669 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2015 00:25:19 -0000 Author: bdrewery Date: Wed Oct 21 00:25:18 2015 New Revision: 289669 URL: https://svnweb.freebsd.org/changeset/base/289669 Log: Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL. The SUBDIR_PARALLEL feature uses a .for dir in ${SUBDIR} loop. The old code here for recursing was setting SUBDIR= as a make *argument*. The SUBDIR= replacement was not actually handled until after the .for loop was unrolled. This could be seen with a '.info ${SUBDIR} ${dir}' inside of the loop which showed an empty ${SUBDIR} and a set ${dir}. Setting NO_SUBIDR= before calling ${MAKE} as an *environment* variable handles the case fine and is a more proper mechanism for disabling subdir handling. This could be seen with 'make -C tests/sys/kern -j15 SUBDIR_PARALLEL=yes'. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Tue Oct 20 23:52:37 2015 (r289668) +++ head/share/mk/bsd.progs.mk Wed Oct 21 00:25:18 2015 (r289669) @@ -116,16 +116,16 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p}) # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p} ${@:E}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p} ${@:E}) .endfor .endfor