GNU make manual 翻譯 一百八十

2021-09-06 06:22:58 字數 1830 閱讀 7452

繼續翻譯

7.2

syntax of conditionals

*************************=the syntax of a ****** conditional with no `

else

'is as follows:

conditional-directive

text-if-true

endif

the text-if-true may be any lines of text, to be considered as

part of

the makefile

if the condition is

true. if the condition is

false

, no

text

isused instead.

the syntax of a complex conditional

isas

follows:

conditional-directive

text-if-true

else

text-if-false

endif

or:conditional-directive

text-if-one-is-true

else conditional-directive

text-if-true

else

text-if-false

endif

there can be

as many "

`else' conditional-directive

" clauses as

necessary. once a given condition

istrue, text-if-true is

used and no

other clause

is used; if no condition is

true then text-if-false is

used. the text-if-true and text-if-false can be any number of lines of

text.

7.2 條件式的語法

*************************=

簡單的沒有else的條件式的語法如下:

conditional-directive

text-if-true

endif

text-if-true 可以是任意的內容,如果條件為真則其被認為是makefile的一部分。如果條件為假,則沒有任何文字被利用。

複雜的條件式的語法如下:

conditional-directive

text-if-true

else

text-if-false

endif

或者:conditional-directive

text-if-one-is-true

else conditional-directive

text-if-true

else

text-if-false

endif

只要有必要,可以有很多的 else conditional-directive 子句。一旦乙個給定的條件為真,則 text-if-true 就會被利用,而其他的子句就不會再被利用了;如果沒有條件為真,那麼 text-if-false 被利用。text-if-true 和 text-if-false 的子句可以有任意多行。

後文待續

GNU make manual 翻譯 十八

繼續翻譯 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 tel...

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...