永发信息网

makefile里面的$<是代表什么?

答案:1  悬赏:0  手机版
解决时间 2021-11-17 06:03
  • 提问者网友:留有余香
  • 2021-11-16 14:49
makefile里面的$<是代表什么?
最佳答案
  • 五星知识达人网友:患得患失的劫
  • 2021-11-16 15:34
$<是第一个"prerequisite", 不知道怎么翻译,就是target:后面的列表里的第一个.

Often the prerequisites include header files as well, which you do
not want to mention in the recipe. The automatic variable `$<' is just
the first prerequisite:

VPATH = src:../headers
foo.o : foo.c defs.h hack.h
cc -c $(CFLAGS) $< -o $@

这里$<就是foo.c
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯