【发布时间】:2020-11-10 15:33:50
【问题描述】:
有没有办法避免扩展未使用的目标的目标依赖关系。如果调用下面的 makefile 来构建 fasttarget,shell 慢命令仍然被调用。其他会阻止 fasttarget 运行 slowcommand 的选项也将不胜感激,尽管我更愿意避免递归 make。
slow = $(shell slowcommand)
.PHONY: fasttarget slowtarget
fasttarget :
fastcommand
slowtarget : $(slow)
%.slowitem.output : %.slowitem.input
buildslowitem $< $@
【问题讨论】:
标签: makefile