上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 104 下一页
摘要: 学习 makefile遇到了静态模式规则部分,研究一下:http://www.gnu.org/software/make/manual/html_node/Static-Usage.html用的是大家经常用的例子: objects = foo.o bar.o all: $(objects) $(objects): %.o: %.c $(CC) -c $(CFLAGS) $< -o $@我想,是否可以把它类比于通配符。 $(objects)里的内容都要是.o 格式。而每个 .o 都依赖于 .c。 阅读全文
posted @ 2012-09-18 08:34 健哥的数据花园 阅读(2500) 评论(0) 推荐(0) 编辑
摘要: 继续翻译Secondary Expansion of Static Pattern Rules ------------------------------------------- Rules for secondary expansion of static pattern rules are identical to those for explicit rules, above, with one exception: for static pat... 阅读全文
posted @ 2012-09-18 08:13 健哥的数据花园 阅读(181) 评论(1) 推荐(0) 编辑
摘要: 啥也别说了,上例子: 输出为: foo1 foo2 foo1.bar foo2.bar 改变为: 输出为: foo1 foo2 foo1.bar foo2.bar foo2.bar foo1.bar foo2.bar 也就是说, 对 $+而言,就是将 前提条件中的内容原样输出 对 $^ 而言,前提条 阅读全文
posted @ 2012-09-17 15:59 健哥的数据花园 阅读(2575) 评论(0) 推荐(0) 编辑
摘要: Rules undergo secondary expansion in makefile order, except that the rule with the recipe is always evaluated last. The variables `$$?' and `$$*' are not available and expand to the empty string. 二次扩展遵循 makefile中的自然顺序,除了 片段中... 阅读全文
posted @ 2012-09-17 15:10 健哥的数据花园 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 继续翻译Secondary Expansion of Explicit Rules ------------------------------------- During the secondary expansion of explicit rules, `$$@' and `$$%' evaluate, respectively, to the file name of the target and, when the target is an ar... 阅读全文
posted @ 2012-09-17 14:15 健哥的数据花园 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 You can also mix in functions here, as long as they are properly escaped: main_SRCS := main.c try.c test.c lib_SRCS := lib.c api.c .SECONDEXPANSION: main lib:... 阅读全文
posted @ 2012-09-17 13:36 健哥的数据花园 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 .SECONDEXPANSION: main_OBJS := main.o try.o test.o lib_OBJS := lib.o api.o main lib: $$($$@_OBJS) Here, after the initial expansion the p... 阅读全文
posted @ 2012-09-17 13:19 健哥的数据花园 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 This is marginally more exciting, but the true power of this feature only becomes apparent when you discover that secondary expansions always take place within the scope of the automatic variables for that target. This means that you can use variables such as `$@', `$*', etc. during the 阅读全文
posted @ 2012-09-17 13:06 健哥的数据花园 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 Obviously, this is not a very interesting case since the same result could more easily have been achieved simply by having both variables appear, unescaped, in the prerequisites list. One difference becomes apparent if the variables are reset; consider this example: .SECONDEXPANSION: ... 阅读全文
posted @ 2012-09-17 12:53 健哥的数据花园 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 看例子:.SECONDEXPANSION:ONE=onefileTWO=twofilemyfile: $(ONE) $$(TWO) echo "myfile"onefile: echo "onefile"twofile: echo "twofile"执行结果:onefiletwofilemyfile如果把 .SECONDEXPANSION: 一行去掉:#.SECONDEXPANSION:ONE=onefileTWO=twofilemyfile: $(ONE) $$(TWO) echo "myfile"onefile 阅读全文
posted @ 2012-09-17 12:45 健哥的数据花园 阅读(1290) 评论(0) 推荐(0) 编辑
上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 104 下一页