LANGUAGE
@@ -239,238 +273,574 @@ jam [ -a ] [ -n ] [ -v ] [ -q ]
Overview
- Jam has an interpreted, procedural language. Statements
- in jam are rule (procedure) definitions, rule invocations,
- flow-of-control structures, variable assignments, and sundry
- language support.
+ Jam has a interpreted, procedural language with a few
+ select features to effect program construction. Statements in
+ jam are rule (procedure) definitions, rule invocations,
+ updating action definitions, flow-of-control structures, variable
+ assignments, and sundry language support.
Lexical Features
Jam treats its input files as whitespace-separated tokens,
- with two exceptions: double quotes (") can enclose whitespace
- to embed it into a token, and everything between the matching
- curly braces ({}) in the definition of a rule action is treated
+ with two exceptions: double quotes (") can enclose whitespace to
+ embed it into a token, and everything between the matching curly
+ braces ({}) in the definition of a updating actions is treated
as a single string. A backslash (\) can escape a double quote,
or any single whitespace character.
Jam requires whitespace (blanks, tabs, or newlines) to
- surround all tokens, including the colon (:) and semicolon
- (;) tokens.
+ surround all tokens, including the colon (:) and semicolon
+ (;) tokens.
- Jam keywords (an mentioned in this document) are reserved
+ Jam keywords (as mentioned in this document) are reserved
and generally must be quoted with double quotes (") to be used
as arbitrary tokens, such as variable or target names.
-
Targets
+
Datatype
- The essential jam data entity is a target. Built targets
- are files to be updated. Source targets are the files used in
- updating built targets. Built targets and source targets are
- collectively referred to as file targets, and frequently built
- targets are source targets for other built targets. Pseudotargets
- are symbols which represent dependencies on other targets, but
- which are not themselves associated with any real file.
-
-
-
- A file target's identifier is generally the file's name, which
- can be absolutely rooted, relative to the directory of jam's
- invocation, or simply local (no directory). Most often it is
- the last case, and the actual file path is bound using the
- $(SEARCH) and $(LOCATE) special variables. See
- SEARCH and LOCATE Variables below. A local filename is
- optionally qualified with grist, a string value used to assure
- uniqueness. A file target with an identifier of the form
- file(member) is a library member (usually an ar(1) archive
- on UNIX).
+ Jam's only data type is a one-dimensional list of arbitrary
+ strings. They arise as literal (whitespace-separated) tokens in
+ the Jambase or included files, as the result of variable expansion
+ of those tokens, or as the return value from a rule invocation.
Rules
- The basic jam language entity is called a rule. A rule
- is defined in two parts: the procedure and the actions. The
- procedure is a body of jam statements to be run when the
- rule is invoked; the actions are the OS shell commands to execute
- when updating the built targets of the rule.
+ The basic jam language entity is called a rule. A rule
+ is simply a procedure definition, with a body of jam
+ statements to be run when the rule is invoked. The syntax of
+ rule invocation make it possible to write Jamfiles that look
+ a bit like Makefiles.
- Rules can return values, which can be expanded into a list with
- "[ rule args ... ]". A rule's value is the value
- of its last statement, though only the following statements
- have values: 'if' (value of the leg chosen), 'switch' (value of the case
- chosen), set (value of the resulting variable), and 'return' (value
- of its arguments). Note that 'return' doesn't actually cause a
- return, i.e., is a no-op unless it is the last statement
- of the last block executed within rule body.
+ Rules take up to 9 arguments ($(1) through $(9), each a list)
+ and can have a return value (a single list). A rule's return
+ value can be expanded in a list by enclosing the rule invocation
+ with [ and ].
+
+
Updating Actions
- The jam statements for defining and invoking rules are
- as follows:
+ A rule may have updating actions associated with it, in which
+ case arguments $(1) and $(2) are treated as built targets and
+ sources, respectively. Updating actions are the OS shell commands
+ to execute when updating the built targets of the rule.
+
+
+
+ When an rule with updating actions is invoked, those actions are
+ added to those associated with its built targets ($(1)) before
+ the rule's procedure is run. Later, to build the targets in the
+ updating phase, the actions are passed to the OS command shell,
+ with $(1) and $(2) replaced by bound versions of the target names.
+ See Binding above.
+
+
+
Statements
+
+
+
+ Jam's langauge has the following statements:
-
- rule rulename { statements }
+
+ rulename field1 : field2 : ...
+ : fieldN ;
+
- - Define a rule's procedure, replacing any previous
- definition.
+
- Invoke a rule. A rule is invoked with values in
+ field1 through fieldN (9 max). They may be
+ referenced in the procedure's statements as $(1)
+ through $(<9>N). $(<) and $(>) are synonymous
+ with $(1) and $(2).
+
+
+ rulename undergoes variable
+ expansion. If the resulting list is more than one value,
+ each rule is invoked with the same arguments, and the result
+ of the invocation is the concatenation of all the results.
-
- actions [ modifiers ] rulename { commands }
+
+ actions [ modifiers ] rulename { commands }
+
- - Define a rule's updating actions, replacing any
- previous definition.
+
- Define a rule's updating actions, replacing any previous
+ definition. The first two arguments may be referenced in
+ the action's commands as $(1) and $(2) or $(<)
+ and $(>).
+
+
+
+ The following action modifiers are understood:
+
+
+
+ actions bind vars |
+ $(vars) will be replaced with bound values. |
+
+
+ actions existing |
+ $(>) includes only source targets currently existing. |
+
+
+ actions ignore |
+ The return status of the commands is ignored. |
+
+
+ actions piecemeal |
+ commands are repeatedly invoked with a subset
+ of $(>) small enough to fit in the command buffer on this
+ OS. |
+
+
+ actions quietly |
+ The action is not echoed to the standard output. |
+
+
+ actions together |
+ The $(>) from multiple invocations of the same action
+ on the same built target are glommed together. |
+
+
+ actions updated |
+ $(>) includes only source targets themselves marked
+ for updating. |
+
+
+
+
+
+
+ break
+
+
+
+ - Breaks out of the closest enclosing for
+ or while loop.
+
+
+
+ continue
+
+
+
+ - Jumps to the end of the closest enclosing for
+ or while loop.
+
+
+
+ for var in list { statements }
+
+
+
+ - Executes statements for each element in
+ list, setting the variable var to the element
+ value.
+
+
+
+
+
+ if cond { statements } [ else statement ]
+
+
+
+ - Does the obvious; the else clause is optional.
+ cond is built of:
+
+
+
+ a |
+ true if any a element is a non-zero-length
+ string |
+ a = b |
+ list a matches list b
+ string-for-string |
+ a != b |
+ list a does not match list b |
+ a < b |
+ a[i] string is less than b[i]
+ string, where i is first mismatched element
+ in lists a and b |
+ a <= b |
+ every a string is less than or equal to
+ its b counterpart |
+ a > b |
+ a[i] string is greater than b[i]
+ string, where i is first mismatched element |
+ a >= b |
+ every a string is greater than or equal to
+ its b counterpart |
+ a in b |
+ true if all elements of a can be found
+ in b, or if a has no elements |
+ ! cond |
+ condition not true |
+ cond && cond |
+ conjunction |
+ cond || cond |
+ disjunction |
+ ( cond ) |
+ precedence grouping |
+
+
+
+ -
+
+ include file ;
+
+
+
+ - Causes jam to read the named file.
+ The file is bound like a regular target (see Binding above) but unlike a regular
+ target the include file cannot be built. Marking an include
+ file target with the NOCARE rule makes it optional:
+ if it is missing, it causes no error.
+
+
+
+ The include file is inserted into the input stream during
+ the parsing phase. The primary input file and all the included
+ file(s) are treated as a single file; that is, jam
+ infers no scope boundaries from included files.
+
+ -
+
+ local vars [ = values ] ;
+
+
+
+ - Creates new vars inside to the enclosing {}
+ block, obscuring any previous values they might have. The
+ previous values for vars are restored when the current
+ block ends. Any rule called or file included will see the
+ local and not the previous value (this is sometimes called
+ Dynamic Scoping). The local statement may appear anywhere,
+ even outside of a block (in which case the previous value
+ is restored when the input ends). The vars are
+ initialized to values if present, or left uninitialized
+ otherwise.
-
- rulename field1 : field2 : ...
- : fieldN ;
+
+ on target statement ;
+
- - Invoke a rule.
+
- Run statement under the influence of
+ target's target-specific variables. These variables
+ become local copies during statement's run, but they
+ may be updated as target-specific variables using the usual
+ "variable on targets =" syntax.
+
+
+
-
+
+ return values ;
+
+
+
+ - Within a rule body, the return statement sets the return
+ value for an invocation of the rule and terminates the rule's
+ execution.
-
- on target rulename field1 : field2 : ...
- : fieldN ;
-
-
- - Invoke a rule under the influence of target's specific
- variables..
-
-
-
- [ rulename field1 : field2 : ...
- : fieldN ]
- [ on target rulename field1 : field2 : ...
- : fieldN ]
+
+ rule rulename [ : vars ] { statements }
- - Used as an argument, expands to the return value of the rule invoked.
+
- Define a rule's procedure, replacing any previous
+ definition. If vars are provided, they are assigned
+ the values of the parameters ($(1) to $(9)) when statements
+ are executed, as with the local statement.
+
+
-
+
+
+ switch value
+
+ {
+ case pattern1 : statements ;
+ case pattern2 : statements ;
+ ...
+ }
+
+
+
+ - The switch statement executes zero or one of the
+ enclosed statements, depending on which, if any, is
+ the first case whose pattern matches value.
+ The pattern values are not variable-expanded. The
+ pattern values may include the following wildcards:
+
+
+
+ ? |
+ match any single character |
+ * |
+ match zero or more characters |
+ [chars] |
+ match any single character in chars |
+ [^chars] |
+ match any single character not in chars |
+ \x |
+ match x (escapes the other wildcards) |
+
+
+
+ -
+
+ while cond { statements }
+
+
+
+ - Repeatedly execute statements while cond
+ remains true upon entry. (See the description of cond
+ expression syntax under if, above).
+
|
+
+
+
Variables
+
+
+
+ Jam variables are lists of zero or more elements, with
+ each element being a string value. An undefined variable is
+ indistinguishable from a variable with an empty list, however,
+ a defined variable may have one more elements which are null
+ strings. All variables are referenced as $(variable).
+
+
+
+ Variables are either global or target-specific. In the latter
+ case, the variable takes on the given value only during the
+ target's binding, header file scanning, and updating; and during
+ the "on target statement" statement.
+
+
+
+ A variable is defined with:
+
+
+
+
+ variable = elements ;
+
+ variable += elements ;
+
+ variable ?= elements ;
+
+ variable on targets = elements ;
+
+ variable on targets += elements ;
+
+ variable on targets ?= elements ;
|
- A rule is invoked with values in field1 through
- fieldN. They may be referenced in the procedure's
- statements as $(1) through $(N) (9 max), and the
- first two only may be referenced in the action's commands
- as $(1) and $(2). $(<) and $(>) are synonymous with $(1)
- and $(2).
+ The first three forms set variable globally. The last
+ three forms set a target-specific variable. The = operator
+ replaces any previous elements of variable with
+ elements; the += operation adds elements to
+ variable's list of elements; the ?= operator sets
+ variable only if it was previously unset. The last form
+ "variable on targets ?= elements" checks
+ to see if the target-specific, not the global, variable is set.
+ (The ?= operator also has an old form "default =".)
- Rules fall into two categories: updating rules (with actions),
- and pure procedure rules (without actions). Updating rules
- treat arguments $(1) and $(2) as built targets and sources,
- respectively, while pure procedure rules can take arbitrary
- arguments.
+ Variables referenced in updating commands will be replaced with
+ their values; target-specific values take precedence over global
+ values. Variables passed as arguments ($(1) and $(2)) to actions
+ are replaced with their bound values; the "bind" modifier can
+ be used on actions to cause other variables to be replaced with
+ bound values. See Action Modifiers
+ above.
- When an updating rule is invoked, its updating actions are added
- to those associated with its built targets ($(1)) before the
- rule's procedure is run. Later, to build the targets in the
- updating phase, commands are passed to the OS command
- shell, with $(1) and $(2) replaced by bound versions of the
- target names. See Binding above.
+ Jam variables are not re-exported to the environment of
+ the shell that executes the updating actions, but the updating
+ actions can reference jam variables with $(variable).
-
-
- Rule invokation may be indirected through a variable:
-
-
-
- -
- $(var) field1 : field2 : ...
- : fieldN ;
-
-
- -
- on target $(var) field1 : field2 : ...
- : fieldN ;
-
-
- -
- [ $(var) field1 : field2 : ...
-
- : fieldN ]
- [ on target $(var) field1 : field2 : ...
- : fieldN ]
-
-
-
- |
-
- The variable's value names the rule (or rules) to be invoked.
- A rule is invoked for each element in the list of
- $(var)'s values. The fields
- field1 : field2 : ... are passed as
- arguments for each invokation. For the [ ... ] forms,
- the return value is the concatenation of the return values for
- all of the invokations.
-
-
-
Action Modifiers
-
+
+
Variable Expansion
+
- The following action modifiers are understood:
+ During parsing, jam performs variable expansion on each
+ token that is not a keyword or rule name. Such tokens with
+ embedded variable references are replaced with zero or more
+ tokens. Variable references are of the form $(v) or
+ $(vm), where v is the variable name, and m
+ are optional modifiers.
-
+
- actions bind vars
- - $(vars) will be replaced with bound values.
+ Variable expansion in a rule's actions is similar to variable
+ expansion in statements, except that the action string is
+ tokenized at whitespace regardless of quoting.
-
actions existing
- - $(>) includes only source targets currently existing.
+
- actions ignore
- - The return status of the commands is ignored.
+ The result of a token after variable expansion is the
+ product of the components of the token, where each
+ component is a literal substring or a list substituting a variable
+ reference. For example:
-
actions piecemeal
- - commands are repeatedly invoked with a subset
- of $(>) small enough to fit in the command buffer on this
- OS.
+
- actions quietly
- - The action is not echoed to the standard output.
+
$(X) -> a b c
+ t$(X) -> ta tb tc
+ $(X)z -> az bz cz
+ $(X)-$(X) -> a-a a-b a-c b-a b-b b-c c-a c-b c-c
- actions together
- - The $(>) from multiple invocations of the same action
- on the same built target are glommed together.
+
|
- actions updated
- - $(>) includes only source targets themselves marked
- for updating.
+
- |
+ The variable name and modifiers can themselves contain
+ a variable reference, and this partakes of the product
+ as well:
+
+
+
+ $(X) -> a b c
+ $(Y) -> 1 2
+ $(Z) -> X Y
+ $($(Z)) -> a b c 1 2
+
+ |
+
+
+
+ Because of this product expansion, if any variable reference in
+ a token is undefined, the result of the expansion is an empty
+ list. If any variable element is a null string, the result
+ propagates the non-null elements:
+
+
+
+ $(X) -> a ""
+ $(Y) -> "" 1
+ $(Z) ->
+ *$(X)$(Y)* -> *a* *a1* ** *1*
+ *$(X)$(Z)* ->
+
+ |
+
+
+
+ A variable element's string value can be parsed into grist and
+ filename-related components. Modifiers to a variable are used
+ to select elements, select components, and replace components.
+ The modifiers are:
+
+
+
+ [n]
+ | Select element number n (starting at 1). If
+ the variable contains fewer than n elements,
+ the result is a zero-element list.
+
+ |
[n-m]
+ | Select elements number n through m.
+
+ |
[n-]
+ | Select elements number n through the last.
+
+ |
:B
+ | Select filename base.
+
+ |
:S
+ | Select (last) filename suffix.
+
+ |
:M
+ | Select archive member name.
+
+ |
:D
+ | Select directory path.
+
+ |
:P
+ | Select parent directory.
+
+ |
:G
+ | Select grist.
+
+ |
:U
+ | Replace lowercase characters with uppercase.
+
+ |
:L
+ | Replace uppercase characters with lowercase.
+
+ |
:chars
+ | Select the components listed in chars.
+
+ |
:G=grist
+ | Replace grist with grist.
+
+ |
:D=path
+ | Replace directory with path.
+
+ |
:B=base
+ | Replace the base part of file name with base.
+
+ |
:S=suf
+ | Replace the suffix of file name with suf.
+
+ |
:M=mem
+ | Replace the archive member name with mem.
+
+ |
:R=root
+ | Prepend root to the whole file name, if not
+ already rooted.
+
+ |
:E=value
+ | Use value instead if the variable is unset.
+
+ |
:J=joinval
+ | Concatentate list elements into single
+ element, separated by joinval.
+
+ |
+
+
+
+ On VMS, $(var:P) is the parent directory of $(var:D); on Unix
+ and NT, $(var:P) and $(var:D) are the same.
Built-in Rules
- Jam has eleven built-in rules, all of which are pure
+ Jam has twelve built-in rules, all of which are pure
procedure rules without updating actions. They are in
three groups: the first builds the dependency graph;
the second modifies it; and the third are just utility
rules.
-
-
Dependency Building
@@ -597,441 +967,50 @@ jam [ -a ] [ -n ] [ -v ] [ -q ]
Utility Rules
-
-
- The two rules ECHO and EXIT are utility rules, used only in
- jam's parsing phase.
+ The remaining rules are utility rules.
- ECHO args ;
+ ECHO args ;
+ Echo args ;
+ echo args ;
- Blurts out the message args to stdout.
- EXIT args ;
+ EXIT args ;
+ Exit args ;
+ exit args ;
- Blurts out the message args to stdout and then exits
with a failure status.
-
-
- "Echo", "echo", "Exit", and "exit" are accepted as aliases for ECHO
- and EXIT, since it is hard to tell that these are built-in
- rules and not part of the language, like "include".
-
- |
-
-
-
- The GLOB rule does filename globbing.
-
-
-
- GLOB directories : patterns
+ GLOB directories : patterns ;
- - Using the same wildcards as for the patterns in the switch statement). It is invoked by being
- used as an argument to a rule invocation inside of `[ ]`. For
- example: "FILES = [ GLOB dir1 dir2 : *.c *.h ]" sets
- A to the list of C source and header files in dir1 or dir2.
- The resulting filenames are the full pathnames, including the
- directory, but the pattern is applied only to the file name
- without the directory.
-
-
|
-
-
-
- The MATCH rule does pattern matching.
-
-
+ - Scans directories for files matching patterns,
+ returning the list of matching files (with directory prepended).
+ patterns uses the same syntax as in the switch
+ statement. Only useful within the [ ] construct, to
+ change the result into a list.
- MATCH regexps : list
+ MATCH regexps : list ;
- Matches the egrep(1) style regular expressions
regexps against the strings in list. The result
is the concatenation of matching () subexpressions for
- each string in list, and for each regular expression in
+ each string in list, and for each regular expression in
regexps. Only useful within the [ ] construct,
to change the result into a list.
|
--
Flow-of-Control -
-
-
-
- Jam has several simple flow-of-control statements:
-
-
-
-
-
- for var in list { statements }
-
-
-
- - Executes statements for each element in
- list, setting the variable var to the element
- value.
-
-
-
-
-
- if cond { statements }
- [ else statements ]
-
-
-
- - Does the obvious; the else clause is optional.
- cond is built of:
-
-
-
- a |
- true if any a element is a non-zero-length
- string |
- a = b |
- list a matches list b
- string-for-string |
- a != b |
- list a does not match list b |
- a < b |
- a[i] string is less than b[i]
- string, where i is first mismatched element
- in lists a and b |
- a <= b |
- every a string is less than or equal to
- its b counterpart |
- a > b |
- a[i] string is greater than b[i]
- string, where i is first mismatched element |
- a >= b |
- every a string is greater than or equal to
- its b counterpart |
- a in b |
- true if all elements of a can be found
- in b, or if a has no elements |
- ! cond |
- condition not true |
- cond && cond |
- conjunction |
- cond || cond |
- disjunction |
- ( cond ) |
- precedence grouping |
-
-
-
- -
-
- include file ;
-
-
-
- - Causes jam to read the named file.
- The file is bound like a regular target (see Binding above) but unlike a regular
- target the include file cannot be built.
-
-
-
- The include file is inserted into the input stream during
- the parsing phase. The primary input file and all the included
- file(s) are treated as a single file; that is, jam
- infers no scope boundaries from included files.
-
- -
-
- local vars [ = values ] ;
-
-
-
- - Creates new vars inside to the enclosing {}
- block, obscuring any previous values they might have. The
- previous values for vars are restored when the current
- block ends. Any rule called or file included will see the
- local and not the previous value (this is sometimes called
- Dynamic Scoping). The local statement may appear anywhere,
- even outside of a block (in which case the previous value
- is restored when the input ends). The vars are
- initialized to values if present, or left uninitialized
- otherwise.
-
-
-
-
- return values ;
-
-
-
- - Within a rule body, the return statement sets the return
- value for an invocation of the rule. It does not cause the
- rule to return; a rule's value is actually the value of the
- last statement executed, so a return should be the
- last statement executed before the rule "naturally" returns.
-
-
-
-
-
- switch value
-
- {
- case pattern1 : statements ;
- case pattern2 : statements ;
- ...
- }
-
-
-
- - The switch statement executes zero or one of the
- enclosed statements, depending on which, if any, is
- the first case whose pattern matches value.
- The pattern values are not variable-expanded. The
- pattern values may include the following wildcards:
-
-
-
- ? |
- match any single character |
- * |
- match zero or more characters |
- [chars] |
- match any single character in chars |
- [^chars] |
- match any single character not in chars |
- \x |
- match x (escapes the other wildcards) |
-
-
-
- -
-
- while cond { statements }
-
-
-
- - Repeatedly execute statements while cond
- remains true upon entry. (See the description of cond
- expression syntax under if, above).
-
|
-
- -
Variables -
-
-
-
- Jam variables are lists of zero or more elements, with
- each element being a string value. An undefined variable is
- indistinguishable from a variable with an empty list, however,
- a defined variable may have one more elements which are null
- strings. All variables are referenced as $(variable).
-
-
-
- Variables are either global or target-specific. In the latter
- case, the variable takes on the given value only during the
- updating of the specific target.
-
-
-
- A variable is defined with:
-
-
-
-
- variable = elements ;
-
- variable += elements ;
-
- variable on targets = elements ;
-
- variable on targets += elements ;
-
- variable default = elements ;
-
- variable ?= elements ;
-
- |
-
-
-
- The first two forms set variable globally. The third
- and forth forms set a target-specific variable. The = operator
- replaces any previous elements of variable with
- elements; the += operation adds elements to
- variable's list of elements. The final two forms are
- synonymous: they set variable globally, but only if it
- was previously unset.
-
-
-
- Variables referenced in updating commands will be replaced with
- their values; target-specific values take precedence over global
- values. Variables passed as arguments ($(1) and $(2)) to actions
- are replaced with their bound values; the "bind" modifier can
- be used on actions to cause other variables to be replaced with
- bound values. See Action Modifiers
- above.
-
-
-
- Jam variables are not re-exported to the environment of
- the shell that executes the updating actions, but the updating
- actions can reference jam variables with $(variable).
-
- Variable Expansion
-
-
-
- During parsing, jam performs variable expansion on each
- token that is not a keyword or rule name. Such tokens with
- embedded variable references are replaced with zero or more
- tokens. Variable references are of the form $(v) or
- $(vm), where v is the variable name, and m
- are optional modifiers.
-
-
-
- Variable expansion in a rule's actions is similar to variable
- expansion in statements, except that the action string is
- tokenized at whitespace regardless of quoting.
-
-
-
- The result of a token after variable expansion is the
- product of the components of the token, where each
- component is a literal substring or a list substituting a variable
- reference. For example:
-
-
-
- $(X) -> a b c
- t$(X) -> ta tb tc
- $(X)z -> az bz cz
- $(X)-$(X) -> a-a a-b a-c b-a b-b b-c c-a c-b c-c
-
- |
-
-
-
- The variable name and modifiers can themselves contain
- a variable reference, and this partakes of the product
- as well:
-
-
-
- $(X) -> a b c
- $(Y) -> 1 2
- $(Z) -> X Y
- $($(Z)) -> a b c 1 2
-
- |
-
-
-
- Because of this product expansion, if any variable reference in
- a token is undefined, the result of the expansion is an empty
- list. If any variable element is a null string, the result
- propagates the non-null elements:
-
-
-
- $(X) -> a ""
- $(Y) -> "" 1
- $(Z) ->
- *$(X)$(Y)* -> *a* *a1* ** *1*
- *$(X)$(Z)* ->
-
- |
-
-
-
- A variable element's string value can be parsed into grist and
- filename-related components. Modifiers to a variable are used
- to select elements, select components, and replace components.
- The modifiers are:
-
-
-
- [n]
- | Select element number n (starting at 1). If
- the variable contains fewer than n elements,
- the result is a zero-element list.
-
- | [n-m]
- | Select elements number n through m.
-
- | [n-]
- | Select elements number n through the last.
-
- | :B
- | Select filename base.
-
- | :S
- | Select (last) filename suffix.
-
- | :M
- | Select archive member name.
-
- | :D
- | Select directory path.
-
- | :P
- | Select parent directory.
-
- | :G
- | Select grist.
-
- | :U
- | Replace lowercase characters with uppercase.
-
- | :L
- | Replace uppercase characters with lowercase.
-
- | :chars
- | Select the components listed in chars.
-
- | :G=grist
- | Replace grist with grist.
-
- | :D=path
- | Replace directory with path.
-
- | :B=base
- | Replace the base part of file name with base.
-
- | :S=suf
- | Replace the suffix of file name with suf.
-
- | :M=mem
- | Replace the archive member name with mem.
-
- | :R=root
- | Prepend root to the whole file name, if not
- already rooted.
-
- | :E=value
- | Assign value to the variable if it is unset.
-
- | :J=joinval
- | Concatentate list elements into single
- element, separated by joinval.
-
- |
-
-
-
- On VMS, $(var:P) is the parent directory of $(var:D); on Unix
- and NT, $(var:P) and $(var:D) are the same.
-
-
Built-in Variables -
@@ -1096,8 +1075,8 @@ jam [ -a ] [ -n ] [ -v ] [ -q ]
uses $(HDRPATTERN) as the pattern for $(HDRSCAN). $(HDRRULE)
is the name of a rule to invoke with the results of the scan:
the scanned file is the target, the found files are the sources.
- This is the only place where jam invokes a rule through
- a variable setting.
+ $(HDRRULE) is run under the influence of the scanned file's
+ target-specific variables.
@@ -1156,7 +1135,7 @@ jam [ -a ] [ -n ] [ -v ] [ -q ]
| JAMDATE | Time and date at jam start-up.
| | JAMUNAME | Ouput of uname(1) command (Unix only)
- | | JAMVERSION | jam version, currently "2.3"
+ | | JAMVERSION | jam version, as reported by jam -v.
| |
@@ -1341,9 +1320,9 @@ jam [ -a ] [ -n ] [ -v ] [ -q ]
Comments to info@perforce.com
- Last updated: April 1, 2002
+ Last updated: May, 2002
- $Id: //public/jam/src/Jam.html#11 $
+ $Id: //public/jam/src/Jam.html#19 $
diff --git a/src/tools/jam/Jambase.html b/src/tools/jam/Jambase.html
index d1cb261365..6ef85e2481 100644
--- a/src/tools/jam/Jambase.html
+++ b/src/tools/jam/Jambase.html
@@ -5,7 +5,7 @@ Jambase Reference
-Jam/MR
+Jam
- Jambase is a base set of Jam/MR rules which
+ Jambase is a base set of Jam rules which
provide roughly make(1)-like functionality for
- jam, the Jam/MR executable program.
+ jam, the Jam executable program.
This document, which started out as the Jambase(5) man page,
is a reference guide to the
rules,
@@ -29,10 +29,10 @@ Jambase Reference
Using Jamfiles and Jambase
- The Jam/MR Executable Program
+ The Jam Executable Program
-Jam/MR documentation and source are available from the
+Jam documentation and source are available from the
Perforce Public Depot.
For detailed information about any of the rules summarized below,
see the
@@ -267,19 +267,19 @@ Jambase Rules
Makes target a symbolic link to source, if it isn't one
already. (Unix only.)
- SubDir VAR d1 ... dn ;
+ SubDir TOP d1 ... dn ;
Sets up housekeeping for the source files located
- in $(VAR)/d1/.../dn:
+ in $(TOP)/d1/.../dn:
- - Reads in rules file associated with VAR,
+
- Reads in rules file associated with TOP,
if it hasn't already been read.
- Initializes variables for search paths,
output directories, compiler
flags, and grist, using d1 ... dn tokens.
- VAR is the name of a variable;
+ TOP is the name of a variable;
d1 thru dn are elements
of a directory path.
@@ -724,8 +724,16 @@ Jambase Variables
MSVCNT
- Selects Microsoft Visual C NT compile & link
- actions on NT.
+ Selects Microsoft Visual C NT 5.0 and earlier compile
+ & link actions on NT.
+
+
+ MSVCDIR
+
+ Selects Microsoft Visual C NT 6.0 and later compile
+ & link actions on NT. These are identical to versions
+ 5.0 and earlier -- it just seems Microsoft changed the
+ name of the variable.
@@ -926,6 +934,6 @@ Jambase Variables
Last updated: Dec 31, 2000
- $Id: //public/jam/src/Jambase.html#7 $
+ $Id: //public/jam/src/Jambase.html#10 $