From owner-svn-src-stable-10@FreeBSD.ORG Thu Oct 23 00:54:53 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBE83E38; Thu, 23 Oct 2014 00:54:53 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA76CFA; Thu, 23 Oct 2014 00:54:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9N0srL5084581; Thu, 23 Oct 2014 00:54:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9N0srfB084580; Thu, 23 Oct 2014 00:54:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410230054.s9N0srfB084580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 23 Oct 2014 00:54:53 +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: r273501 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 00:54:53 -0000 Author: ngie Date: Thu Oct 23 00:54:52 2014 New Revision: 273501 URL: https://svnweb.freebsd.org/changeset/base/273501 Log: MFC r272055: Improve bsd.progs.mk compatibility with bsd.prog.mk 1. Do not install FILES/SCRIPTS multiple times if PROGS is specified; this is already handled via bsd.prog.mk when it's called recursively (PR: 191055, 191955). 2. Some variables, like BINDIR and PROGNAME, default to a value if unset whereas others get appended to, like CFLAGS. Add support for the former case (PR: 191056) 3. Make "checkdpadd" and "clean" available targets for recursive execution. Reviewed by: marcel, sjg Phabric: D822 PR: 191055, 191056, 191955 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Thu Oct 23 00:51:52 2014 (r273500) +++ stable/10/share/mk/bsd.progs.mk Thu Oct 23 00:54:52 2014 (r273501) @@ -42,10 +42,15 @@ PROG ?= $t .if defined(PROG) # just one of many -PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS +PROG_OVERRIDE_VARS += BINDIR MAN SRCS +PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u} -.if defined(${v}.${PROG}) || defined(${v}_${PROG}) -$v += ${${v}_${PROG}:U${${v}.${PROG}}} +.if empty(${PROG_OVERRIDE_VARS:M$v}) +.if defined(${v}.${PROG}) +$v += ${${v}.${PROG}} +.elif defined(${v}_${PROG}) +$v += ${${v}_${PROG}} +.endif .else $v ?= .endif @@ -61,7 +66,7 @@ UPDATE_DEPENDFILE ?= NO DEPENDFILE?= .depend.${PROG} # prog.mk will do the rest .else -all: ${PROGS} +all: ${FILES} ${PROGS} ${SCRIPTS} # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO @@ -75,7 +80,7 @@ UPDATE_DEPENDFILE = NO .ifndef _RECURSING_PROGS # tell progs.mk we might want to install things -PROGS_TARGETS+= cleandepend cleandir cleanobj depend install +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir cleanobj depend install .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) @@ -98,18 +103,15 @@ $p.$t: .PHONY .MAKE $t: ${PROGS:%=%.$t} .endfor -SCRIPTS_TARGETS+= cleandepend cleandir cleanobj depend install +.if empty(PROGS) && !empty(SCRIPTS) -.for p in ${SCRIPTS} -.for t in ${SCRIPTS_TARGETS:O:u} -$p.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= SCRIPT=$p ${x.$p} ${@:E}) -.endfor +.for t in ${PROGS_TARGETS:O:u} +scripts.$t: .PHONY .MAKE + (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} SUBDIR= _RECURSING_PROGS= \ + $t) +$t: scripts.$t .endfor -.for t in ${SCRIPTS_TARGETS:O:u} -$t: ${SCRIPTS:%=%.$t} -.endfor +.endif .endif