开发者

Is it possible to have multiple .PHONY targets in a GNU makefile?

开发者 https://www.devze.com 2023-01-24 19:59 出处:网络
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 possi

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号