上一页 1 ··· 86 87 88 89 90 91 92 93 94 ··· 104 下一页
摘要: 继续翻译 When a `.c' file is used automatically in this way, it is also automatically added to the list of prerequisites. We can therefore omit the `.c' files from the prerequisites, provided we omit the recipe. Here is the entire example, with both of these ... 阅读全文
posted @ 2012-09-13 16:10 健哥的数据花园 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 继续翻译2.5 Letting `make' Deduce the Recipes ===================================== It is not necessary to spell out the recipes for compiling the individual C source files, because `make' can figure them out: it has an implicit rule ... 阅读全文
posted @ 2012-09-13 16:03 健哥的数据花园 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 继续翻译Then, each place we want to put a list of the object file names, we can substitute the variable's value by writing `$(objects)' (*note How toUse Variables: Using Variables.). Here is how the complete simple makefile looks when you use a variable ... 阅读全文
posted @ 2012-09-13 15:34 健哥的数据花园 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 It is standard practice for every makefile to have a variable named `objects', `OBJECTS', `objs', `OBJS', `obj', or `OBJ' which is a listof all object file names. We would define such a variable `objects'with a line like this in the makefile: ... 阅读全文
posted @ 2012-09-13 15:26 健哥的数据花园 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 继续翻译2.4 Variables Make Makefiles Simpler ==================================== In our example, we had to list all the object files twice in the rule for `edit' (repeated here): ... 阅读全文
posted @ 2012-09-13 15:13 健哥的数据花园 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 After recompiling whichever object files need it, `make' decides whether to relink `edit'. This must be done if the file `edit' doesnot exist, or if any of the object files are newer than it. If an object file was just recompiled, it is now newer than `edit', so `edit' is re 阅读全文
posted @ 2012-09-13 15:03 健哥的数据花园 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 The other rules are processed because their targets appear as prerequisites of the goal. If some other rule is not depended on by thegoal (or anything it depends on, etc.), that rule is not processed, unless you tell `make' to do so (with a command such as `make clean'). ... 阅读全文
posted @ 2012-09-13 14:52 健哥的数据花园 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 Thus, when you give the command: make `make' reads the makefile in the current directory and begins by processing the first rule. In the example, this rule is for relinking `edit'; but before `make' can fully process this rule, it must process the rules for the fi... 阅读全文
posted @ 2012-09-12 17:29 健哥的数据花园 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 继续翻译2.3 How `make' Processes a Makefile =================================== By default, `make' starts with the first target (not targets whose names start with `.'). This is called the "default goal". ("Goals" are the targets that `make' strives ultimately to upda 阅读全文
posted @ 2012-09-12 17:03 健哥的数据花园 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 继续翻译 The target `clean' is not a file, but merely the name of an action. Since you normally do not want to carry out the actions in this rule, `clean' is not a prerequisite of any other rule. Consequently, `make' never does anything with it unless you tell it specifically. Note that ... 阅读全文
posted @ 2012-09-12 16:42 健哥的数据花园 阅读(219) 评论(0) 推荐(0) 编辑
上一页 1 ··· 86 87 88 89 90 91 92 93 94 ··· 104 下一页