From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 23 23:00:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AB6FEC04 for ; Tue, 23 Apr 2013 23:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8507C13AA for ; Tue, 23 Apr 2013 23:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3NN01Qt026006 for ; Tue, 23 Apr 2013 23:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3NN01lf026005; Tue, 23 Apr 2013 23:00:01 GMT (envelope-from gnats) Date: Tue, 23 Apr 2013 23:00:01 GMT Message-Id: <201304232300.r3NN01lf026005@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org Cc: From: Garrett Cooper Subject: Re: ports/178072: [PATCH] [ports] look for Makefile.local in ${PORTSDIR} as well as ${.CURDIR} X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Garrett Cooper List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2013 23:00:01 -0000 The following reply was made to PR ports/178072; it has been noted by GNATS. From: Garrett Cooper To: bug-followup@FreeBSD.org, yaneurabeya@gmail.com Cc: Subject: Re: ports/178072: [PATCH] [ports] look for Makefile.local in ${PORTSDIR} as well as ${.CURDIR} Date: Tue, 23 Apr 2013 15:56:54 -0700 --Apple-Mail=_4687FAF2-9892-43F8-A067-721B6886C092 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii The attached patch is more correct than the previous one. 1. It removes noise from another patch I submitted (ports/178070). 2. It also fixes the case where double inclusion would be done = (${.CURDIR} =3D=3D ${PORTSDIR}). Granted, this check could probably be = improved, but this seems sane enough as-is. Thanks! -Garrett --Apple-Mail=_4687FAF2-9892-43F8-A067-721B6886C092 Content-Disposition: attachment; filename=search-for-Makefile.local-in-PORTSDIR.patch.txt Content-Type: text/plain; x-unix-mode=0644; name="search-for-Makefile.local-in-PORTSDIR.patch.txt" Content-Transfer-Encoding: 7bit Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 316288) +++ Mk/bsd.port.mk (working copy) @@ -1260,10 +1260,16 @@ USE_SUBMAKE= yes .endif -.if exists(${MASTERDIR}/Makefile.local) -.include "${MASTERDIR}/Makefile.local" +__dirs= ${.CURDIR} +.if ${PORTSDIR} != ${.CURDIR} +__dirs+= ${PORTSDIR} +.endif +.for d in ${__dirs} +.if exists($d/Makefile.local) +.include "$d/Makefile.local" USE_SUBMAKE= yes .endif +.endfor # where 'make config' records user configuration options PORT_DBDIR?= /var/db/ports Index: Mk/bsd.port.subdir.mk =================================================================== --- Mk/bsd.port.subdir.mk (revision 316288) +++ Mk/bsd.port.subdir.mk (working copy) @@ -155,9 +155,15 @@ INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # local customization of the ports tree -.if exists(${.CURDIR}/Makefile.local) -.include "${.CURDIR}/Makefile.local" +__dirs= ${.CURDIR} +.if ${PORTSDIR} != ${.CURDIR} +__dirs+= ${PORTSDIR} .endif +.for d in ${__dirs} +.if exists($d/Makefile.local) +.include "$d/Makefile.local" +.endif +.endfor TARGETS+= all TARGETS+= build --Apple-Mail=_4687FAF2-9892-43F8-A067-721B6886C092--