RFR: 8296478: Rework 8282948 and 8282700 to use the new autoconf UTIL_ARG_WITH [v5]

Julian Waters jwaters at openjdk.org
Fri Nov 18 12:34:22 UTC 2022


On Fri, 18 Nov 2022 11:27:14 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> Aaaahhh, **that** bug. I've run into that before. I did attempt to fix it but after wasting too many hours I gave up. :-( It seems to be a limitation in m4 that I cannot understand how to get around. At some point, the string literal, even though quoted inside the `[...]`, is expanded and parsed as m4 macro expansion arguments. In theory, I should have been able to add an additional layer of quoting and then un-quote it once it was past the problematic point, but that did not work.
> 
> I solved the problem by not solving it, and instead rephrased the message to not need the comma. (Imho, this limitation actually improved the quality of the descriptions, so it was not bad per se).
> 
> But I agree that it is annoying to have such a limitation in `UTIL_DEFUN_NAMED`. If you want to have a go at trying to solve it, please do! I'll fully admit my shortcomings and state that trying to solve this passes my knowledge and ability to manipulate m4.
> 
> Or, maybe, you could add some documentation to `UTIL_DEFUN_NAMED` and `UTIL_ARG_WITH`, saying that comma is not allowed in the values.

Oh dear, I was looking to you for help with that one :( I'll see if there's a way to solve this on my end, but I really doubt I'll be able to if even you couldn't...

What I'm more worried about though is that this same issue also seems to be causing the problem I found when using CHECK_VALUE (see above) where it's actually outright deleting the square brackets in the code passed inside the block. I don't know why this didn't initially happen earlier when I re-ran configure with different options as per Erik's request, but I can verify that this affects all the "predicate" parameters of UTIL_ARG_WITH (IF_GIVEN, IF_NOT_GIVEN, etc). This is a way more serious problem that I doubt can be commented away with some documentation since it destroys several widely shell constructs that don't have any valid replacements, which is going to be pretty problematic

Side tangent - Is my usage of DEFAULT_DESC correct?

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

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



More information about the build-dev mailing list