On Wed, 2023-06-07 at 00:14 +0200, Bartłomiej Wójcik wrote: > I also found that in the *immediate* context the expansion is done > before evaluation, and for the *deferred* context, it is the > opposite. But it is also stated that in the *immediate *context, the > expansion is done while parsing, which would be contradictory, > because as I understand the evaluation is the process of parsing and > internalizating.
Evaluating a variable assignment just means that the variable is assigned to some value inside make's memory: that's the "internalizing". So: FOO = bar evaluates to setting the make variable FOO to the value bar. And this: bar = baz FOO = $(bar) evaluates to setting the make variable FOO to the value $(bar): no expansion is performed here, but the variable assignment is still evaluated. And this: bar = baz FOO := $(bar) evaluates to setting the make variable FOO to the value baz: here $(bar) is expanded immediately.