摘要: 继续翻译 For example, you might have a list of object files: objects = foo.o bar.o baz.o To get the list of corresponding source files, you could simply write: $(objects:.o=.c) instead of using the general form: $(patsubst %.o,%.c,$(objects))`$(strip STRING)' ... 阅读全文
posted @ 2012-10-09 15:03 健哥的数据花园 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 继续翻译8.2 Functions for String Substitution and Analysis==================================================Here are some functions that operate on strings:`$(subst FROM,TO,TEXT)' Performs a textual replacement on the text TEXT: each occurrence of FROM is replaced by TO. The result is substitut... 阅读全文
posted @ 2012-10-09 14:56 健哥的数据花园 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 继续翻译8 Functions for Transforming Text*********************************Functions allow you to do text processing in the makefile to computethe files to operate on or the commands to use in recipes. You use afunction in a "function call", where you give the name of the functionand some text 阅读全文
posted @ 2012-10-09 13:56 健哥的数据花园 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 继续翻译7.3 Conditionals that Test Flags================================You can write a conditional that tests `make' command flags such as`-t' by using the variable `MAKEFLAGS' together with the `findstring'function (*note Functions for String Substitution and Analysis: TextFunctions.). 阅读全文
posted @ 2012-10-09 10:20 健哥的数据花园 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 继续翻译`ifndef VARIABLE-NAME' If the variable VARIABLE-NAME has an empty value, the TEXT-IF-TRUE is effective; otherwise, the TEXT-IF-FALSE, if any, is effective. The rules for expansion and testing of VARIABLE-NAME are identical to the `ifdef' directive. Extra spaces are allowed and ... 阅读全文
posted @ 2012-10-09 09:46 健哥的数据花园 阅读(218) 评论(0) 推荐(0) 编辑