摘要:
继续翻译 A recipe may follow each line that contains a target and prerequisites. These recipes say how to update the target file. A tab character (or whatever character is specified by the `.RECIPEPREFIX' variable; *note Special Variables::) must come at the beginning of every line in th... 阅读全文
摘要:
继续翻译 In the example makefile, the targets include the executable file `edit', and the object files `main.o' and `kbd.o'. The prerequisites are files such as `main.c' and `defs.h'. In fact, each `.o' file is both a target and a prerequisite. Recipes include `cc -c main.c' 阅读全文
摘要:
继续翻译We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read. To use this makefile to create the executable file called `edit', type: make To use this makefile to delete the executable file and all the o... 阅读全文
摘要:
继续翻译2.2 A Simple Makefile ===================== Here is a straightforward makefile that describes the way an executable file called `edit' depends on eight object files which, in turn, depend on eight C source and three header files. In this example, all the C files include... 阅读全文
摘要:
继续翻译 A "rule", then, explains how and when to remake certain files which are the targets of the particular rule. `make' carries out the recipe on the prerequisites to create or update the target. A rule can also explain how and when to carry out an action. *Note Writing Rules: Rules... 阅读全文
摘要:
继续翻译 A "recipe" is an action that `make' carries out. A recipe may have more than one command, either on the same line or each on its own line. *Please note:* you need to put a tab character at the beginning of every recipe line! This is an obscurity that catches the unwary. If you ... 阅读全文
摘要:
继续翻译2.1 What a Rule Looks Like ========================== A simple makefile consists of "rules" with the following shape: TARGET ... : PREREQUISITES ... RECIPE ... ... A "target" is usually the name of a file that is gen... 阅读全文
摘要:
继续翻译2 An Introduction to Makefiles ****************************** You need a file called a "makefile" to tell `make' what to do. Most often, the makefile tells `make' how to compile and link a program. In this chapter, we will discuss a simple makefile that describes how... 阅读全文
摘要:
继续翻译In addition to the information above, please be careful to include the version number of `make' you are using. You can get this information with the command `make --version'. Be sure also to include the type of machine and operating system you are using. One way to obtain this inf... 阅读全文
摘要:
继续翻译 Before reporting a bug or trying to fix it yourself, try to isolate it to the smallest possible makefile that reproduces the problem. Then send us the makefile and the exact results `make' gave you, including any error or warning messages. Please don't paraphrase these messages: ... 阅读全文