From owner-svn-src-head@FreeBSD.ORG Fri Nov 21 18:35:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CAD2B0F; Fri, 21 Nov 2014 18:35:49 +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 599AF906; Fri, 21 Nov 2014 18:35:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sALIZnFv012726; Fri, 21 Nov 2014 18:35:49 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sALIZn7n012725; Fri, 21 Nov 2014 18:35:49 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201411211835.sALIZn7n012725@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 21 Nov 2014 18:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274807 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 18:35:49 -0000 Author: brooks Date: Fri Nov 21 18:35:48 2014 New Revision: 274807 URL: https://svnweb.freebsd.org/changeset/base/274807 Log: Slightly alter the handling of LOCAL_LIB_DIRS to skip addition of directories in LOCAL_LIB_DIRS if they are subdirectories of directories listed in LOCAL_DIRS. This allows a hierarchy like: foo foo/lib foo/usr.bin foo/usr.sbin to be supported with LOCAL_DIRS=foo LOCAL_DIRS=foo/lib. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 21 18:18:37 2014 (r274806) +++ head/Makefile.inc1 Fri Nov 21 18:35:48 2014 (r274807) @@ -97,11 +97,22 @@ SUBDIR+=contrib/ofed # SUBDIR+=etc -# These are last, since it is nice to at least get the base system -# rebuilt before you do them. -.for _DIR in ${LOCAL_LIB_DIRS} ${LOCAL_DIRS} +# Local directories are last, since it is nice to at least get the base +# system rebuilt before you do them. +.for _DIR in ${LOCAL_DIRS} .if exists(${.CURDIR}/${_DIR}/Makefile) -SUBDIR+= ${_DIR} +SUBDIR+= ${_DIR} +.endif +.endfor +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and +# LOCAL_LIB_DIRS=foo/lib to behave as expected. +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} +_REDUNDENT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} +.endfor +.for _DIR in ${LOCAL_LIB_DIRS} +.if empty(_REDUNDENT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) +SUBDIR+= ${_DIR} .endif .endfor .endif