.SECONDARY for a pattern rule with GNU Make

强颜欢笑 提交于 2020-01-10 02:35:06

问题


I want to use the special target .SECONDARY of GNU Make to specify that the results of a particular pattern rule should not be deleted when created as a intermediate files. .PRECIOUS works with patterns, but oddly enough, not .SECONDARY. I don't want to use .PRECIOUS, because I do want the file to be deleted in the case that Make is interrupted by a signal, or the command returns a non-zero exit status when used in combination with .DELETE_ON_ERROR. Any suggestions?


回答1:


You can use .SECONDARY with no prerequisites, this will set all intermediate targets behave as SECONDARY.



来源:https://stackoverflow.com/questions/17625394/secondary-for-a-pattern-rule-with-gnu-make

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!