Subject: Re: printing expanded variables?
To: Mark Valentine <mark@valentine.me.uk>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-toolchain
Date: 10/04/2003 16:20:36
Hi,

On Sat, 4 Oct 2003 14:27:11 +0000, Mark Valentine writes:
>So, the value of showing the final value of the variable is to me merely
>a convenience.

Absolutely ;-)  Every man and his dog has their own magic target for
achieving this - they all take far too much typing when you are
in a hurry to diagnose a build problem ;-)

>If NetBSD's -V wasn't an independent addition, then presumably it was picked

I can't say, its been there for as long as I can remember (which
doesn't say much for my memory).

>So now of course we have two make(1) implementations with a similar but
>critically different -V option and a needless conflict with -X...

Unfortunate yes.  NetBSD uses -X to skip exporting vars via setenv on
systems with seriously limited env space (Darwin at least).

>However, the new NetBSD behaviour seems reasonable to me (though I would have
>elected for a simpler option than parsing the -V option argument myself - I

The new NetBSD behavior is pretty simple - we call VarValue or
VarSubst depending on whether the arg contains $.  So your 

>haven't looked to see what "make -V 'FOO$BAR'" does, for example), since make

It will print FOO${B}AR
$ B="LED YOU BY F" make -V 'FOO$BAR'
FOOLED YOU BY FAR
make: no target to make.

;-)
--sjg