On Fri, 4 Apr 2025 14:32:30 GMT, Magnus Ihse Bursie wrote:
>> We have been sloppy in our use of `printf` in make code. Most of the time,
>> we should really use `echo` instead. If we do need to use `printf`, we
>> should never inline make or shell variables into the formatting string,
>> since
On Mon, 7 Apr 2025 05:25:39 GMT, David Holmes wrote:
>> No, there are embedded `\n` and that does not work with echo. I could split
>> it into three consecutive lines but I don't think that would be a gain.
>
> Ah I see. So basically the only time we actually need `printf` as far as I
> can see
On Fri, 4 Apr 2025 13:35:22 GMT, Magnus Ihse Bursie wrote:
>> make/common/modules/GensrcCommon.gmk line 45:
>>
>>> 43: $$(call MakeTargetDir)
>>> 44: $(PRINTF) "jdk=%s\nfull=%s\nrelease=%s\n" \
>>> 45: $(VERSION_NUMBER) $(VERSION_STRING) $(VERSION_SHORT) > $$@
>>
>>
We have been sloppy in our use of `printf` in make code. Most of the time, we
should really use `echo` instead. If we do need to use `printf`, we should
never inline make or shell variables into the formatting string, since they may
contain `%` which will be interpreted as formatting. Instead, w
On Fri, 4 Apr 2025 13:53:57 GMT, Erik Joelsson wrote:
>> I'm not sure I agree. Why would:
>>
>> $$(ECHO) -n '$$($1_OVERVIEW_TEXT)'
>>
>> be better than
>>
>> $$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)'
>>
>> ?
>>
>> We're kind of squabbling over details here, and it really doesn't matter as
>>
> We have been sloppy in our use of `printf` in make code. Most of the time, we
> should really use `echo` instead. If we do need to use `printf`, we should
> never inline make or shell variables into the formatting string, since they
> may contain `%` which will be interpreted as formatting. In
> We have been sloppy in our use of `printf` in make code. Most of the time, we
> should really use `echo` instead. If we do need to use `printf`, we should
> never inline make or shell variables into the formatting string, since they
> may contain `%` which will be interpreted as formatting. In
On Fri, 4 Apr 2025 13:41:17 GMT, Magnus Ihse Bursie wrote:
>> I wasn't aware of that feature in `echo`, but I agree that if we are using
>> printf just to omit the line break, then `echo -n` seems like a better
>> choice.
>
> I'm not sure I agree. Why would:
>
> $$(ECHO) -n '$$($1_OVERVIEW_TEX
On Fri, 4 Apr 2025 07:17:16 GMT, Erik Joelsson wrote:
>> `echo -n` ?
>
> I wasn't aware of that feature in `echo`, but I agree that if we are using
> printf just to omit the line break, then `echo -n` seems like a better choice.
I'm not sure I agree. Why would:
$$(ECHO) -n '$$($1_OVERVIEW_TEXT
On Fri, 4 Apr 2025 02:35:07 GMT, David Holmes wrote:
>> We have been sloppy in our use of `printf` in make code. Most of the time,
>> we should really use `echo` instead. If we do need to use `printf`, we
>> should never inline make or shell variables into the formatting string,
>> since they
On Fri, 4 Apr 2025 02:23:23 GMT, David Holmes wrote:
>> That would add an extra \n at the end. Maybe it does not matter so much, but
>> I did not want to change anything.
>
> `echo -n` ?
I wasn't aware of that feature in `echo`, but I agree that if we are using
printf just to omit the line bre
On Thu, 3 Apr 2025 13:36:16 GMT, Magnus Ihse Bursie wrote:
> We have been sloppy in our use of `printf` in make code. Most of the time, we
> should really use `echo` instead. If we do need to use `printf`, we should
> never inline make or shell variables into the formatting string, since they
On Thu, 3 Apr 2025 21:08:40 GMT, Magnus Ihse Bursie wrote:
>> make/autoconf/help.m4 line 295:
>>
>>> 293: $ECHO "* HS debug level: $HOTSPOT_DEBUG_LEVEL"
>>> 294: $ECHO "* JVM variants: $JVM_VARIANTS"
>>> 295: $ECHO "* JVM features: "
>>
>> I believe this will now add a newline where t
On Thu, 3 Apr 2025 21:07:50 GMT, Magnus Ihse Bursie wrote:
>> make/Docs.gmk line 267:
>>
>>> 265:$$(call LogInfo, Creating overview.html for $1)
>>> 266:$$(call MakeDir, $$(@D))
>>> 267:$$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)' > $$@
>>
>> For my education, why isn't this j
On Thu, 3 Apr 2025 20:15:00 GMT, Mikael Vidstedt wrote:
>> We have been sloppy in our use of `printf` in make code. Most of the time,
>> we should really use `echo` instead. If we do need to use `printf`, we
>> should never inline make or shell variables into the formatting string,
>> since th
On Thu, 3 Apr 2025 13:36:16 GMT, Magnus Ihse Bursie wrote:
> We have been sloppy in our use of `printf` in make code. Most of the time, we
> should really use `echo` instead. If we do need to use `printf`, we should
> never inline make or shell variables into the formatting string, since they
16 matches
Mail list logo