摘要:
继续翻译 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 ... 阅读全文
摘要:
继续翻译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 ... 阅读全文
摘要:
继续翻译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 ... 阅读全文
摘要:
继续翻译 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: ... 阅读全文
摘要:
继续翻译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): ... 阅读全文
摘要:
继续翻译 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 阅读全文
摘要:
继续翻译 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'). ... 阅读全文