From owner-svn-src-projects@FreeBSD.ORG Sat Oct 12 23:40:18 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4A747241; Sat, 12 Oct 2013 23:40:18 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 200CD26AB; Sat, 12 Oct 2013 23:40:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9CNeH5X041093; Sat, 12 Oct 2013 23:40:18 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9CNeHOc041092; Sat, 12 Oct 2013 23:40:17 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201310122340.r9CNeHOc041092@svn.freebsd.org> From: "Simon J. Gerraty" Date: Sat, 12 Oct 2013 23:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r256405 - projects/bmake/share/mk X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Oct 2013 23:40:18 -0000 Author: sjg Date: Sat Oct 12 23:40:17 2013 New Revision: 256405 URL: http://svnweb.freebsd.org/changeset/base/256405 Log: When TARGET_SPEC_VARS is non-trivial, we need to apply the same filtering when setting _machines as we do to _build_dirs. Modified: projects/bmake/share/mk/dirdeps.mk Modified: projects/bmake/share/mk/dirdeps.mk ============================================================================== --- projects/bmake/share/mk/dirdeps.mk Sat Oct 12 23:37:47 2013 (r256404) +++ projects/bmake/share/mk/dirdeps.mk Sat Oct 12 23:40:17 2013 (r256405) @@ -149,11 +149,11 @@ DEP_$v ?= ${$v} JOT ?= jot _tspec_x := ${${JOT} ${TARGET_SPEC_VARS:[#]}:L:sh} # this handles unqualified entries -M_dep_qual_fixes = C;(/[^/.,]+)$$;\1.${DEP_TARGET_SPEC}; +M_dep_qual_fixes = C;(/[^/.,]+)$$;\1.$${DEP_TARGET_SPEC}; # there needs to be at least one item missing for these to make sense .for i in ${_tspec_x:[2..-1]} _tspec_m$i := ${TARGET_SPEC_VARS:[2..$i]:@w@[^,]+@:ts,} -_tspec_a$i := ,${TARGET_SPEC_VARS:[$i..-1]:@v@$${DEP_$v}@:ts,} +_tspec_a$i := ,${TARGET_SPEC_VARS:[$i..-1]:@v@$$$${DEP_$v}@:ts,} M_dep_qual_fixes += C;(\.${_tspec_m$i})$$;\1${_tspec_a$i}; .endfor .else @@ -359,7 +359,8 @@ _machines := ${_machines:O:u} .if ${TARGET_SPEC_VARS:[#]} > 1 # we need to tweak _machines _dm := ${DEP_MACHINE} -_machines := ${_machines:@DEP_MACHINE@${DEP_TARGET_SPEC}@} +# apply the same filtering that we do when qualifying DIRDEPS. +_machines := ${_machines:@DEP_MACHINE@${DEP_TARGET_SPEC}@:${M_dep_qual_fixes:ts:}:O:u} DEP_MACHINE := ${_dm} .endif @@ -464,6 +465,9 @@ ${_this_dir}.$m: ${_build_dirs:M*.$m:N${ .if ${_DIRDEP_CHECKED:M$d} == "" # once only _DIRDEP_CHECKED += $d +.if !empty(_debug_search) +.info checking $d +.endif # Note: _build_dirs is fully qualifed so d:R is always the directory .if exists(${d:R}) # Warning: there is an assumption here that MACHINE is always @@ -471,7 +475,8 @@ _DIRDEP_CHECKED += $d # If TARGET_SPEC and MACHINE are insufficient, you have a problem. _m := ${.MAKE.DEPENDFILE_PREFERENCE:T:S;${TARGET_SPEC}$;${d:E};:S;${MACHINE};${d:E:C/,.*//};:@m@${exists(${d:R}/$m):?${d:R}/$m:}@:[1]} .if !empty(_m) -_qm := ${_m:${M_dep_qual_fixes:ts:}} +# M_dep_qual_fixes isn't geared to Makefile.depend +_qm := ${_m:C;(\.depend)$;\1.${d:E};:${M_dep_qual_fixes:ts:}} .if !empty(_debug_search) .info Looking for ${_qm} .endif