$+ makefile 中的含义

发布于 2024-07-26 15:26:04 字数 79 浏览 2 评论 0原文

GNU makefile 中的 $+ 是什么意思?
另外,请给我一些编写 makefile 的好的查找手册。

What does $+ in a GNU makefile mean?
Also, please give me some good lookup manual for writing makefiles.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

亚希 2024-08-02 15:26:04

来自 制作手册

$^    所有先决条件的名称,它们之间有空格。 对于存档成员的先决条件,仅使用指定的成员(请参阅存档)。 目标对其所依赖的每个其他文件只有一个先决条件,无论每个文件被列为先决条件多少次。 因此,如果您多次为某个目标列出先决条件,则 $^ 的值仅包含该名称的一份副本。 此列表不包含任何仅限订单
先决条件; 对于那些看到“$|” 变量,如下。

$+    这类似于“$^”,但多次列出的先决条件会按照它们在 makefile 中列出的顺序重复。 这主要用于链接命令,其中以特定顺序重复库文件名是有意义的。

From the make manual:

$^    The names of all the prerequisites, with spaces between them. For prerequisites which are archive members, only the member named is used (see Archives). A target has only one prerequisite on each other file it depends on, no matter how many times each file is listed as a prerequisite. So if you list a prerequisite more than once for a target, the value of $^ contains just one copy of the name. This list does not contain any of the order-only
prerequisites; for those see the `$|' variable, below.

$+    This is like `$^', but prerequisites listed more than once are duplicated in the order they were listed in the makefile. This is primarily useful for use in linking commands where it is meaningful to repeat library file names in a particular order.

逆光下的微笑 2024-08-02 15:26:04

在这两种情况下,我只能说 RTFM...或 RTFI 在这种情况下。 在命令提示符下键入内容

info make

,您想要的所有信息都将触手可及。

具体对于$+来说:它指的是当前规则的所有先决条件的名称。 例如,请参见 http://uw714doc.sco。 com/cgi-bin/info2html?(make.info)自动&lang=en

In both cases, all I can say is RTFM... or RTFI in this case. Type

info make

at a command prompt and all the information you could ever want will be at your fingertips.

For $+ specifically: it refers to the names of all the prerequisites of the current rule. See for example http://uw714doc.sco.com/cgi-bin/info2html?(make.info)Automatic&lang=en

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文