【发布时间】:2011-04-06 03:26:35
【问题描述】:
假设我在 Makefile 中有以下规则:
%.foo: %.bar %.spam %.bot <tab> echo "hello1" > $<
我怎样才能将“hello2”回显到第二个依赖项(但不是 .bot 文件),即 .spam 文件中?谢谢
【问题讨论】:
-
或者,使用
$(word 2,$^)。来自:stackoverflow.com/questions/11424204
标签: makefile