【发布时间】:2016-09-14 17:18:17
【问题描述】:
我希望有以下规则:
foo_% bar_%:
@echo "Complex building instructions for $@"
all: foo_xyz bar_xyz
然后运行'make all'并得到:
Complex building instructions for foo_xyz
Complex building instructions for bar_xyz
但是,因为 '%' 两次匹配同一个字符串 (xyz) 它只是第一次“构建”,所以我得到的只是第一行。
当'$@' 第二次不同时,有没有办法让 GNU make 执行两次'echo'?毕竟由于$@不同,构建指令也不同:/
【问题讨论】:
标签: gnu-make