Double '$' in jdk/make/RunTests.gmk

erik.joelsson at oracle.com erik.joelsson at oracle.com
Wed Mar 15 13:47:35 UTC 2023


Hello Matthias,

Double '$' in makefiles is used to escape '$' when called by the $(eval 
$(call ...)) combination. Care needs to be taken to use either double or 
single '$' to control when (in which make evaluation phase) a variable 
or macro call is evaluated. In practice this means that we mainly use 
double '$' inside macro bodies. Sometimes either will work, but we have 
decided to stick to double '$' inside macro bodies unless there is a 
reason not to, for consistency.

The call to isTargetOs in this case is inside the macro body of 
SetupRunJtregTest, so the use of double '$' is expected and preferred.

/Erik

On 3/15/23 04:27, Baesken, Matthias wrote:
>
> Hi, I noticed a double usage  of ‘$’  in
>
> jdk/make/RunTests.gmk
>
> 800   ifeq ($$(call isTargetOs, windows), true)
>
> 801 $1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
>
> Is there some good reason for this,  the other call isTargetOs   - 
> snippets in the Makefiles do not use $$ ?
>
> Best regards, Matthias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20230315/79102a77/attachment.htm>


More information about the build-dev mailing list