GNU make manual 翻译(二十九)
2012-09-13 17:25
316 查看
继续翻译
在实践中,我们也许想要写一个有点复杂的规则去处理未预料的各种情况。我们应当这样作:
.PHONY : clean
clean :
-rm edit $(objects)
这可以防止 make 发现一个名字为clean 的文件的时候产生歧义。可以让它不至于产生错误而可以继续运行。 (*note Phony Targets::, *note Errors in Recipes: Errors.)
后文待续
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.)
后文待续
相关文章推荐
- GNU make manual 翻译(二)
- GNU make manual 翻译(十九)
- GNU make manual 翻译(三十二)
- GNU make manual 翻译(四十五)
- GNU make manual 翻译(六十四)
- GNU make manual 翻译(七十七)
- GNU make manual 翻译(九十一)
- GNU make manual 翻译( 一百一十一)
- GNU make manual 翻译( 一百二十七)
- GNU make manual 翻译( 一百六十二)
- GNU make manual 翻译( 一百七十四)
- GNU make manual 翻译( 一百八十一)
- GNU make manual 翻译(三)
- GNU make manual 翻译(十七)
- GNU make manual 翻译(三十三)
- GNU make manual 翻译(四十六)
- GNU make manual 翻译(六十五)
- GNU make manual 翻译(七十八)
- GNU make manual 翻译(九十二)
- GNU make manual 翻译( 一百零一)