Pádraig Brady wrote:
Was there a reason to prefer curly braces there, rather than the more
conventional parentheses?
'$(error_fns) \(.*%s[:"], .*(name|file)[^"]*\);$$' *.c; \
I had a slight preference for the curly braces since it was used in a shell
pipeline
and so it's immediately obvious it's a ${variable interpolation}
rather than being misread as a $(command substitution).
Sorry, but I find it as confusing as Jim. Inside the commands of a Makefile
rule,
$$x or $${x} references a shell variable
$$(x) does a command substitution
$(x) or ${x) references a Makefile variable
$(x y) or ${x y} does a GNU make function call
For the latter two, the customary notation is with parentheses.
So, if someone writes ${x) or ${x y}, the reader immediately wonders:
What is the point of the braces? Was it a typo, and they mean $${x} instead?