gpt4 book ai didi

Makefile 特殊字符的含义和使用

转载 作者:行者123 更新时间:2023-12-05 00:53:25 25 4
gpt4 key购买 nike

以下字符在 Makefile 中的含义是什么?

$@, $? , $* , $< , $^

我看过一些解释,但我没有完全了解如何准确使用它。

最佳答案

使用模式和特殊变量

When wildcard % appears in the dependency list, it is replaced with 
the same string that was used to perform substitution in the target.

Inside actions we can use:
$@ to represent the full target name of the current target
$? returns the dependencies that are newer than the current target
$* returns the text that corresponds to % in the target
$< returns the name of the first dependency
$^ returns the names of all the dependencies with space as the delimiter

更多解释请见 This github link

关于Makefile 特殊字符的含义和使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41330138/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com