Subject: Re: printing expanded variables?
To: NetBSD Toolchain Technical Discussion List <tech-toolchain@NetBSD.ORG>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 09/04/2003 14:13:05
>I don't think that's a very good idea.  You're going 1% of the way to
>implementing a full and proper expression evaluator for command-line
>use, but you're doing it in a way incompatible with how things work on
>the "inside" of a makefile.

Not quite.  The patch in question is a very simple incremental change
(it may be 1% of the functionality but is <= 1% of the effort),
and does not preclude doing a -E "eval_expression" at any future point.
There would be no code shared b/w the two btw.   

>I.e. What you're doing is effectively what I suggested with eval(), but
>you're doing it in a very non-intuitive (for make experts) and
>incomplete and incompatible (with makefiles) way.

True - I'm lazy and have limited time to spend on this.  

>I know that eval() looks like a bit of a hack too, but it was intended
>to look and feel like the existing empty() and defined() operators.

I'm not sure eval() as such is needed within a makefile - what would it do
differently to a simple variable reference?  On the command line -E '${FOO}'
is less typing anyway.  But even that is more tedious that -V FOO

>Why not go all the way and make it work "properly"?

For some definition of "properly".... the answer is simple.
I have 100+ other things that I should be doing ;-)
Integrating Alan Barret's :[] patches should be next on my "free time"
list too ;-)