Makefile中括号$()和大括号$ {}语法有什么区别? [英] What's the difference between parenthesis $() and curly bracket ${} syntax in Makefile?

查看:1024
本文介绍了Makefile中括号$()和大括号$ {}语法有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调用语法为${var}$(var)的变量时是否存在差异?例如,以可变方式将变量展开还是其他方式?

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

推荐答案

没有区别-它们的含义完全相同(在GNU Make和POSIX make中).

There's no difference – they mean exactly the same (in GNU Make and in POSIX make).

我认为$(round brackets)看起来比较整洁,但这只是个人喜好.

I think that $(round brackets) look tidier, but that's just personal preference.

(其他答案指向GNU Make文档的相关部分,请注意,您不应在单个表达式中混用语法)

(Other answers point to the relevant sections of the GNU Make documentation, and note that you shouldn't mix the syntaxes within a single expression)

这篇关于Makefile中括号$()和大括号$ {}语法有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆