Is it possible to have multiple .PHONY targets in a GNU makefile?
For various reasons, it would be convenient for me to specify .PHONY in multiple parts of a makefile. I feel like 开发者_StackOverflowI'm not correctly understanding how this works, but is this possible?
Instead of .PHONY: clean cleanall
do:
.PHONY: clean
<some text>
.PHONY: cleanall
Yes, that's allowed. (If you don't believe me, just try it!)
PHONY=
PHONY+= clean
...
PHONY+= cleanall
.PHONY : $(PHONY)
精彩评论