GNU make manual 翻譯 十八

2021-09-08 16:27:58 字數 1113 閱讀 6841

繼續翻譯

prerequisites of the goal. if some other rule

isnot depended on by the

goal (or anything it depends on, etc.), that rule

isnot processed,

unless you tell `make

'to do so (with a command such as `make clean

').

before recompiling an

object file, `make'

considers updating its

prerequisites, the source file and header files. this makefile does not

specify anything to be done

for them--the `.c'

and `.h

'files are not

the targets of any rules--so `make'

does nothing for these files. but

`make'

would update automatically generated c programs, such as those

made by bison or yacc, by their own rules at this time.

其他的規則被處理的原因是,他們的目的出現在了終點的前提條件上。如果乙個規則沒有出現在終點的依賴序列中,則此規則不會得到處理。除非你強制 make 去處理(例如 執行 make clean)。

在重新編譯乙個目標檔案之前, make 會先幹更改此目標檔案的前提條件,即原始檔和標頭檔案。

此makefile 不會指定任何任務--.c 和 .h 檔案不是任何規則的目的--所以 make 不會處理它們。但是make 會自動地生成 c 程式,例如那些由 規則所指定,進而被如bison 或者 yacc 生成的c程式。

後文待續

GNU make manual 翻譯 三十四

繼續翻譯 a directive is an instruction for make to do something special while reading the makefile.these include reading another makefile note including o...

GNU make manual 翻譯 三十五

繼續翻譯 in a line of a makefile starts a comment it and the rest of the line are ignored,except that a trailing backslash not escaped by another backslas...

GNU make manual 翻譯 三十九

繼續翻譯 3.3 including other makefiles the include directive tells make to suspend reading the current makefile and read one or more other makefiles befor...