上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 104 下一页
摘要: 继续翻译6.10 Variables from the Environment===================================Variables in `make' can come from the environment in which `make' isrun. Every environment variable that `make' sees when it starts up istransformed into a `make' variable with the same name and value.However, 阅读全文
posted @ 2012-10-05 09:54 健哥的数据花园 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 继续翻译6.9 Undefining Variables========================If you want to clear a variable, setting its value to empty is usuallysufficient. Expanding such a variable will yield the same result (emptystring) regardless of whether it was set or not. However, if you areusing the `flavor' (*note Flavor Fu 阅读全文
posted @ 2012-10-04 16:55 健哥的数据花园 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 上例子foo:=foobar=barall: @echo $(flavor $(foo)) @echo $(flavor $(bar))结果:simplerecursive结束 阅读全文
posted @ 2012-10-04 16:53 健哥的数据花园 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 You may nest `define' directives: `make' will keep track of nesteddirectives and report an error if they are not all properly closed with`endef'. Note that lines beginning with the recipe prefix characterare considered part of a recipe, so any `define' or `endef' stringsappe 阅读全文
posted @ 2012-10-04 16:19 健哥的数据花园 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 上例子define funcfoo: @echo "at foo"endefall: foo @echo "final"$(eval $(call func, foo,abc.c))先不整那些函数参数传递之类的幺蛾子,做一个个简单的例子,运行 make结果是:at foofinal然后再变化下:define func$1: @echo "at foo"endefall: foo @echo "final"$(eval $(call func, foo,abc.c))这次,传递 foo 作为 $1,得到结果相同。基本 阅读全文
posted @ 2012-10-04 15:52 健哥的数据花园 阅读(7336) 评论(0) 推荐(1) 编辑
摘要: 上例子reverse=$(2) $(1)foo=$(call reverse, a, b)all: @echo $(foo)运行结果: makeb a结束 阅读全文
posted @ 2012-10-04 15:03 健哥的数据花园 阅读(6668) 评论(0) 推荐(0) 编辑
摘要: 继续翻译6.8 Defining Multi-Line Variables=================================Another way to set the value of a variable is to use the `define'directive. This directive has an unusual syntax which allows newlinecharacters to be included in the value, which is convenient fordefining both canned sequences 阅读全文
posted @ 2012-10-04 14:31 健哥的数据花园 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 上例子override gao=abcgao=12345all: @echo $(gao)运行的结果,makeabcoverride 指令比其他的变量赋值优先级要高。结束 阅读全文
posted @ 2012-10-04 13:46 健哥的数据花园 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 上例子override gao += abcall: @echo $(gao)如果执行 make gao=12345结果为:12345 abc直接写gao += abcall: @echo $(gao)执行 make gao=12345结果是:12345当然,如果直接 make,结果就是 abc 了。结束 阅读全文
posted @ 2012-10-04 13:36 健哥的数据花园 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 继续翻译6.7 The `override' Directive============================If a variable has been set with a command argument (*note OverridingVariables: Overriding.), then ordinary assignments in the makefile areignored. If you want to set the variable in the makefile even thoughit was set with a command argu 阅读全文
posted @ 2012-10-04 13:06 健哥的数据花园 阅读(201) 评论(0) 推荐(0) 编辑
上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 104 下一页