在下面的简单示例中,我想做 a make dist
and 让distclean
目标在distdebug
and distrelease
之前执行。
.PHONY: distclean
dist: distdebug distrelease
@echo in dist
distdebug: distclean
@echo in distdebug
distrelease:
@echo in distrelease
distclean:
@echo in distclean
不幸的是,尽管使用.PHONY
了 distclean ,但只调用了一次:
vagrant@precise32:/tmp$ make dist
in distclean
in distdebug
in distrelease
in dist
我猜 Make 知道它已经运行distclean
过一次,所以它不会再次运行它。我怎样才能让它运行distclean
多次?