On Fri, 2 Dec 2022 13:33:09 GMT, Julian Waters <jwat...@openjdk.org> wrote:

>> make/autoconf/util.m4 line 394:
>> 
>>> 392:   m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])])
>>> 393:   m4_if(ARG_IF_ENABLED, , [m4_define([ARG_IF_ENABLED], [:])])
>>> 394:   m4_if(ARG_IF_DISABLED, , [m4_define([ARG_IF_DISABLED], [:])])
>> 
>> This definitely look cleaner. Was it needed to get things to work, or just a 
>> clean-up? (I'm just curious)
>
> The former, the code blocks inside ARG_IF_GIVEN and similar were getting 
> expanded multiple times prior to the change, which was wreaking quite a lot 
> of havoc on any shell code that they might have contained. I ultimately 
> solved that by simply deliberately avoiding their redefinition if they were 
> not empty (m4_define needs to be quoted here because it would expand and 
> start redefining the macro otherwise irregardless of whether their check 
> actually passed or not!)

Ah, I see. Of course. The value was reassigned, losing the quoting in the 
process.

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

PR: https://git.openjdk.org/jdk/pull/11458

Reply via email to