From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 23 05:40:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 97AA22E5 for ; Tue, 23 Apr 2013 05:40:00 +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 789911895 for ; Tue, 23 Apr 2013 05:40:00 +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 r3N5e0Nn020321 for ; Tue, 23 Apr 2013 05:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3N5e0Vi020320; Tue, 23 Apr 2013 05:40:00 GMT (envelope-from gnats) Resent-Date: Tue, 23 Apr 2013 05:40:00 GMT Resent-Message-Id: <201304230540.r3N5e0Vi020320@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1844E213 for ; Tue, 23 Apr 2013 05:31:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E41511872 for ; Tue, 23 Apr 2013 05:31:08 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3N5V8Jl000620 for ; Tue, 23 Apr 2013 05:31:08 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r3N5V8nx000616; Tue, 23 Apr 2013 05:31:08 GMT (envelope-from nobody) Message-Id: <201304230531.r3N5V8nx000616@red.freebsd.org> Date: Tue, 23 Apr 2013 05:31:08 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: 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 List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2013 05:40:00 -0000 >Number: 178072 >Category: ports >Synopsis: [PATCH] [ports] look for Makefile.local in ${PORTSDIR} as well as ${.CURDIR} >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 23 05:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 10-CURRENT >Organization: EMC Isilon >Environment: FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+ba9afe9: Fri Apr 19 20:29:10 PDT 2013 gcooper@gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO amd64 >Description: The attached patch looks for Makefile.local in PORTSDIR as well as .CURDIR, thus being a bit less braindead when it comes to looking for site-localizations when there are a large number of ports categories. Thus one only needs to have one Makefile.local instead of n-categories worth when trying to apply non-invasive changes to a ports tree. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 316288) +++ Mk/bsd.port.mk (working copy) @@ -1260,10 +1260,12 @@ USE_SUBMAKE= yes .endif -.if exists(${MASTERDIR}/Makefile.local) -.include "${MASTERDIR}/Makefile.local" +.for d in ${PORTSDIR} ${MASTERDIR} +.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) @@ -107,33 +107,33 @@ .endif .if !defined(PYTHON_DEFAULT_VERSION) -PYTHON_DEFAULT_VERSION!= make -V PYTHON_DEFAULT_VERSION USE_PYTHON=1 -f ${PORTSDIR}/Mk/bsd.port.mk +PYTHON_DEFAULT_VERSION!= ${MAKE} -V PYTHON_DEFAULT_VERSION USE_PYTHON=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(PYTHON_DEFAULT_PORTVERSION) # We are caching the PYTHON_PORTVERSION of the default python version so we can reuse it in the # common case. -PYTHON_DEFAULT_PORTVERSION!= make -V PYTHON_PORTVERSION USE_PYTHON=1 -f ${PORTSDIR}/Mk/bsd.port.mk +PYTHON_DEFAULT_PORTVERSION!= ${MAKE} -V PYTHON_PORTVERSION USE_PYTHON=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(PYTHONBASE) -PYTHONBASE!= make -V PYTHONBASE USE_PYTHON=1 -f ${PORTSDIR}/Mk/bsd.port.mk +PYTHONBASE!= ${MAKE} -V PYTHONBASE USE_PYTHON=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(_JAVA_VERSION_LIST_REGEXP) -_JAVA_VERSION_LIST_REGEXP!= make -V _JAVA_VERSION_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk +_JAVA_VERSION_LIST_REGEXP!= ${MAKE} -V _JAVA_VERSION_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(_JAVA_VENDOR_LIST_REGEXP) -_JAVA_VENDOR_LIST_REGEXP!= make -V _JAVA_VENDOR_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk +_JAVA_VENDOR_LIST_REGEXP!= ${MAKE} -V _JAVA_VENDOR_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(_JAVA_OS_LIST_REGEXP) -_JAVA_OS_LIST_REGEXP!= make -V _JAVA_OS_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk +_JAVA_OS_LIST_REGEXP!= ${MAKE} -V _JAVA_OS_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(_JAVA_PORTS_INSTALLED) -_JAVA_PORTS_INSTALLED!= make -V _JAVA_PORTS_INSTALLED USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk +_JAVA_PORTS_INSTALLED!= ${MAKE} -V _JAVA_PORTS_INSTALLED USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif .if !defined(UID) @@ -155,9 +155,11 @@ 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" +.for d in ${PORTSDIR} ${.CURDIR} +.if exists($d/Makefile.local) +.include "$d/Makefile.local" .endif +.endfor TARGETS+= all TARGETS+= build >Release-Note: >Audit-Trail: >Unformatted: