Skip to content

Change Make variable syntax to use curly braces most of the time - #294

Merged
jtrobles-cdd merged 1 commit into
developfrom
makefile-vars-curly-braces
Jul 14, 2026
Merged

Change Make variable syntax to use curly braces most of the time#294
jtrobles-cdd merged 1 commit into
developfrom
makefile-vars-curly-braces

Conversation

@jtrobles-cdd

Copy link
Copy Markdown
Member

Wherever possible, change the Make variable syntax to use curly braces (${VAR}) instead of parentheses ($(VAR)) to ease code portability between Makefiles and Bash scripts.

We will continue using parentheses for Make functions such as:

  • $(abspath …)
  • $(patsubst …)
  • $(shell …)
  • $(subst …)
  • $(wildcard …)
  • Etc.

and for Make variables that would mean something different in Bash or would not work there at all, such as:

  • $(*:.in=.txt)
  • $(*)
  • Etc.

Wherever possible, change the Make variable syntax to use curly braces
(`${VAR}`) instead of parentheses (`$(VAR)`) to ease code portability
between Makefiles and Bash scripts.

We will continue using parentheses for Make functions such as:

- `$(abspath …)`
- `$(patsubst …)`
- `$(shell …)`
- `$(subst …)`
- `$(wildcard …)`
- Etc.

and for Make variables that would mean something different in Bash or
would not work there at all, such as:

- `$(*:.in=.txt)`
- `$(*)`
- Etc.
@jtrobles-cdd jtrobles-cdd self-assigned this Jul 14, 2026
@jtrobles-cdd
jtrobles-cdd requested a review from a team as a code owner July 14, 2026 15:58
@jtrobles-cdd jtrobles-cdd added the task Task or chore label Jul 14, 2026
@sonarqubecloud

Copy link
Copy Markdown

@jtrobles-cdd
jtrobles-cdd merged commit 6bde379 into develop Jul 14, 2026
18 checks passed
@jtrobles-cdd
jtrobles-cdd deleted the makefile-vars-curly-braces branch July 14, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

task Task or chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant