On Tue, 7 Feb 2023 20:56:01 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

> The newline is added to be compatible with old make 3.81 which is still used 
> on MacOSX.
> Fixed actually by dnsimon.

Possible solutions include:
* Stripping any potential newline from the end of the input, and keep 
unconditionally adding one in the printf statement like in the current patch.
* Checking if the input ends with a newline, and print the additional `\n` only 
if it doesn't.
* Change the requirements for both the make 4+ and printf version to never have 
input ending in a newline. This would likely have to be verified by an assert.

My personal recommendation would be to pick the first solution on this list, I 
think it is easiest to implement in Make.

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

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

Reply via email to