tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make -V
On Wed, Aug 08, 2012 at 12:21:38AM -0700, Simon J. Gerraty wrote:
>
> On Wed, 8 Aug 2012 07:16:01 +0100 (BST), Iain Hibbert writes:
> >but I agree that -V can be a bit irritating, and providing a modifier to
> >cause it to produce the expanded value directly does sound useful. (ie
> >just have -dV switch modify the -V output rather than produce an output
> >itself)
>
> Interesting thought.
> I've not even looked at coding this - wanted to canvas the idea first.
>
> >Is it possible to produce an expansion with all intermediate steps?
>
> make -dv -V '${VAR}'
>
In pkgsrc, we have the obvious "expand the VAR" behavior in bsd.pkg.mk:
show-var:
@${ECHO} ${${VARNAME}:Q}
and is used like:
[23:14:38] agc@netbsd-vm2 ...pkgsrc/editors/ssam [10004] > make show-var
VARNAME=PKGNAME
ssam-1.9nb1
[23:14:49] agc@netbsd-vm2 ...pkgsrc/editors/ssam [10005] >
which should be easy to embed anywhere you need it. The intermediate steps
in the "how we got here" would be very useful, though.
Best,
Alistair
Home |
Main Index |
Thread Index |
Old Index