Date: Fri, 21 Nov 2014 18:35:49 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274807 - head Message-ID: <201411211835.sALIZn7n012725@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411211835.sALIZn7n012725>