在下面的简单示例中,我想要执行
很遗憾,尽管使用了
make dist
并在distdebug
和distrelease
之前执行distclean
目标。.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
呢?
distclean
只被调用一次。 - Tyler Collier