What's the difference between parenthesis $() and curly bracket ${} syntax in Makefile?

前端 未结 6 407
长发绾君心
长发绾君心 2020-12-12 19:48

Is there any differences in invoking variables with syntax ${var} and $(var)? For instance, in the way the variable will be expanded or anything?

6条回答
  •  天涯浪人
    2020-12-12 20:32

    The Basics of Variable References section from the GNU make documentation state no differences:

    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.

提交回复
热议问题