From owner-svn-src-stable@freebsd.org Fri Sep 13 05:54:09 2019 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A58FAE649F; Fri, 13 Sep 2019 05:54:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46V4Zn3ytfz4BZn; Fri, 13 Sep 2019 05:54:09 +0000 (UTC) (envelope-from sjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69D472941; Fri, 13 Sep 2019 05:54:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8D5s9Cf007425; Fri, 13 Sep 2019 05:54:09 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8D5s906007424; Fri, 13 Sep 2019 05:54:09 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201909130554.x8D5s906007424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Fri, 13 Sep 2019 05:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352273 - stable/12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: stable/12/share/mk X-SVN-Commit-Revision: 352273 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 05:54:09 -0000 Author: sjg Date: Fri Sep 13 05:54:09 2019 New Revision: 352273 URL: https://svnweb.freebsd.org/changeset/base/352273 Log: Use file destdir for stage_as sets We cannot use file (without :T) to name targets but we can use the destination directory (with / replaced by _) This has the benefit of minimizing the targets created. MFC r351954 Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org//D21283 Modified: stable/12/share/mk/bsd.files.mk Modified: stable/12/share/mk/bsd.files.mk ============================================================================== --- stable/12/share/mk/bsd.files.mk Fri Sep 13 01:14:58 2019 (r352272) +++ stable/12/share/mk/bsd.files.mk Fri Sep 13 05:54:09 2019 (r352273) @@ -37,7 +37,6 @@ ${group}GRP= ${SHAREGRP} ${group}MODE?= ${SHAREMODE} ${group}DIR?= BINDIR STAGE_SETS+= ${group:C,[/*],_,g} -STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR} .if defined(NO_ROOT) .if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} @@ -57,6 +56,7 @@ DIRS+= ${group}DIR _${group}DIR= ${group}DIR .endif +STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${_${group}DIR}} .for file in ${${group}} ${group}OWN_${file}?= ${${group}OWN} @@ -97,11 +97,16 @@ ${group}NAME_${file}?= ${${group}NAME} .else ${group}NAME_${file}?= ${file:T} .endif # defined(${group}NAME) -STAGE_AS_SETS+= ${file} STAGE_AS_${file}= ${${group}NAME_${file}} -# XXX {group}OWN,GRP,MODE -STAGE_DIR.${file}= ${STAGE_OBJTOP}${${group}DIR_${file}} -stage_as.${file}: ${file} +# we cannot use file safely as a set name +# since we cannot? apply :T +# but we can use the ${group}DIR_${file} +# as a set - meta.stage.mk will :O:u for us +# we need to expand ${group}DIR_${file} and replace +# all '/' and '*' with '_' to make a safe target name. +STAGE_AS_SETS+= ${${_${group}DIR_${file}}:C,[/*],_,g} +STAGE_DIR.${${_${group}DIR_${file}}:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR_${file}} +stage_as.${${_${group}DIR_${file}}:C,[/*],_,g}: ${file} installfiles-${group}: _${group}INS1_${file} _${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} @@ -118,12 +123,16 @@ realinstall: installfiles .ORDER: beforeinstall installfiles .if ${MK_STAGING} != "no" +.if ${FILESGROUPS:@g@${$g}@} != "" .if !empty(STAGE_SETS) buildfiles: stage_files STAGE_TARGETS+= stage_files +stage_files: .if !empty(STAGE_AS_SETS) buildfiles: stage_as STAGE_TARGETS+= stage_as +stage_as: +.endif .endif .endif .endif