Skip to content

[makefile] highlighting issues with variable definitions and shell commands #55256

@xornet-sl

Description

@xornet-sl
  • VSCode Version: 1.25.1
  • OS Version: Linux Arch (updated)

Variables in braces

According to this document (GNU Makefile reference) there are two allowed types of variable definitions: $(VARIABLE) and ${VARIABLE}:

To substitute a variable’s value, write a dollar sign followed by the name of the variable in parentheses or braces: either ‘$(foo)’ or ‘${foo}’ is a valid reference to the variable foo.

Currently Makefile highlighting definition supports only parentheses but not braces.

Shell commands with $()

Look at:

all:
	some_shell_var=$$(sed -nre 's/some regex with (group)/\1/p')

sed command is parsed as makefile function, just like $() Even when we escape dollar sign with another dollar sign. So in this case highlighting totally brakes on closing parenthesis inside sed's regexp.

Metadata

Metadata

Assignees

Labels

grammarSyntax highlighting grammar

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions