visual-studio - $< 和 $@ 在 make 文件中是什么意思

标签 visual-studio makefile wdk

我在 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/

相关文章:

linux - Makefile Linux如何为每个变量执行函数

compiler-errors - SOX : installing libmad make[1]: *** [all-recursive] Error 1 & make: *** [all] Error 2

c - 链接我的驱动程序时出现问题

winapi - 枚举在Windows XP上记录或回放的过程

windows - 是否可以创建虚拟Windows麦克风驱动程序来替换触发字

javascript - 用于自定义 javascript 函数的 Visual Studio Intellisense

visual-studio - 如何重新分发使用 SAP Crystal Reports for Visual Studio 的应用程序?

c++ - 如何在 Visual Studio 中使用 makefile?

c# - 线程调试窗口中没有显示任何线程

c++ - 在我的用户定义的 makefile 中的 makefile 上使用 PETSc