From owner-svn-src-all@freebsd.org Thu Oct 8 19:13:38 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 3EA1F9D2CE8; Thu, 8 Oct 2015 19:13:38 +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 1485117B6; Thu, 8 Oct 2015 19:13:38 +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 t98JDbUI073746; Thu, 8 Oct 2015 19:13:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98JDaCj073743; Thu, 8 Oct 2015 19:13:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081913.t98JDaCj073743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 19:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289051 - stable/10/share/mk X-SVN-Group: stable-10 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: Thu, 08 Oct 2015 19:13:38 -0000 Author: bdrewery Date: Thu Oct 8 19:13:36 2015 New Revision: 289051 URL: https://svnweb.freebsd.org/changeset/base/289051 Log: MFC r288158: Fix most cases of bsd.progs.mk running duplicate or missing commands. Modified: stable/10/share/mk/bsd.prog.mk stable/10/share/mk/bsd.progs.mk stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.prog.mk ============================================================================== --- stable/10/share/mk/bsd.prog.mk Thu Oct 8 19:10:51 2015 (r289050) +++ stable/10/share/mk/bsd.prog.mk Thu Oct 8 19:13:36 2015 (r289051) @@ -252,7 +252,7 @@ realinstall: _maninstall .ORDER: beforeinstall _maninstall .endif -.endif +.endif # !target(install) .if !target(lint) lint: ${SRCS:M*.c} Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:10:51 2015 (r289050) +++ stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:13:36 2015 (r289051) @@ -66,25 +66,27 @@ UPDATE_DEPENDFILE ?= NO DEPENDFILE?= .depend.${PROG} # prog.mk will do the rest .else -all: ${FILES} ${PROGS} ${SCRIPTS} +all: ${PROGS} # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO # nor can we safely run in parallel. .NOTPARALLEL: .endif -.endif +.endif # PROGS || PROGS_CXX -# The non-recursive call to bsd.progs.mk will handle FILES; NUL out -# FILESGROUPS so recursive calls don't duplicate the work +# These are handled by the main make process. .ifdef _RECURSING_PROGS -FILESGROUPS= +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS FILESGROUPS SCRIPTS +.for v in ${_PROGS_GLOBAL_VARS} +$v = +.endfor .endif # handle being called [bsd.]progs.mk .include -.ifndef _RECURSING_PROGS +.if !empty(PROGS) && !defined(_RECURSING_PROGS) # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir cleanobj depend install @@ -94,12 +96,14 @@ PROGS_TARGETS+= checkdpadd clean cleande x.$p= PROG_CXX=$p .endif +# Main PROG target $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ SUBDIR= PROG=$p \ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ ${x.$p}) +# Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ @@ -109,21 +113,8 @@ $p.$t: .PHONY .MAKE .endfor .endfor -.if !empty(PROGS) +# Depend main pseudo targets on all PROG.pseudo targets too. .for t in ${PROGS_TARGETS:O:u} $t: ${PROGS:%=%.$t} .endfor .endif - -.if empty(PROGS) && !empty(SCRIPTS) - -.for t in ${PROGS_TARGETS:O:u} -scripts.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} SUBDIR= _RECURSING_PROGS= \ - $t) -$t: scripts.$t -.endfor - -.endif - -.endif Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Thu Oct 8 19:10:51 2015 (r289050) +++ stable/10/share/mk/bsd.test.mk Thu Oct 8 19:13:36 2015 (r289051) @@ -99,10 +99,6 @@ test: beforetest realtest test: aftertest .endif -.if !empty(SUBDIR) -.include -.endif - .if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) .include .endif