我在 WDK 构建环境的 makefile 中找到了这些伪变量名称。这些变量引用了什么?我相信通过搜索引擎获得答案有点困难,因为它们很特别。
最佳答案
这些是 automatic variables :
$@ The file name of the target of the rule. If the target is an archive member, then ‘$@’ is the name of the archive file. In a pattern rule that has multiple targets (see Introduction to Pattern Rules), ‘$@’ is the name of whichever target caused the rule's recipe to be run.
$< The name of the first prerequisite. If the target got its recipe from an implicit rule, this will be the first prerequisite added by the implicit rule (see Implicit Rules).
它们用于构建可以应用于不同目标的规则,这样人们就不需要为每个必须处理的文件重复相同的规则......
PS:为了找到答案,我先找了'all documentation on a single page'对于 GNU make,然后使用我浏览器的搜索功能...
关于visual-studio - $< 和 $@ 在 make 文件中是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4691226/