ports/92123: [patch] bsd.port.mk: PLIST_SUBX and SUBX_LIST autoexpansion
infofarmer at gmail.com
infofarmer at gmail.com
Sun Jan 22 01:00:23 UTC 2006
>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 at 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:
More information about the freebsd-ports-bugs
mailing list