tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make -V default behavior change



On Mon, Jun 19, 2017 at 02:02:18PM -0400, Christos Zoulas wrote:
> On Jun 19,  7:50pm, joerg%bec.de@localhost (Joerg Sonnenberger) wrote:
> -- Subject: Re: make -V default behavior change
> 
> | Again, you still don't get deterministic behavior of expanded variables.
> 
> Why? '-V' expands. '-dV -V' does not. And it really does not matter
> since the unexpanded -V output is only for human consumption (debugging).

Try:

.MAKE.EXPAND_VARIABLES:= 0

BAR = 0
FOO = ${BAR}

and ask for the value of FOO.

> 
> | Franky, this whole thing is a completely mess. So to go forward:
> | (1) Drop -dV. Useless.
> 
> I did not write it.
> 
> | (2) Introduce -v VARIABLE: print the full expansion of ${VARIABLE}.
> | Ignore .MAKE.EXPAND_VARIABLES, do not expand ${} etc., just plain
> | variable expansion.
> 
> I could do that, but then more complexity. N different ways to do the
> same thing.

But they are *not* the same thing. Expanded vs non-expanded is very
different.

> | (3) Revert -V behavior.
> 
> It does not matter. If I change in my Makefile:
> 
> FOO=${BAR}
> to:
> FOO:=${BAR}
> 
> Should the -V output change? What does an external program expect to
> do with ${BAR}?

Yes. I.e. figure out if the build rules support something like our PIE
flags etc. It is even documented to do that.

> And if I add -v to the mix, should I go and remove -dV? How about
> .MAKE.EXPAND_VARIABLES?

-dV was useless and should be again. The only purpose it served was to
override .MAKE.EXPAND_VARIABLES and even that could have been done by
setting the latter directly on the command line.

Joerg


Home | Main Index | Thread Index | Old Index