GNU make manual 翻译(二十九)
继续翻译
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.)
后文待续