![]() |
Home | Libraries | People | FAQ | More |
In addition to generic error messages, bjam may emit one
of the following:
除了通常的錯誤信息,bjam 可能還會發出以下信息:
warning: unknown rule X
A rule was invoked that has not been defined with an "actions"
or "rule" statement.
表示被調用的規則沒有用 "actions" 或 "rule" 語句定義。
using N temp target(s)
Targets marked as being temporary (but nonetheless present) have been found.
找到標記為臨時的(但卻是存在的)目標。
updating N target(s)
Targets are out-of-date and will be updated.
目標過期,將被更新。
can't find N target(s)
Source files can't be found and there are no actions to create them.
不能找到源文件,且沒有動作創建它們。
can't make N target(s)
Due to sources not being found, other targets cannot be made.
由於源文件未找到,其它目標不能構建。
warning: X depends on itself
A target depends on itself either directly or through its sources.
目標直接或通過它的源依賴於它自己本身。
don't know how to make X
A target is not present and no actions have been defined to create it.
目標不存在且沒有定義動作來創建它。
X skipped for lack of Y
A source failed to build, and thus a target cannot be built.
源文件構建失敗,因此目標不能構建。
warning: using independent target X
A target that is not a dependency of any other target is being referenced
with $(<) or $(>).
某個被 $(<) 或 $(>) 引用的目標不是其它目標的依賴物。
X removed
BJam removed a partially built target after being interrupted.BJam 在中斷後刪除了一部分構建目標。
For parallel building to be successful, the dependencies among files must
be properly spelled out, as targets tend to get built in a quickest-first
ordering. Also, beware of un-parallelizable commands that drop fixed-named
files into the current directory, like yacc(1) does.
為了成功進行並發構建,文件的依賴關係必須正確說明,以使目標以盡可能快的順序進行構建。另外,小心留意不可並發的命令,它們會刪除當前目錄中的固定名字的文件,像 yacc(1) 所做的。
A poorly set $(JAMSHELL) is likely to result in silent
failure.
對 $(JAMSHELL) 設置得不好很可能會導致無聲無息的失敗。
This section is derived from the official Jam documentation and from experience
using it and reading the Jambase rules. We repeat the information here mostly
because it is essential to understanding and using Jam, but is not consolidated
in a single place. Some of it is missing from the official documentation
altogether. We hope it will be useful to anyone wishing to become familiar
with Jam and the Boost build system.
本
章源自於 Jam 的官方文檔和使用它的經驗以及對 Jambase 規則的閱讀。我們在此重複這些信息,主要是因為它們對於理解和使用 Jam
是必需的,但它們並未被整理到一起。其中有些還是官方文檔中沒有的。我們希望它們對那些希望熟練掌握 Jam 和 Boost build
系統的用戶有所幫助。
rules" are actually simple procedural
entities. Think of them as functions. Arguments are separated by colons.rules" 實際上是簡單的程序實體。將它們視為函數。參數以冒號分隔。
DEPENDS rule creates
a link in the dependency graph between the named targets.DEPENDS 規則在依賴關係圖中創建命名目標之間的鏈接。
INCLUDES
rule is incorrect: INCLUDES targets1 : targets2
causes everything that depends on a member of targets1
to depend on all members of targets2. It does this
in an odd way, by tacking targets2 onto a special
tail section in the dependency list of everything in targets1.
It seems to be OK to create circular dependencies this way; in fact, it
appears to be the "right thing to do" when a single build action
produces both targets1 and targets2.INCLUDES
規則的描述是不正確的:INCLUDES targets1 : targets2 會導致依賴於 targets1 某一成員的任何東西依賴於 targets2 的所有成員。它是以一種奇特的方式來實現的,通過將 targets2 作為一個特殊尾節增加到 targets1 各個成員的依賴關係列表中。以這種方法創建循環依賴關係似乎是OK的;事實上,當單個構建動作同時生成 targets1 和 targets2 時,它看來是"做了正確的事情"。
actions declared
with the same name as the rule, the actions are added to the updating actions
for the target identified by the rule's first argument. It is actually
possible to invoke an undeclared rule if corresponding actions are declared:
the rule is treated as empty.actions,則該動作會被增加到由規則的第一個參數所標識的目標的更新動作中。如果相應的動作被聲明,實際上就有可能會調用一個未聲明的規則:該規則被視為空規則。
NOTFILE targets) are associated
with paths in the file system through a process called binding. Binding
is a process of searching for a file with the same name as the target (sans
grist), based on the settings of the target-specific SEARCH
and LOCATE variables.NOTFILE 目標以外)被通過一個稱為綁定的過程關聯至文件系統中的路徑。綁定是查找一個與目標具有相同名字的文件(無 grist)的過程,它基於特定目標的 SEARCH 和 LOCATE 變量。
on a target. Target-specific variable values can usually
not be read, and take effect only in the following contexts:on
the target named by the first argument (the target being updated).
Because Jam builds its entire dependency tree before executing actions,
Jam rules make target-specific variable settings as a way of supplying
parameters to the corresponding actions.SEARCH and LOCATE
variables, as described here.SEARCH 和 LOCATE
變量所控制的,如上所述。
on the target named by the rule's
first argument (the source file being scanned).bind
action modifier.bind
動作修改符可選擇地替換為它們的綁定值。
test.exe" may
be used by targets in separate subprojects, or for the debug and release
variants of the "same" abstract target. Each distinct target
bound to a file called "test.exe" has its own unique grist prefix.
The Boost build system also takes full advantage of Jam's ability to divide
strings on grist boundaries, sometimes concatenating multiple gristed elements
at the beginning of a string. Grist is used instead of identifying targets
with absolute paths for two reasons:test.exe"
可能在單獨的子項目中被用作目標,或者用作"同一個"抽像目標的調試版和發佈版。每一個綁定到 "test.exe" 文件的特定目標都有唯一的
grist 前綴以。Boost build 系統還充分利用了 Jam 的功能,將字符串按 grist 邊界劃分,有時則將多個 gristed
元素連接在字符串的開始。Grist 被用於替代絕對路徑標識目標有兩個原因:
MESSAGE ?\= starting jam... ; if #(MESSAGE) { ECHO The message is: #(MESSAGE) ; }If the user wants a specific message, he invokes jam with
"-sMESSAGE=message
text". If he wants no message, he invokes jam with -sMESSAGE=
and nothing at all is printed."-sMESSAGE=message
text" 來調用 jam。如果想不要信息,則以 -sMESSAGE=
調用 jam,這樣就沒有東西打印出來了。
-xvalue, 和
-x value.