Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2006 16:58:02 -0800 (PST)
From:      infofarmer@gmail.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/92123: [patch] bsd.port.mk: PLIST_SUBX and SUBX_LIST autoexpansion
Message-ID:  <43d2d89a.2413a822.1857.fffff737@mx.gmail.com>
Resent-Message-ID: <200601220100.k0M10Haq070890@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92123
>Category:       ports
>Synopsis:       [patch] bsd.port.mk: PLIST_SUBX and SUBX_LIST autoexpansion
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 22 01:00:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Pantyukhin
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD sat64.net17 6.0-STABLE FreeBSD 6.0-STABLE #4: Fri Jan 20 02:24:10 MSK 2006 sat@sat64.net17:/usr/obj/usr/src/sys/SATCUR32 i386


	
>Description:
Implement two autoexpanding variables: PLIST_SUBX and SUBX_LIST

Tired of PLIST_SUB=LONG_NAME=${LONG_NAME} VERY_LONG_NAME=${VERY_LONG_NAME} ...
copy-paste jobs? Meet the SUBX variables. Just write:
PLIST_SUBX=LONG_NAME VERY_LONG_NAME
and the expanded pairs will be added to PLIST_SUB.

This idea in one form or another has probably come to every
port maintainer.

	
>How-To-Repeat:
	
>Fix:

We just need these lines somewhere after PLIST_SUB/SUB_LIST
definitions, probably right next to this line:

# Put this as far down as possible so it will catch all PLIST_SUB definitions.

.for _X in ${PLIST_SUBX}
PLIST_SUB+=${_X}=${${_X}}
.endfor

.for _X in ${SUBX_LIST}
SUB_LIST+=${_X}=${${_X}}
.endfor


Checks, optimizations, talk about the dangers of relying on
recursive expansion, string quotations are all welcome,
but committing these 6 lines will start saving us lots of
typing right away.
	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43d2d89a.2413a822.1857.fffff737>