.PHONY : clean #只要有这个声明,不管是否有“clean”文件,要运行“clean”这个目标,只有“make clean”
bigoutput littleoutput : text.g generate text.g -$(subst output,,$@) > $@ #等价于 bigoutput : text.g generate text.g -big > bigoutput littleoutput : text.g generate text.g -little > littleoutput
target1: dep1
target1: dep2
cmd2
#合并后
target1: dep1 dep2
cmd2
target1: dep1
cmd1
target1: dep2
cmd2
#合并后
target1: dep2
cmd2
原文:https://www.cnblogs.com/chusiyong/p/11384712.html