On Thu, 18 Sep 2025 14:40:45 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> make/common/Execute.gmk line 153:
>> 
>>> 151:   $1_VARDEPS := $$($1_COMMAND) $$($1_PRE_COMMAND) $$($1_POST_COMMAND)
>>> 152:   $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS)
>>> 153:   $1_DEPS += $$($1_VARDEPS_FILE)
>> 
>> `$1_DEPS` is an input parameter. Should we really be appending to it inside 
>> the macro body?
>
> I think we usually do that? I mean, if I were programming in a proper 
> language, I'd be horrified at the thought of changing a function argument. 
> But with the limited expressiveness of make, I think this is okay.
> 
> What alternative would you prefer otherwise? That we create a new 
> `$1_EXTRA_DEPS`, add the vardeps file to it, and insert `$$($1_EXTRA_DEPS)` 
> wherever we have `$$($1_DEPS)`? Or explicitly adding the 
> `$$($1_VARDEPS_FILE)` everywhere instead? I don't think any of these are 
> necessarily better.

I'm not going to fight for it, but I would most likely have gone with some 
variant of what you suggested.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27348#discussion_r2360244952

Reply via email to