上一页 1 ··· 79 80 81 82 83 84 85 86 87 ··· 104 下一页
摘要: 见如下例子:LIB=*.oall: $(LIB) @echo $^$(LIB): @echo $@执行结果:*.o*.o所以 阅读全文
posted @ 2012-09-19 10:17 健哥的数据花园 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 继续翻译4.4.1 Wildcard Examples ----------------------- Wildcards can be used in the recipe of a rule, where they are expanded by the shell. For example, here is a rule to delete all the object files: clean: ... 阅读全文
posted @ 2012-09-19 09:50 健哥的数据花园 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 Wildcard expansion is performed by `make' automatically in targets and in prerequisites. In recipes, the shell is responsible for wildcard expansion. In other contexts, wildcard expansion happens only if you request it explicitly with the `wildcard' function. ... 阅读全文
posted @ 2012-09-19 09:34 健哥的数据花园 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 继续翻译4.4 Using Wildcard Characters in File Names =========================================== A single file name can specify many files using "wildcard characters". The wildcard characters in `make' are `*', `?' and `[...]', the sam... 阅读全文
posted @ 2012-09-19 09:20 健哥的数据花园 阅读(264) 评论(0) 推荐(0) 编辑
摘要: Consider an example where your targets are to be placed in a separate directory, and that directory might not exist before `make' is run. Inthis situation, you want the directory to be created before any targets are placed into it but, because the timestamps on directories change whenever a file 阅读全文
posted @ 2012-09-19 08:53 健哥的数据花园 阅读(241) 评论(0) 推荐(0) 编辑
摘要: “order-only”依赖的使用举例: LIBS = libtest.afoo : foo.c | $(LIBS) $(CC) $(CFLAGS) $< -o $@ $(LIBS)make在执行这个规则时,如果目标文件“foo”已经存在。当“foo.c”被修改以后,目标“foo”将会被重建,但是当“libtest.a”被修改以后。将不执行规则的命令来重建目标“foo”。还是自己做一个小例子会比较爽:LIBS=lib.afoo: foo.c | $(LIBS) touch foo @echo "gao"在 foo.c 文件 和 lib.a 文件都存在的情况下。执行 m 阅读全文
posted @ 2012-09-18 16:48 健哥的数据花园 阅读(702) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 The normal prerequisites section may of course be empty. Also, you may still declare multiple lines of prerequisites for the same target: they are appended appropriately (normal prerequisites are appended to the list of normal prerequisites; order-only prerequisites are appended to the list ... 阅读全文
posted @ 2012-09-18 16:34 健哥的数据花园 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 Occasionally, however, you have a situation where you want to impose a specific ordering on the rules to be invoked _without_ forcing the target to be updated if one of those rules is executed. In that case, you want to define "order-only" prerequisites. Order-only prerequisites can b 阅读全文
posted @ 2012-09-18 16:10 健哥的数据花园 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 继续翻译4.3 Types of Prerequisites ========================== There are actually two different types of prerequisites understood by GNU `make': normal prerequisites such as described in the previous section, and "order-only" prerequis... 阅读全文
posted @ 2012-09-18 16:00 健哥的数据花园 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 You may split a long line by inserting a backslash followed by a newline, but this is not required, as `make' places no limit on the length of a line in a makefile. A rule tells `make' two things: when the targets are out of date, and how to updat... 阅读全文
posted @ 2012-09-18 15:36 健哥的数据花园 阅读(281) 评论(0) 推荐(0) 编辑
上一页 1 ··· 79 80 81 82 83 84 85 86 87 ··· 104 下一页