继续翻译
复制代码
In practice, we might want to write the rule in a somewhat more
complicated manner to handle unanticipated situations. We would do
this:
.PHONY : clean
clean :
-rm edit $(objects)
This prevents `make' from getting confused by an actual file called
`clean' and causes it to continue in spite of errors from `rm'. (See
*note Phony Targets::, and *note Errors in Recipes: Errors.)
复制代码
在实践中,我们也许想要写一个有点复杂的规则去处理未预料的各种情况。我们应当这样作:
.PHONY : clean
clean :
-rm edit $(objects)
这可以防止 make 发现一个名字为clean 的文件的时候产生歧义。可以让它不至于产生错误而可以继续运行。 (*note Phony Targets::, *note Errors in Recipes: Errors.)
后文待续
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/13/2683714.html,如需转载请自行联系原作者