Date: Tue, 23 Apr 2013 23:00:01 GMT From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/178072: [PATCH] [ports] look for Makefile.local in ${PORTSDIR} as well as ${.CURDIR} Message-ID: <201304232300.r3NN01lf026005@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/178072; it has been noted by GNATS. From: Garrett Cooper <yanegomi@gmail.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304232300.r3NN01lf026005>