On 18.06.2017 00:31, Christos Zoulas wrote:
> In article <20170617222558.GA24656%britannica.bec.de@localhost>,
> Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
>> On Sun, Jun 18, 2017 at 12:22:13AM +0200, Kamil Rytarowski wrote:
>>> On 18.06.2017 00:16, Christos Zoulas wrote:
>>>> In article <20170617213136.GA21537%britannica.bec.de@localhost>,
>>>> Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
>>>>> On Sat, Jun 17, 2017 at 05:28:07PM -0400, Christos Zoulas wrote:
>>>>>> On Jun 17, 9:38pm, joerg%bec.de@localhost (Joerg Sonnenberger) wrote:
>>>>>> -- Subject: Re: CVS commit: src/usr.bin/make
>>>>>>
>>>>>> | Agreed, please revert. This was discussed at the time and FreeBSD
>>>>>> | behavior you have now implemented is much less useful.
>>>>>>
>>>>>> You can get the original with -V '\VAR'
>>>>>
>>>>> That's no better than the behavior before.
>>>>
>>>> Now you get:
>>>>
>>>> $ make -V MACHINE_CPU
>>>> arm
>>>> $ make -V \\MACHINE_CPU
>>>>
>> ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/arm.*/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/}
>>>>
>>>> The second is the original version.
>>>>
>>>> christos
>>>>
>>>
>>> How about "make -V" getting the original behavior and "make -VV"
>>> resulting with evaluated one?
>>
>> I find -V '${foo}' a perfectly reasonable way to spell it, especially
>> since it works consistently with modifiers. No need for more complexity.
>
> And it still does. You cannot use -VV because of getopt(3). You can use
> a different letter. The complexity is when I get this long string instead
> of the evaluated variable.
>
> christos
>
Can we reuse show-var from pkgsrc?
$ make show-var VARNAME=MACHINE_CPU
x86_64
# show-var:
# show-vars:
# show-subdir-var:
# Convenience targets, to display make variables from the command
# line. Examples:
#
# make show-var VARNAME=PKGNAME
# make show-vars VARNAMES="PKGNAME PKGVERSION PKGREVISION"
# make show-subdir-var VARNAME=DISTFILES
#
# In category directories, show-var and show-vars descend
# recursively into each subdirectory, printing the variables of
# the individual packages. To show a variable from the category
# itself, use show-subdir-var.
.PHONY: show-var
show-var:
@${ECHO} ${${VARNAME}:Q
-- /usr/pkgsrc/mk/bsd.pkg.mk
Attachment:
signature.asc
Description: OpenPGP digital signature