[pkg-boost-commits] r14010 - in boost-jam/branches/upstream/current: . debian images jam modules

Domenico Andreoli cavok at alioth.debian.org
Tue Nov 7 15:20:17 CET 2006


Author: cavok
Date: 2006-11-07 15:20:16 +0100 (Tue, 07 Nov 2006)
New Revision: 14010

Added:
   boost-jam/branches/upstream/current/boost.png
   boost-jam/branches/upstream/current/boostbook.css
   boost-jam/branches/upstream/current/debug.c
   boost-jam/branches/upstream/current/debug.h
   boost-jam/branches/upstream/current/images/
   boost-jam/branches/upstream/current/images/blank.png
   boost-jam/branches/upstream/current/images/caution.png
   boost-jam/branches/upstream/current/images/draft.png
   boost-jam/branches/upstream/current/images/home.png
   boost-jam/branches/upstream/current/images/important.png
   boost-jam/branches/upstream/current/images/next.png
   boost-jam/branches/upstream/current/images/next_disabled.png
   boost-jam/branches/upstream/current/images/note.png
   boost-jam/branches/upstream/current/images/prev.png
   boost-jam/branches/upstream/current/images/prev_disabled.png
   boost-jam/branches/upstream/current/images/tip.png
   boost-jam/branches/upstream/current/images/toc-blank.png
   boost-jam/branches/upstream/current/images/toc-minus.png
   boost-jam/branches/upstream/current/images/toc-plus.png
   boost-jam/branches/upstream/current/images/up.png
   boost-jam/branches/upstream/current/images/up_disabled.png
   boost-jam/branches/upstream/current/images/warning.png
   boost-jam/branches/upstream/current/jam/
   boost-jam/branches/upstream/current/jam/building.html
   boost-jam/branches/upstream/current/jam/language.html
   boost-jam/branches/upstream/current/jam/miscellaneous.html
   boost-jam/branches/upstream/current/jam/usage.html
Removed:
   boost-jam/branches/upstream/current/Jam.html
   boost-jam/branches/upstream/current/Porting
Modified:
   boost-jam/branches/upstream/current/Jambase
   boost-jam/branches/upstream/current/boost-jam.spec
   boost-jam/branches/upstream/current/build.bat
   boost-jam/branches/upstream/current/build.jam
   boost-jam/branches/upstream/current/build.sh
   boost-jam/branches/upstream/current/builtins.c
   boost-jam/branches/upstream/current/builtins.h
   boost-jam/branches/upstream/current/command.c
   boost-jam/branches/upstream/current/compile.c
   boost-jam/branches/upstream/current/compile.h
   boost-jam/branches/upstream/current/debian/changelog
   boost-jam/branches/upstream/current/debian/copyright
   boost-jam/branches/upstream/current/execnt.c
   boost-jam/branches/upstream/current/execunix.c
   boost-jam/branches/upstream/current/expand.c
   boost-jam/branches/upstream/current/filent.c
   boost-jam/branches/upstream/current/filesys.c
   boost-jam/branches/upstream/current/filesys.h
   boost-jam/branches/upstream/current/fileunix.c
   boost-jam/branches/upstream/current/hash.c
   boost-jam/branches/upstream/current/hash.h
   boost-jam/branches/upstream/current/index.html
   boost-jam/branches/upstream/current/jam.c
   boost-jam/branches/upstream/current/jam.h
   boost-jam/branches/upstream/current/jambase.c
   boost-jam/branches/upstream/current/lists.c
   boost-jam/branches/upstream/current/make1.c
   boost-jam/branches/upstream/current/modules.c
   boost-jam/branches/upstream/current/modules/order.c
   boost-jam/branches/upstream/current/modules/path.c
   boost-jam/branches/upstream/current/modules/property-set.c
   boost-jam/branches/upstream/current/modules/regex.c
   boost-jam/branches/upstream/current/modules/sequence.c
   boost-jam/branches/upstream/current/modules/set.c
   boost-jam/branches/upstream/current/native.c
   boost-jam/branches/upstream/current/native.h
   boost-jam/branches/upstream/current/newstr.c
   boost-jam/branches/upstream/current/parse.c
   boost-jam/branches/upstream/current/patchlevel.h
   boost-jam/branches/upstream/current/pathsys.h
   boost-jam/branches/upstream/current/pathunix.c
   boost-jam/branches/upstream/current/pwd.c
   boost-jam/branches/upstream/current/regexp.c
   boost-jam/branches/upstream/current/rules.c
   boost-jam/branches/upstream/current/scan.c
   boost-jam/branches/upstream/current/strings.c
   boost-jam/branches/upstream/current/timestamp.c
   boost-jam/branches/upstream/current/variable.c
   boost-jam/branches/upstream/current/variable.h
   boost-jam/branches/upstream/current/w32_getreg.c
Log:
Load /tmp/tmp.PHVfZ14706/boost-jam-3.1.13 into
boost-jam/branches/upstream/current.


Deleted: boost-jam/branches/upstream/current/Jam.html
===================================================================
--- boost-jam/branches/upstream/current/Jam.html	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/Jam.html	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,1356 +0,0 @@
-<HTML>
-
-<TITLE> Jam/MR - Make(1) Redux </TITLE>
-
-<BODY>
-
-<CENTER>
-
-<H1> Jam/MR - Make(1) Redux </H1>
-
-<P> The <a href=http://www.perforce.com/jam/jam.html>Jam/MR</a> Executable
-
-</CENTER>
-
-<DL>
-
-<DT> <P> <H2> USAGE </H2> <DD>
-
-<PRE>
-jam [ -a ] [ -n ] [ -v ] [ -q ]
-    [ -d <I>debug</I> ] 
-    [ -f <I>jambase</I> ] 
-    [ -j <I>jobs</I> ] 
-    [ -o <I>actionsfile</I> ] 
-    [ -s <I>var</I>=<I>value</I> ] 
-    [ -t <I>target</I> ] 
-    [ <I>target</I> ... ]
-</PRE>
-
-<DT> <P> <H2> DESCRIPTION </H2> <DD>
-
-	<P>
-
-	<B>Jam</B> is a program construction tool, like <B>make</B>(1).
-
-	<P>
-
-	<B>Jam</B> recursively builds target files from source files,
-	using dependency information and updating actions expressed in
-	the Jambase file, which is written in <B>jam</B>'s own interpreted
-	language.  The default Jambase is compiled into <B>jam</B> and
-	provides a boilerplate for common use, relying on a user-provide
-	file "Jamfile" to enumerate actual targets and sources.
-
-	<P>
-
-	The Jambase is described in the <a href="Jambase.html">Jambase
-	Reference</a> and the document <a href="Jamfile.html">Using
-	Jamfiles and Jambase</A>.
-
-<DT> <P> <H2> OPTIONS </H2> <DD>
-
-	<P>
-
-	If <I>target</I> is provided on the command line, <B>jam</B>
-	builds <I>target;</I> otherwise <B>jam</B> builds the target
-	'all'.
-
-	<P>
-
-	<B>Jam</b> may be invoked with the following options:
-
-	<P> <TABLE WIDTH=75% ALIGN=CENTER>
-
-	    <TR><TD VALIGN=TOP><CODE> -a </CODE>
-	    <TD> Build all targets anyway, even if they are up-to-date.
-
-	    <TR><TD VALIGN=TOP><CODE> -d <I>n</I>  </CODE>
-	    <TD> Enable cummulative debugging levels from 1 to <I>n</I>.  
-	    Interesting values are:
-
-	    <DL COMPACT>
-	    <DT> 1 <DD> Show actions (the default) 
-	    <DT> 2 <DD> Show "quiet" actions and display all action text 
-	    <DT> 3 <DD> Show dependency analysis, and target/source 
-		    timestamps/paths  
-	    <DT> 4 <DD> Show shell arguments 
-	    <DT> 5 <DD> Show rule invocations and variable expansions 
-	    <DT> 6 <DD> Show directory/header file/archive scans 
-	    <DT> 7 <DD> Show variable settings 
-	    <DT> 8 <DD> Show variable fetches 
-	    <DT> 9 <DD> Show variable manipulation, scanner tokens 
-	    </DL>
-
-	    <TR><TD VALIGN=TOP><CODE> -d +<I>n</I> </CODE>
-	    <TD> Enable debugging level <I>n</I>.
-
-	    <TR><TD VALIGN=TOP><CODE> -d 0 </CODE>
-	    <TD> Turn off all debugging levels.  Only errors are not suppressed.
-
-	    <TR><TD VALIGN=TOP><CODE> -f <I>jambase</I></CODE>
-	    <TD>Read <I>jambase</I> instead of using the built-in Jambase.
-	    Only one -f flag is permitted, but the <i>jambase</i> may 
-	    explicitly include other files.
-
-	    <TR><TD VALIGN=TOP><CODE> -j <I>n</I></CODE>
-	    <TD> Run up to <I>n</I> shell commands concurrently (UNIX 
-	    and NT only).  The default is 1.
-
-	    <TR><TD VALIGN=TOP><CODE> -n</CODE>
-	    <TD> Don't actually execute the updating actions, but do
-	    everything else.  This changes the debug level default to -d2.
-
-	    <TR><TD VALIGN=TOP><CODE> -o <I>file</I></CODE>
-	    <TD> Write the updating actions to the specified file instead
-	    of running them (or outputting them, as on the Mac).
-
-	    <TR><TD VALIGN=TOP><CODE> -q </CODE>
-	    <TD> Quit quickly (as if an interrupt was received)
-	    as soon as any target fails.
-
-	    <TR><TD VALIGN=TOP><CODE> -s <I>var</I>=<I>value</I></CODE>
-	    <TD> Set the variable <I>var</I> to <I>value</I>, overriding
-	    both internal variables and variables imported from the
-	    environment.
-
-	    <TR><TD VALIGN=TOP><CODE> -t <I>target</I></CODE>
-	    <TD> Rebuild <I>target</I> and everything that depends on it, 
-	     even if it is up-to-date.
-
-	    <TR><TD VALIGN=TOP><CODE> -v</CODE>
-	    <TD> Print the version of <B>jam</B> and exit.
-
-	</TABLE>
-
-<DT> <P> <H2> OPERATION </H2> <DD>
-
-	<P>
-
-	<b>Jam</b> has four phases of operation: start-up, parsing, 
-	binding, and updating.
-
-<DT> <P> <H3> Start-up </H3> <DD>
-
-	<P>
-
-	Upon start-up, <b>jam</b> imports environment variable settings
-	into <b>jam</b> variables.  Environment variables are split at
-	blanks with each word becoming an element in the variable's list
-	of values.  Environment variables whose names end in PATH are
-	split at $(SPLITPATH) characters (e.g., ":" for Unix).
-
-	<P>
-
-	To set a variable's value on the command line, overriding the
-	variable's environment value, use the -s option.  To see variable
-	assignments made during <b>jam</b>'s execution, use the -d+7
-	option.
-
-<DT> <P> <H3> Parsing </H3> <DD>
-
-	<P>
-
-	In the parsing phase, <b>jam</b> reads and parses the Jambase
-	file, by default the built-in one.  It is written in the <b>jam</b>
-	language.  See <a href="#language"> Language</a> below.  The
-	last action of the Jambase is to read (via the "include" rule)
-	a user-provided file called "Jamfile".
-
-	<P>
-
-	Collectively, the purpose of the Jambase and the Jamfile is to
-	name built target and source files, construct the dependency
-	graph among them, and associate build actions with targets.
-	The Jambase defines boilerplate rules and variable assignments,
-	and the Jamfile uses these to specify the actual relationship
-	among the target and source files.  See the <a
-	href="Jambase.html">Jambase Reference</a> and the document <a
-	href="Jamfile.html">Using Jamfiles and Jambase</A> for information.
-
-<A NAME="binding">
-<DT> <P> <H3> Binding </H3> <DD>
-</A>
-
-	<P>
-
-	<P> <H5> Binding </H5>
-
-	After parsing, <B>jam</B> recursively descends the dependency
-	graph and binds every file target with a location in the
-	filesystem.  If <B>jam</B> detects a circular dependency in the
-	graph, it issues a warning.
-
-	<P>
-
-	File target names are given as absolute or relative path names
-	in the filesystem.  If the path name is absolute, it is bound
-	as is.  If the path name is relative, it is normally bound as
-	is, and thus relative to the current directory.  This can be
-	modified by the settings of the $(SEARCH) and $(LOCATE) variables,
-	which enable <b>jam</b> to find and build targets spread across
-	a directory tree.  See <A HREF="#search">SEARCH and LOCATE
-	Variables</a> below.
-
-	<P> <H5> Update Determination </H5>
-
-	After binding each target, <B>jam</B> determines whether the
-	target needs updating, and if so marks the target for the updating
-	phase.  A target is normally so marked if it is missing, it is
-	older than any of its sources, or any of its sources are marked
-	for updating.  This behavior can be modified by the application
-	of special built-in rules, ALWAYS, LEAVES, NOCARE, NOTFILE,
-	NOUPDATE, and TEMPORARY.  See <A HREF="#bindingmods">Modifying
-	Binding</A> below.
-
-	<P> <H5> Header File Scanning </H5>
-
-	<P>
-
-	During the binding phase, <b>jam</b> also performs header file
-	scanning, where it looks inside source files for the implicit
-	dependencies on other files caused by C's #include syntax.  This
-	is controlled by the special variables $(HDRSCAN) and $(HDRRULE).
-	The result of the scan is formed into a rule invocation, with
-	the scanned file as the target and the found included file names
-	as the sources.  Note that this is the only case where rules
-	are invoked outside the parsing phase.  See <A
-	HREF="#hdrscan">HDRSCAN and HDRRULE Variables</A> below.
-
-<DT> <P> <H3> Updating </H3> <DD>
-
-	<P>
-
-	After binding, <B>jam</B> again recursively descends the dependency
-	graph,  this time executing the update actions for each target
-	marked for update during the binding phase.  If a  target's
-	updating actions fail, then all other targets which depend on
-	that target are skipped.
-
-	<P>
-
-	The -j flag instructs <B>jam</B> to build more than one target
-	at a time.  If there are multiple actions on a single target,
-	they are run sequentially.  
-
-<A NAME="language">
-<DT> <P> <H2> LANGUAGE </H2> <DD>
-</A>
-
-<DT> <P> <H3> Overview </H3> <DD>
-
-	<B>Jam</b> has an interpreted, procedural language.  Statements
-	in <b>jam</b> are rule (procedure) definitions, rule invocations,
-	flow-of-control structures, variable assignments, and sundry
-	language support.
-
-<DT> <P> <H3> Lexical Features </H3> <DD>
-
-	<P>
-
-	<B>Jam</b> 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
-	as a single string.  A backslash (\) can escape a double quote,
-	or any single whitespace character.
-
-	<P>
-
-	<B>Jam</b> requires whitespace (blanks, tabs, or newlines) to
-	surround all tokens, <i>including the colon (:) and semicolon
-	(;) tokens</i>.
-
-	<P>
-
-	<B>Jam</b> keywords (an 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.
-
-<DT> <P> <H3> Targets </H3> <DD>
-
-	<P>
-
-	The essential <b>jam</b> 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.
-
-	<P>
-
-	A file target's identifier is generally the file's name, which
-	can be absolutely rooted, relative to the directory of <b>jam</b>'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 <A HREF="#search">
-	SEARCH and LOCATE Variables</A> 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
-	<I>file(member)</I> is a library member (usually an ar(1) archive
-	on UNIX).
-
-<DT> <P> <H3> Rules </H3> <DD>
-
-	<P>
-
-	The basic <B>jam</b> language entity is called a rule.  A rule
-	is defined in two parts: the procedure and the actions.  The
-	procedure is a body of <b>jam</b> 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.
-
-	<P>
-
-	Rules can return values, which can be expanded into a list with
-        "[ <i>rule</i> <i>args</i> ... ]". 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.
-
-	<P>
-
-	The <b>jam</b> statements for defining and invoking rules are
-	as follows:
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	    <P> <DT> <CODE>
-	    rule <I>rulename</I> { <I>statements</I> }
-	    </CODE>
-
-	    <DD> Define a rule's procedure, replacing any previous
-	    definition.
-
-	    <P> <DT> <CODE>
-	    actions [ <I>modifiers</I> ] <I>rulename</I> { <I>commands</I> }
-	    </CODE>
-
-	    <DD> Define a rule's updating actions, replacing any
-	    previous definition.
-
-	    <P> <DT> <CODE>
-	    <I>rulename field1</I> : <I>field2</I> : <I>...</I> 
-	    : <I>fieldN</I> ;
-	    </CODE>
-
-	    <DD> Invoke a rule.
-
-	    <P> <DT> <CODE>
-	    on <I>target</I> <I>rulename field1</I> : <I>field2</I> : <I>...</I> 
-	    : <I>fieldN</I> ;
-	    </CODE>
-
-	    <DD> Invoke a rule under the influence of <I>target</I>'s specific
-            variables..
-
-	    <P> <DT> <CODE>
-	    [ <I>rulename field1</I> : <I>field2</I> : <I>...</I>
-            : <I>fieldN</I> ] <br>
-	    [  on <I>target</I> <I>rulename field1</I> : <I>field2</I> : <I>...</I>
-            : <I>fieldN</I> ] <br>
-
-	    </CODE>
-
-	    <DD> Used as an argument, expands to the return value of the rule invoked.
-
-	</DL></TABLE>
-
-	<P>
-
-	A rule is invoked with values in <I>field1</I> through
-	<I>fieldN</I>.  They may be referenced in the procedure's
-	<I>statements</I> as $(1) through $(<I>N</I>) (9 max), and the
-	first two only may be referenced in the action's <I>commands</I>
-	as $(1) and $(2).  $(&lt;) and $(&gt;) are synonymous with $(1)
-	and $(2).
-
-	<P>
-
-	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.
-
-	<P>
-
-	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, <I>commands</I> are passed to the OS command
-	shell, with $(1) and $(2) replaced by bound versions of the
-	target names.  See <A HREF="#binding"> Binding</A> above.
-
-	<P>
-
-	Rule invokation may be indirected through a variable:
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	    <P> <DT> <CODE>
-	    $(<I>var</I>) <I>field1</I> : <I>field2</I> : <I>...</I> 
-	    : <I>fieldN</I> ;
-	    </CODE>
-
-	    <P> <DT> <CODE>
-	    on <I>target</I> $(<I>var</I>) <I>field1</I> : <I>field2</I> : <I>...</I> 
-	    : <I>fieldN</I> ;
-	    </CODE>
-
-	    <P> <DT> <CODE>
-	    [ $(<I>var</I>) <I>field1</I> : <I>field2</I> : <I>...</I>
-	
-            : <I>fieldN</I> ] <br>
-	    [  on <I>target</I> $(<I>var</I>) <I>field1</I> : <I>field2</I> : <I>...</I>
-            : <I>fieldN</I> ] <br>
-
-	    </CODE>
-
-	</DL></TABLE>
-
- 	The variable's value names the rule (or rules) to be invoked.
-	A rule is invoked for each element in the list of
-	<TT>$(<I>var</I>)</TT>'s values. The fields
-	<I>field1</I> : <I>field2</I> : <I>...</I> are passed as
-	arguments for each invokation. For the <TT> [ ... ] </TT> forms,
-	the return value is the concatenation of the return values for
-	all of the invokations.
-
-	<A NAME="actionmods">
-	<P> <H4> Action Modifiers </H4>
-	</A>
-
-	<P>
-
-	The following action <i>modifiers</i> are understood:
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	    <P><DT><CODE> actions bind <I>vars</I> </CODE>
-	    <DD> $(vars) will be replaced with bound values.
-
-	    <P><DT><CODE> actions existing </CODE>
-	    <DD> $(>) includes only source targets currently existing.
-
-	    <P><DT><CODE> actions ignore </CODE>
-	    <DD> The return status of the <I>commands</I> is ignored.
-
-	    <P><DT><CODE> actions piecemeal </CODE>
-	    <DD> <I>commands</I>  are repeatedly invoked with a subset
-	    of $(>) small enough to fit in the command buffer on this
-	    OS.
-
-	    <P><DT><CODE> actions quietly </CODE>
-	    <DD> The action is not echoed to the standard output.
-
-	    <P><DT><CODE> actions together </CODE>
-	    <DD> The $(>) from multiple invocations of the same action
-	    on the same built target are glommed together.
-
-	    <P><DT><CODE> actions updated </CODE>
-	    <DD> $(>) includes only source targets themselves marked
-	    for updating.
-
-	</DL></TABLE>
-
-
-<DT> <P> <H3> Built-in Rules </H3> <DD>
-
-	<P>
-	<B>Jam</b> has eleven 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.
-
-	<P>
-
-	<P> <H5> Dependency Building </H5> 
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	<P><DT><CODE> 
-	DEPENDS <I>targets1</I> : <I>targets2</I> ; 
-	</CODE>
-
-	<DD> Builds a direct dependency: makes each of <I>targets1</I>
-	depend on each of <I>targets2</I>.  Generally, <I>targets1</I>
-	will be rebuilt if <I>targets2</I> are themselves rebuilt are
-	or are newer than <I>targets1</I>.
-
-	<P><DT><CODE>
-	INCLUDES <I>targets1</I> : <I>targets2</I> ;
-	</CODE>
-
-	<DD> Builds a sibling dependency: makes any target that depends
-	on any of <I>targets1</I> also depend on each of <I>targets2</I>.
-	This reflects the dependencies that arise when one source file
-	includes another:  the object built from the source file depends
-	both on the original and included source file,  but the two
-	sources files don't depend on each other.  For example:
-
-	<CODE>
-	<P>DEPENDS foo.o : foo.c ;
-	<BR>INCLUDES foo.c : foo.h ;
-	</CODE>
-
-	<P>
-
-	"foo.o" depends on "foo.c" and "foo.h" in this example.
-
-	</DL></TABLE>
-
-	<A NAME="bindingmods">
-	<P> <H5> Modifying Binding </H5> 
-	</A>
-
-	<P>
-
-	The six rules ALWAYS, LEAVES, NOCARE, NOTFILE, NOUPDATE, and
-	TEMPORARY modify the dependency graph so that <b>jam</b> treats
-	the targets differently during its target binding phase.  See
-	<A HREF="#binding">Binding</A> above.  Normally, <b>jam</b>
-	updates a target if it is missing, if its filesystem modification
-	time is older than any of its dependencies (recursively), or if
-	any of its dependencies are being updated.  This basic behavior
-	can be changed by invoking the following rules:
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	<P><DT><CODE>
-	ALWAYS <I>targets</I> ;
-	</CODE>
-
-	<DD> Causes <I>targets</I> to be rebuilt regardless of whether
-	they are up-to-date (they must still be in the dependency graph).
-	This is used for the clean and uninstall targets, as they have
-	no dependencies and would otherwise appear never to need building.
-	It is best applied to targets that are also NOTFILE targets,
-	but it can also be used to force a real file to be updated as
-	well.
-
-	<P><DT><CODE>
-	LEAVES <I>targets</I> ;
-	</CODE>
-
-	<DD> Makes each of <I>targets</I> depend only on its leaf sources,
-	and not on any intermediate targets.  This makes it immune to
-	its dependencies being updated, as the "leaf" dependencies are
-	those without their own dependencies and without updating actions.
-	This allows a target to be updated only if original source files
-	change.
-
-	<P><DT><CODE>
-	NOCARE <I>targets</I> ;
-	</CODE>
-
-	<DD> Causes <b>jam</b> to ignore <I>targets</I> that neither
-	can be found nor have updating actions to build them.  Normally
-	for such targets <B>jam</B> issues a warning and then skips
-	other targets that depend on these missing targets.  The HdrRule
-	in Jambase uses NOCARE on the header file names found during
-	header file scanning, to let <b>jam</b> know that the included
-	files may not exist.   For example,  if a #include is within an
-	#ifdef, the included file may not actually be around.
-
-	<P><DT><CODE>
-	NOTFILE <I>targets</I> ;
-	</CODE>
-
-	<DD> Marks <I>targets</I> as pseudotargets and not real files.
-	No timestamp is checked, and so the actions on such a target
-	are only executed if the target's dependencies are updated, or
-	if the target is also marked with ALWAYS.  The default <b>jam</b>
-	target "all" is a pseudotarget. In Jambase, NOTFILE is used to
-	define several addition convenient pseudotargets.
-
-	<P><DT><CODE>
-	NOUPDATE <I>targets</I> ;
-	</CODE>
-
-	<DD> Causes the timestamps on <I>targets</I> to be ignored.
-	This has two effects:  first,  once the target has been created
-	it will never be updated; second, manually updating target will
-	not cause other targets to be updated.  In Jambase, for example,
-	this rule is applied to directories by the MkDir rule, because
-	MkDir only cares that the target directory exists, not when it
-	has last been updated.
-
-	<P><DT><CODE>
-	TEMPORARY <I>targets</I> ;
-	</CODE>
-
-	<DD> Marks <I>targets</I> as temporary, allowing them to be
-	removed after other targets that depend upon them have been
-	updated.  If a TEMPORARY target is missing, <b>jam</b> uses the
-	timestamp of the target's parent.  Jambase uses TEMPORARY to
-	mark object files that are archived in a library after they are
-	built, so that they can be deleted after they are archived.
-
-	</DL></TABLE>
-
-	<P> <H5> Utility Rules </H5> 
-
-	<P>
-
-	The two rules ECHO and EXIT are utility rules, used only in
-	<b>jam</b>'s parsing phase.
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	<P><DT><CODE>
-	ECHO <i>args</I> ;
-	</CODE>
-
-	<DD> Blurts out the message <i>args</I> to stdout.
-
-	<P><DT><CODE>
-	EXIT <i>args</I> ;
-	</CODE>
-
-	<DD> Blurts out the message <i>args</I> to stdout and then exits
-	with a failure status.
-
-	<P>
-
-	"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".
-
-	</DL></TABLE>
-
-	<P>
-
-	The GLOB rule does filename globbing.
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	<P><DT><CODE>
-	GLOB <i>directories</I> : <I>patterns</I> : <I>downcase-opt</I>
-	</CODE>
-
-	<DD>  Using the same wildcards as for the patterns in the <A
-	HREF="#switch">switch</A> statement).  It is invoked by being
-	used as an argument to a rule invocation inside of `[ ]`. For
-	example: "<TT>FILES = [ GLOB dir1 dir2 : *.c *.h ]</TT>" 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.  
-
-    <p>If <I>downcase-opt</I> is supplied, filenames are converted to
-	all-lowercase before matching against the pattern; you can use
-	this to do case-insensitive matching using lowercase patterns.
-	The paths returned will still have mixed case if the OS supplies
-	them.  On Windows NT and Cygwin, filenames are always downcased
-	before matching.
-
-	</DL></TABLE>
-
-	<P>
-
-	The MATCH rule does pattern matching.
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	<P><DT><CODE>
-	MATCH <i>regexps</I> : <I>list</I>
-	</CODE>
-
-	<DD> Matches the <b>egrep</b>(1) style regular expressions
-	<I>regexps</I> against the strings in <I>list</I>.  The result
-	is the concatenation of matching <tt>()</tt> subexpressions for
-	each string in <I>list</I>, and for each regular expression in    
-	<I>regexps</I>.  Only useful within the <tt>[ ]</tt> construct,
-	to change the result into a list.
-
-	</DL></TABLE>
-
-<DT> <P> <H3> Flow-of-Control </H3> <DD>
-
-	<P>
-
-	Jam has several simple flow-of-control statements:
-
-	<P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-	    <P><DT><CODE> 
-
-		for <I>var</I> in <I>list</I> { <I>statements</I> }
-
-	    </CODE>
-
-	    <P><DD> Executes <i>statements</i> for each element in
-	    <i>list</i>, setting the variable <i>var</i> to the element
-	    value.
-
-	    <A name=if>
-	    <P><DT><CODE>
-	    </A>
-
-		if <I>cond</I> { <I>statements</I> } 
-		<BR> [ else <I>statements</I> ]
-
-	    </CODE>
-
-	    <P><DD> Does the obvious;  the else clause is optional.
-	    <i>cond</i> is built of:
-
-	    <TABLE> 
-
-		<TR><TD> <CODE><I>a</I></CODE></TD>
-		<TD> true if any <I>a</I> element is a non-zero-length 
-		string</TD>
-		<TR><TD> <CODE><I>a</I> = <I>b</I></CODE> </TD>
-		<TD> list <I>a</I> matches list <I>b</I> 
-		string-for-string</TD>
-		<TR><TD> <CODE><I>a</I> != <I>b</I> </CODE></TD>
-		<TD> list <I>a</I> does not match list <I>b</I></TD>
-		<TR><TD> <CODE><I>a</I> &lt; <I>b</I> </CODE></TD>
-		<TD> <I>a[i]</I> string is less than <I>b[i]</I>
-		string, where <i>i</i> is first mismatched element
-		in lists <I>a</I> and <I>b</I></TD>
-		<TR><TD> <CODE><I>a</I> &lt;= <I>b</I> </CODE></TD>
-		<TD> every <I>a</I> string is less than or equal to
-		its <I>b</I> counterpart</TD>
-		<TR><TD> <CODE><I>a</I> &gt; <I>b</I> </CODE></TD>
-		<TD> <I>a[i]</I> string is greater than <I>b[i]</I>
-		string, where <i>i</i> is first mismatched element</TD>
-		<TR><TD> <CODE><I>a</I> &gt;= <I>b</I> </CODE></TD>
-		<TD> every <I>a</I> string is greater than or equal to
-		its <I>b</I> counterpart</TD>
-		<TR><TD> <CODE><I>a</I> in <I>b</I> </CODE></TD>
-		<TD> true if all elements of <I>a</I> can be found
-		in <I>b</I>, or if <I>a</I> has no elements</TD>
-		<TR><TD> <CODE>! <I>cond</I> </CODE></TD>
-		<TD> condition not true</TD>
-		<TR><TD> <CODE><I>cond</I> && <I>cond</I> </CODE></TD>
-		<TD> conjunction</TD>
-		<TR><TD> <CODE><I>cond</I> || <I>cond</I> </CODE></TD>
-		<TD> disjunction</TD>
-		<TR><TD> <CODE>( <I>cond</I> ) </CODE></TD>
-		<TD> precedence grouping</TD>
-
-	    </TABLE>
-
-	    <P><DT> <CODE>
-
-		include <I>file</I> ;
-
-	    </CODE>
-
-	    <P><DD> Causes <b>jam</b> to read the named <i>file</i>.
-	    The file is bound like a regular target (see <A
-	    HREF="#binding"> Binding</A> above) but unlike a regular
-	    target the include file cannot be built.
-
-	    <P>
-
-	    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, <b>jam</b>
-	    infers no scope boundaries from included files.
-
-	    <P><DT> <CODE>
-
-		local <i>vars</I> [ = <i>values</i> ] ;
-
-	    </CODE>
-
-	    <P><DD> Creates new <i>vars</i> inside to the enclosing {}
-	    block, obscuring any previous values they might have.  The
-	    previous values for <i>vars</i> 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 <i>vars</i> are
-	    initialized to <i>values</i> if present, or left uninitialized
-	    otherwise.
-
-	    <P><DT> <CODE>
-
-		return <I>values</I> ; 
-
-	    </CODE>
-
-	    <P><DD> Within a rule body, the return statement sets the return
-            value for an invocation of the rule. It does <i>not</i> 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.
-
-	    <P><DT> <CODE>
-
-		<A NAME="switch">
-		switch <I>value</I> 
-		</A>
-		<BR> { 
-		<BR> case <I>pattern1</I> : <I>statements</I> ; 
-		<BR> case <I>pattern2</I> : <I>statements</I> ; 
-		<BR> ... 
-		<BR> }
-
-	    </CODE>
-
-	    <P><DD> The switch statement executes zero or one of the
-	    enclosed <i>statements</i>, depending on which, if any, is
-	    the first case whose <i>pattern</I> matches <i>value</i>.
-	    The <i>pattern</I> values are not variable-expanded.  The
-	    <i>pattern</I>  values may include the following wildcards:
-
-	    <TABLE>
-
-		<TR><TD><CODE> ? </CODE></TD>
-		<TD> match any single character </TD>
-		<TR><TD><CODE> * </CODE></TD>
-		<TD> match zero or more characters </TD>
-		<TR><TD><CODE> [<i>chars</i>] </CODE></TD>
-		<TD> match any single character in <i>chars</i> </TD>
-		<TR><TD><CODE> [^<i>chars</i>] </CODE></TD>
-		<TD> match any single character not in <i>chars</i> </TD>
-		<TR><TD><CODE> \<i>x</i> </CODE></TD>
-		<TD> match <i>x</i> (escapes the other wildcards)</i> </TD>
-
-	    </TABLE>
-
-	    <P><DT> <CODE>
-
-		while <I>cond</I> { <I>statements</I> }
-
-	    </CODE>
-
-	    <P><DD> Repeatedly execute <I>statements</I> while <I>cond</I>
-	    remains true upon entry. (See the description of <I>cond</I>
-	    expression syntax under <a href="#if">if</a>, above).
-	</DL></TABLE>
-
-<DT> <P> <H3> Variables </H3> <DD>
-
-	<P>
-
-	<B>Jam</b> 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 $(<I>variable</I>).
-
-	<P>
-
-	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.
-
-	<P>
-
-	A variable is defined with:
-
-	<P> <TABLE WIDTH=75% ALIGN=CENTER> <TR><TD> <DL>
-
-	    <DT><CODE> 
-	    <I>variable</I> = <I>elements</I> ; </CODE>
-	    <DT><CODE> 
-	    <I>variable</I> += <I>elements</I> ; </CODE>
-	    <DT><CODE> 
-	    <I>variable</I> on <I>targets</I> = <I>elements</I> ; </CODE>
-	    <DT><CODE> 
-	    <I>variable</I> on <I>targets</I> += <I>elements</I> ; </CODE>
-	    <DT><CODE> 
-	    <I>variable</I> default = <I>elements</I> ; </CODE>
-	    <DT><CODE> 
-	    <I>variable</I> ?= <I>elements</I> ; </CODE>
-
-	</DL></TABLE>
-
-	<P>
-
-	The first two forms set <I>variable</I> globally.  The third
-	and forth forms set a target-specific variable.  The = operator
-	replaces any previous elements of <I>variable</I> with
-	<I>elements</I>; the += operation adds <I>elements</I> to
-	<I>variable</I>'s list of elements.  The final two forms are
-	synonymous: they set <I>variable</I> globally, but only if it
-	was previously unset.
-
-	<P>
-
-	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 <A HREF="#actionmods">Action Modifiers</A>
-	above.
-
-	<P>
-
-	<B>Jam</b> variables are not re-exported to the environment of
-	the shell that executes the updating actions, but the updating
-	actions can reference <b>jam</b> variables with $(<I>variable</I>).
-
-	<P> <H4> Variable Expansion </H4>
-
-	<P>
-
-	During parsing, <b>jam</b> 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 $(<I>v</I>) or
-	$(<I>vm</I>), where <i>v</i> is the variable name,  and  <I>m</I>
-	are optional modifiers.
-
-	<P>
-
-	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.
-
-	<P>
-
-	The result of a token after variable expansion is the
-	<i>product</i> of the components of the token, where each
-	component is a literal substring or a list substituting a variable
-	reference.  For example:
-
-	<P> <TABLE WIDTH=75% ALIGN=CENTER><TR><TD><CODE>
-
-	    <BR>$(X)      -> a b c
-	    <BR>t$(X)     -> ta tb tc
-	    <BR>$(X)z     -> az bz cz
-	    <BR>$(X)-$(X) -> a-a a-b a-c b-a b-b b-c c-a c-b c-c
-
-	</CODE></TABLE>
-
-	<P>
-
-	The variable name and modifiers can themselves contain
-	a variable reference,  and this partakes of the product
-	as well:
-
-	<P> <TABLE WIDTH=75% ALIGN=CENTER><TR><TD><CODE>
-
-	    <BR>$(X)      -> a b c
-	    <BR>$(Y)      -> 1 2
-	    <BR>$(Z)      -> X Y
-	    <BR>$($(Z))   -> a b c 1 2
-
-	</CODE></TABLE>
-
-	<P>
-
-	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:
-
-	<P> <TABLE WIDTH=75% ALIGN=CENTER><TR><TD><CODE>
-
-	    <BR>$(X)        -> a ""
-	    <BR>$(Y)        -> "" 1
-	    <BR>$(Z)	  -> 
-	    <BR>*$(X)$(Y)*  -> *a* *a1* ** *1*
-	    <BR>*$(X)$(Z)*  ->
-
-	</CODE></TABLE>
-
-	<P>
-
-	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:
-
-	<P> <TABLE WIDTH=75% ALIGN=CENTER>
-
-	    <TR><TD><CODE> [<I>n</I>] </CODE>
-	    <TD>Select element number <I>n</I> (starting at 1).  If
-	    the variable contains fewer than <I>n</I> elements,
-	    the result is a zero-element list.
-
-	    <TR><TD><CODE> [<I>n</I>-<I>m</I>] </CODE>
-	    <TD>Select elements number <I>n</I> through <I>m</I>.
-
-	    <TR><TD><CODE> [<I>n</I>-] </CODE>
-	    <TD>Select elements number <I>n</I> through the last.
-
-	    <TR><TD><CODE> :B </CODE>
-	    <TD>Select filename base.
-
-	    <TR><TD><CODE> :S </CODE>
-	    <TD>Select (last) filename suffix.
-
-	    <TR><TD><CODE> :M </CODE>
-	    <TD>Select archive member name.
-
-	    <TR><TD><CODE> :D </CODE>
-	    <TD>Select directory path.
-
-	    <TR><TD><CODE> :P </CODE>
-	    <TD>Select parent directory.
-
-	    <TR><TD><CODE> :G </CODE>
-	    <TD>Select grist.
-
-	    <TR><TD><CODE> :U </CODE>
-	    <TD>Replace lowercase characters with uppercase.
-
-	    <TR><TD><CODE> :L </CODE>
-	    <TD>Replace uppercase characters with lowercase.
-
-	    <TR><TD><CODE> :<i>chars</I> </CODE>
-	    <TD>Select the components listed in <i>chars</i>.
-
-	    <TR><TD><CODE> :G=<I>grist</I> </CODE>
-	    <TD>Replace grist with <I>grist</I>.
-
-	    <TR><TD><CODE> :D=<I>path</I> </CODE>
-	    <TD>Replace directory with <I>path</I>.
-
-	    <TR><TD><CODE> :B=<I>base</I> </CODE>
-	    <TD>Replace the base part of file name with <I>base</I>.
-
-	    <TR><TD><CODE> :S=<I>suf</I> </CODE>
-	    <TD>Replace the suffix of file name with <I>suf</I>.
-
-	    <TR><TD><CODE> :M=<I>mem</I> </CODE>
-	    <TD>Replace the archive member name with <I>mem</I>.
-
-	    <TR><TD><CODE> :R=<I>root</I> </CODE>
-	    <TD>Prepend <I>root</I> to the whole file name,  if not
-	    already rooted.
-
-	    <TR><TD><CODE> :E=<I>value</I> </CODE>
-	    <TD>Assign <I>value</I> to the variable if it is unset.
-
-	    <TR><TD><CODE> :J=<I>joinval</I> </CODE>
-	    <TD>Concatentate list elements into single
-            element, separated by <I>joinval</I>.
-
-	</TABLE>
-
-	<P>
-
-	On VMS, $(var:P) is the parent directory of $(var:D).
-
-<DT> <P> <H3> Built-in Variables </H3> <DD>
-
-	<P>
-
-	This section discusses variables that have special meaning to
-	<b>jam</b>.
-
-	<A NAME="search">
-	<P> <H4> SEARCH and LOCATE Variables </H4>
-	</A>
-
-	<P>
-
-	These two variables control the binding of file target names to
-	locations in the file system.  Generally, $(SEARCH) is used to
-	find existing sources while $(LOCATE) is used to fix the location
-	for built targets.
-
-	<P>
-
-	Rooted (absolute path) file targets are bound as is.  Unrooted
-	file target names are also normally bound as is, and thus relative
-	to the current directory, but the settings of $(LOCATE) and
-	$(SEARCH) alter this:
-
-	<P>
-
-	<UL>
-
-	<LI> If $(LOCATE) is set then the target is bound relative to
-	the first directory in $(LOCATE).  Only the first element is
-	used for binding.
-
-	<LI> If $(SEARCH) is set then the target is bound to the first
-	directory in $(SEARCH) where the target file already exists.
-
-	<LI> If the $(SEARCH) search fails, the target is bound relative
-	to the current directory anyhow.
-
-	</UL>
-
-	<P>
-
-	Both $(SEARCH) and $(LOCATE) should be set target-specific and
-	not globally.  If they were set globally,  <b>jam</b> would use
-	the same paths for all file binding, which is not likely to
-	produce sane results.  When writing your own rules,  especially
-	ones not built upon those in Jambase, you may need to set
-	$(SEARCH) or $(LOCATE) directly.  Almost all of the rules defined
-	in Jambase set $(SEARCH) and $(LOCATE) to sensible values for
-	sources they are looking for and targets they create, respectively.
-
-	<A NAME="hdrscan">
-	<P> <H4> HDRSCAN and HDRRULE Variables </H4>
-	</A>
-
-	<P>
-
-	These two variable control header file scanning.  $(HDRSCAN) is
-	an <b>egrep</b>(1) pattern, with ()'s surrounding the file name,
-	used to find file inclusion statements in source files.  Jambase
-	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 <b>jam</b> invokes a rule through
-	a variable setting.
-
-	<P>
-
-	Both $(HDRSCAN) and $(HDRRULE) must be set for header file
-	scanning to take place, and they should be set target-specific
-	and not globally.  If they were set globally, all files, including
-	executables and libraries, would be scanned for header file
-	include statements.
-
-	<P>
-
-	The scanning for header file inclusions is not exact, but it is
-	at least dynamic, so there is no need to run something like
-	<b>makedepend</b>(GNU) to create a static dependency file. The
-	scanning mechanism errs on the side of inclusion (i.e., it is
-	more likely to return filenames that are not actually used by
-	the compiler than to miss include files) because it can't tell
-	if #include lines are inside #ifdefs or other conditional logic.
-	In Jambase, HdrRule applies the NOCARE rule to each header file
-	found during scanning so that if the file isn't present yet
-	doesn't cause the compilation to fail, <b>jam</b> won't care.
-
-	<P>
-
-	Also, scanning for regular expressions only works where the
-	included file name is literally in the source file.  It can't
-	handle languages that allow including files using variable names
-	(as the Jam language itself does).
-
-	<P> <H4> Platform Identifier Variables </H4>
-
-	<P>
-
-	A number of Jam built-in variables can be used to identify
-	runtime platform:
-
-	<P>
-
-	<TABLE WIDTH=75% ALIGN=CENTER>
-
-	    <TR><TD>OS<TD>OS identifier string 
-	    <TR><TD>OSPLAT<TD>Underlying architecture, when applicable
-	    <TR><TD>MAC<TD>true on MAC platform
-	    <TR><TD>NT<TD>true on NT platform
-	    <TR><TD>OS2<TD>true on OS2 platform
-	    <TR><TD>UNIX<TD>true on Unix platforms
-	    <TR><TD>VMS<TD>true on VMS platform
-
-	</TABLE>
-
-	<P> <H4> Jam Version Variables </H4>
-
-	<P>
-
-	<TABLE WIDTH=75% ALIGN=CENTER>
-
-	    <TR><TD>JAMDATE<TD>Time and date at <b>jam</b> start-up.
-	    <TR><TD>JAMUNAME<TD>Ouput of <b>uname</b>(1) command (Unix only)
-	    <TR><TD>JAMVERSION<TD><b>jam</b> version, currently "2.3"
-
-	</TABLE>
-
-	<P> <H4> JAMSHELL Variable </H4>
-
-	<P>
-
-	When  <b>jam</b>  executes a  rule's action block, it forks and
-	execs a shell, passing the action block as an argument to the
-	shell.   The invocation of the shell can be controlled by
-	$(JAMSHELL).  The default on Unix is, for example:
-
-	<P>
-
-	<CODE>JAMSHELL = /bin/sh -c % ;</CODE>
-
-	<P>
-
-	The % is replaced with the text of the action block.
-
-	<P>
-
-	<B>Jam</b>  does not directly support building in parallel across
-	multiple hosts, since that is heavily dependent on the local
-	environment.   To build in parallel across multiple hosts, you
-	need to write your own shell that provides access to the multiple
-	hosts.  You then reset $(JAMSHELL) to reference it.
-
-	<P>
-
-	Just as <b>jam</b> expands a % to be the text of the rule's
-	action block, it expands a ! to be the multi-process slot number.
-	The slot number varies between 1 and the number of concurrent
-	jobs permitted by the -j flag given on the command line.  Armed
-	with this, it is possible to write a multiple host shell.  For
-	example:
-
-	<P>
-
-	<TABLE WIDTH=75% ALIGN=CENTER><TR><TD><CODE>
-
-	    <BR>#!/bin/sh
-	    <BR>
-	    <BR># This sample JAMSHELL uses the SunOS on(1) command to execute a
-	    <BR># command string with an identical environment on another host.
-	    <BR>
-	    <BR># Set JAMSHELL = jamshell ! %
-	    <BR>#
-	    <BR># where jamshell is the name of this shell file.
-	    <BR>#
-	    <BR># This version handles up to -j6; after that they get executed
-	    <BR># locally.
-	    <BR>
-	    <BR>case $1 in
-	    <BR>1|4) on winken sh -c "$2";;
-	    <BR>2|5) on blinken sh -c "$2";;
-	    <BR>3|6) on nod sh -c "$2";;
-	    <BR>*)   eval "$2";;
-	    <BR>esac
-
-	</CODE></TABLE>
-
-
-<DT> <P> <H2> DIAGNOSTICS </H2>  <DD>
-
-	<P>
-
-       In addition to generic error messages, <B>jam</B> may emit one of
-       the following:
-
-       <P><TABLE WIDTH=75% ALIGN=CENTER><TR><TD><DL>
-
-       <P><DT><CODE> warning: unknown rule X </CODE> <DD>
-
-              A rule was invoked that has not been defined with
-              an "actions" or "rule" statement.
-
-       <P><DT><CODE> using N temp target(s) </CODE> <DD>
-
-              Targets marked as being temporary (but nonetheless
-              present) have been found.
-
-       <P><DT><CODE> updating N target(s) </CODE> <DD>
-
-              Targets are out-of-date and will be updated.
-
-       <P><DT><CODE> can't find N target(s) </CODE> <DD>
-
-              Source files can't be found and there are no
-              actions to create them.
-
-       <P><DT><CODE> can't make N target(s) </CODE> <DD>
-
-              Due to sources not being found, other targets cannot be made.
-
-       <P><DT><CODE> warning: X depends on itself </CODE> <DD>
-
-              A target depends on itself either directly or
-              through its sources.
-
-       <P><DT><CODE> don't know how to make X </CODE> <DD>
-
-              A target is not present and no actions have been
-              defined to create it.
-
-       <P><DT><CODE> X skipped for lack of Y </CODE> <DD>
-
-              A source failed to build, and thus a target cannot
-              be built.
-
-       <P><DT><CODE> warning: using independent target X </CODE> <DD>
-
-              A target that is not a dependency of any other
-              target is being referenced with $(&lt;) or $(&gt;).
-
-       <P><DT><CODE> X removed </CODE> <DD>
-
-              <b>Jam</b>  removed a  partially built target after being
-              interrupted.
-
-	</DL></TABLE>
-
-<DT> <P> <H2> BUGS, LIMITATIONS </H2> <DD>
-
-	<P>
-
-	The -j flag can cause <B>jam</B> to get confused when single
-	actions update more than one target at a time. <B>jam</B> may
-	proceed as if the targets were built even though they are still
-	under construction.
-
-	<P>
-
-	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 <b>yacc</b>(1) does.
-
-	<P>
-
-	With the -j flag, errors from failed commands can get staggeringly
-	mixed up.  
-
-	<P>
-
-	A poorly set $(JAMSHELL) is likely to result in silent failure.
-
-<DT> <P> <H2> SEE ALSO </H2> <DD>
-
-	<P>
-
-	<UL>
-
-	<LI> <a href="Jambase.html">Jambase Reference</a>
-
-	<LI> <a href="Jamfile.html">Using Jamfiles and Jambase</a>
-
-	</UL>
-
-	<P>
-
-	Jam documentation and source are available from the <A
-	HREF="http://public.perforce.com/public/index.html">Perforce
-	Public Depot</a>.
-
-<DT> <P> <H2> AUTHOR </H2>   <DD>
-
-	<P>
-	Jam's author is Christopher Seiwald (<a 
-	href="mailto:seiwald at perforce.com">seiwald at perforce.com</A>).
-	Documentation is provided by 
-	<A HREF="http://www.perforce.com">Perforce Software, Inc.</A>
-
-</DL>
-
-<P> <HR>   
-
-	<P>
-
-        Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
-        <BR>
-        Comments to <A HREF="mailto:info at perforce.com">info at perforce.com</A>
-        <BR>
-        Last updated: April 1, 2002
-	<BR>
-	$Id: Jam.html,v 1.6 2003/09/01 08:04:33 vladimir_prus Exp $
-
-</BODY> 
-</HTML>
-

Modified: boost-jam/branches/upstream/current/Jambase
===================================================================
--- boost-jam/branches/upstream/current/Jambase	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/Jambase	2006-11-07 14:20:16 UTC (rev 14010)
@@ -79,7 +79,7 @@
     # Add the given directory to the path so we can find the build
     # system. If dir is empty, has no effect.
     #
-    BOOST_BUILD_PATH = $(dir:R=$(.boost-build-file:D)) $(BOOST_BUILD_PATH) ;
+    BOOST_BUILD_PATH = $(BOOST_BUILD_PATH) $(dir:R=$(.boost-build-file:D)) ;
     
     # We might have just modified the *global* value of BOOST_BUILD_PATH.
     # The code that loads the rest of Boost.Build, in particular the 

Deleted: boost-jam/branches/upstream/current/Porting
===================================================================
--- boost-jam/branches/upstream/current/Porting	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/Porting	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,68 +0,0 @@
-Notes on porting Jam - revised 12/31/2000
-
-1) Working out system dependencies in the Jam code.
-
-    Jam's OS footprint is fairly small.  For OS independent work Jam
-    liberally uses standard libc functions like stdio, malloc, and
-    string.  The OS dependent interfaces are:
-
-	From filesys.h:
-
-	    file_parse() - split a file name into dir/base/suffix/member
-	    file_build() - build a filename given dir/base/suffix/member
-	    file_dirscan() - scan a directory for files
-	    file_archscan() - scan an archive for files
-	    file_time() - get the timestamp of a file, if not already 
-			  done by file_dirscan().
-
-	From execcmd.h:
-
-	    execcmd() - execute a shell script
-	    execwait() - wait for any outstanding execcmd()'s.
-
-    The current implementations are:
-
-	    filemac.c - mac MPW 
-	    filent.c - NT 
-	    fileos2.c - OS/2 
-	    fileunix.c - all UNIX
-	    filevms.c - VMS
-
-	    execmac.c - mac MPW
-	    execunix.c - UNIX, OS/2, NT
-	    execvms.c - VMS
-
-2) Defining OSMAJOR, OSMINOR in jam.h
-
-    So that the Jambase and Jamfile know their host, Jam defines $(OS)
-    to be something useful for each platform.  Make sure that there is
-    code in jam.h to generate a useful value for $(OS), and key it off 
-    the platform specific C-preprocessor symbol.   If the C-preprocessor 
-    doesn't itself defines such a symbol, add a define to the Makefile.
-
-    In addition to $(OS), you can also set $(OSPLAT) if the OS runs on
-    multiple platforms (like Linux or NT).
-
-3) Working out system dependencies in the Jambase
-
-    With the value of $(OS) available, the Jambase can be extended to
-    support special variables or rules for new platforms.   See the
-    current support for VMS, NT, and Mac.
-
-4) Yacc troubles
-
-    The generated files jamgram.h and jamgram.c are distributed for the 
-    poor souls without yacc.
-
-5) Known problematic systems:
-
-    - Pyramid has no malloc.h, memory.h
-
-    - Encore has no stdlib.h
-
-    - Bull DPX has sys/file.h problems
-
-6) Send the results back.
-
-    If you do porting work, the result can be integrated into future
-    releases if you send it back to the author's address in the README.

Modified: boost-jam/branches/upstream/current/boost-jam.spec
===================================================================
--- boost-jam/branches/upstream/current/boost-jam.spec	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/boost-jam.spec	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,5 +1,5 @@
 Name: boost-jam
-Version: 3.1.11
+Version: 3.1.13
 Summary: Build tool
 Release: 1
 Source: %{name}-%{version}.tgz
@@ -31,8 +31,9 @@
     ALL WARRANTIES ARE HEREBY DISCLAIMED.
 
 Also:
-    Copyright 2001-2004 David Abrahams.
-    Copyright 2002-2005 Rene Rivera.
+    Copyright 2001-2006 David Abrahams.
+    Copyright 2002-2006 Rene Rivera.
+    Copyright 2003-2006 Vladimir Prus.
     
     Distributed under the Boost Software License, Version 1.0.
     (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
@@ -49,9 +50,9 @@
 mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 install -m 755 bin/bjam $RPM_BUILD_ROOT%{_bindir}/bjam-%{version}
 ln -sf bjam-%{version} $RPM_BUILD_ROOT%{_bindir}/bjam
-install -m 644 *.html *.txt Porting $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+cp -R *.html *.png *.css LICENSE*.txt images jam $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 
-find $RPM_BUILD_ROOT -name CVS -type d -depth -exec rm -r {} \;
+find $RPM_BUILD_ROOT -name CVS -type d -exec rm -r {} \;
 
 %files
 %defattr(-,root,root)


Property changes on: boost-jam/branches/upstream/current/boost-jam.spec
___________________________________________________________________
Name: svn:executable
   + *

Added: boost-jam/branches/upstream/current/boost.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/boost.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/boostbook.css
===================================================================
--- boost-jam/branches/upstream/current/boostbook.css	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/boostbook.css	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,511 @@
+/*=============================================================================
+    Copyright (c) 2004 Joel de Guzman
+    http://spirit.sourceforge.net/
+
+    Use, modification and distribution is subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+    Body defaults
+=============================================================================*/
+
+    body 
+    {
+        margin: 1em;
+        font-family: sans-serif;
+    }
+
+/*=============================================================================
+    Paragraphs
+=============================================================================*/
+
+    p 
+    {
+        text-align: left;
+        font-size: 10pt; 
+        line-height: 1.15;
+    }
+
+/*=============================================================================
+    Program listings
+=============================================================================*/
+
+    /* Code on paragraphs */
+    p tt.computeroutput
+    {
+        font-size: 9pt;
+    }
+
+    pre.synopsis
+    {
+        font-size: 90%;
+        margin: 1pc 4% 0pc 4%;
+        padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+    }
+
+    .programlisting, 
+    .screen
+    {
+        font-size: 9pt;
+        display: block;
+        margin: 1pc 4% 0pc 4%;
+        padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+    }
+
+    /* Program listings in tables don't get borders */
+    td .programlisting, 
+    td .screen
+    {
+        margin: 0pc 0pc 0pc 0pc;
+        padding:  0pc 0pc 0pc 0pc;
+    }
+
+/*=============================================================================
+    Headings
+=============================================================================*/
+
+    h1, h2, h3, h4, h5, h6 
+    { 
+        text-align: left; 
+        margin: 1em 0em 0.5em 0em;
+        font-weight: bold;
+    }
+
+    h1 { font: 140% }
+    h2 { font: bold 140% }
+    h3 { font: bold 130% }
+    h4 { font: bold 120% }
+    h5 { font: italic 110% }
+    h6 { font: italic 100% }
+
+    /* Top page titles */
+    title, 
+    h1.title, 
+    h2.title
+    h3.title, 
+    h4.title, 
+    h5.title, 
+    h6.title, 
+    .refentrytitle
+    {
+        font-weight: bold;
+        margin-bottom: 1pc;
+    }
+
+    h1.title { font-size: 140% }
+    h2.title { font-size: 140% }
+    h3.title { font-size: 130% }
+    h4.title { font-size: 120% }
+    h5.title { font-size: 110% }
+    h6.title { font-size: 100% }
+
+    .section h1 
+    {
+        margin: 0em 0em 0.5em 0em;
+        font-size: 140%;
+    }
+
+    .section h2 { font-size: 140% }
+    .section h3 { font-size: 130% }
+    .section h4 { font-size: 120% }
+    .section h5 { font-size: 110% }
+    .section h6 { font-size: 100% }
+
+    /* Code on titles */
+    h1 tt.computeroutput { font-size: 140% }
+    h2 tt.computeroutput { font-size: 140% }
+    h3 tt.computeroutput { font-size: 130% }
+    h4 tt.computeroutput { font-size: 120% }
+    h5 tt.computeroutput { font-size: 110% }
+    h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+    Author
+=============================================================================*/
+
+    h3.author 
+    { 
+        font-size: 100% 
+    }
+
+/*=============================================================================
+    Lists
+=============================================================================*/
+
+    li
+    {
+        font-size: 10pt;
+        line-height: 1.3;
+    }
+    
+    /* Unordered lists */
+    ul 
+    {
+        text-align: left;
+    }
+    
+    /* Ordered lists */
+    ol 
+    {
+        text-align: left;
+    }
+
+/*=============================================================================
+    Links
+=============================================================================*/
+
+    a
+    {
+        text-decoration: none; /* no underline */
+    }
+    
+    a:hover
+    {
+        text-decoration: underline;
+    }
+
+/*=============================================================================
+    Spirit style navigation
+=============================================================================*/
+
+    .spirit-nav
+    {
+        text-align: right;
+    }
+    
+    .spirit-nav a
+    {
+        color: white;
+        padding-left: 0.5em;
+    }
+    
+    .spirit-nav img
+    {
+        border-width: 0px;
+    }
+
+/*=============================================================================
+    Table of contents
+=============================================================================*/
+
+    .toc
+    {
+       margin: 1pc 4% 0pc 4%;
+       padding: 0.1pc 1pc 0.1pc 1pc;
+       font-size: 80%; 
+       line-height: 1.15;
+    }
+    
+    .boost-toc
+    {
+       float: right;
+       padding: 0.5pc;
+    }
+
+/*=============================================================================
+    Tables
+=============================================================================*/
+
+    .table-title, 
+    div.table p.title
+    {
+        margin-left: 4%;
+        padding-right: 0.5em; 
+        padding-left: 0.5em;
+    }
+    
+    .informaltable table, 
+    .table table
+    {
+        width: 92%;
+        margin-left: 4%;
+        margin-right: 4%;
+    }
+    
+    div.informaltable table, 
+    div.table table
+    {
+        padding: 4px;
+    }
+    
+    /* Table Cells */
+    div.informaltable table tr td, 
+    div.table table tr td
+    {
+        padding: 0.5em;
+        text-align: left;
+        font-size: 9pt;
+    }
+
+    div.informaltable table tr th, 
+    div.table table tr th
+    {
+        padding: 0.5em 0.5em 0.5em 0.5em;
+        border: 1pt solid white;
+        font-size: 80%;
+    }
+
+/*=============================================================================
+    Blurbs
+=============================================================================*/
+
+    div.note,
+    div.tip,
+    div.important,
+    div.caution,
+    div.warning,
+    p.blurb
+    {
+        font-size: 9pt; /* A little bit smaller than the main text */
+        line-height: 1.2;
+        display: block;
+        margin: 1pc 4% 0pc 4%;
+        padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+    }
+    
+    p.blurb img
+    {
+        padding: 1pt;
+    }
+
+/*=============================================================================
+    Variable Lists
+=============================================================================*/
+
+    /* Make the terms in definition lists bold */
+    div.variablelist dl dt,
+    span.term
+    {
+        font-weight: bold;
+        font-size: 10pt;
+    }
+
+    div.variablelist table tbody tr td
+    {
+        text-align: left;
+        vertical-align: top;
+        padding: 0em 2em 0em 0em;
+        font-size: 10pt;
+        margin: 0em 0em 0.5em 0em;
+        line-height: 1;
+    }
+
+    div.variablelist dl dt
+    {
+        margin-bottom: 0.2em;
+    }
+
+    div.variablelist dl dd
+    {
+        margin: 0em 0em 0.5em 2em;
+        font-size: 10pt;
+    }
+
+    div.variablelist table tbody tr td p,
+    div.variablelist dl dd p
+    {
+        margin: 0em 0em 0.5em 0em;
+        line-height: 1;
+    }
+
+/*=============================================================================
+    Misc
+=============================================================================*/
+
+    /* Title of books and articles in bibliographies */
+    span.title
+    {
+        font-style: italic;
+    }
+
+    span.underline
+    {
+        text-decoration: underline;
+    }
+
+    span.strikethrough
+    {
+        text-decoration: line-through;
+    }
+
+    /* Copyright, Legal Notice */
+    div div.legalnotice p
+    {
+        text-align: left
+    }
+
+/*=============================================================================
+    Colors
+=============================================================================*/
+
+    @media screen
+    {
+    /* Links */
+        a
+        {
+            color: #005a9c;
+        }
+    
+        a:visited
+        {
+            color: #9c5a9c;
+        }
+
+        h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+        h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+        h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+        {
+            text-decoration: none; /* no underline */
+            color: #000000;
+        }
+    
+    /* Syntax Highlighting */
+        .keyword        { color: #0000AA; }
+        .identifier     { color: #000000; }
+        .special        { color: #707070; }
+        .preprocessor   { color: #402080; }
+        .char           { color: teal; }
+        .comment        { color: #800000; }
+        .string         { color: teal; }
+        .number         { color: teal; }
+        .white_bkd      { background-color: #FFFFFF; }
+        .dk_grey_bkd    { background-color: #999999; }
+    
+    /* Copyright, Legal Notice */
+        .copyright      
+        { 
+            color: #666666; 
+            font-size: small; 
+        }
+    
+        div div.legalnotice p
+        {
+            color: #666666;
+        }
+    
+    /* Program listing */
+        pre.synopsis
+        {
+            border: 1px solid #DCDCDC;
+        }
+    
+        .programlisting, 
+        .screen
+        {
+            border: 1px solid #DCDCDC;
+        }
+    
+        td .programlisting, 
+        td .screen
+        {
+            border: 0px solid #DCDCDC;
+        }
+    
+    /* Blurbs */
+        div.note,
+        div.tip,
+        div.important,
+        div.caution,
+        div.warning,
+        p.blurb
+        {
+            border: 1px solid #DCDCDC;
+        }
+    
+    /* Table of contents */
+        .toc
+        {
+            border: 1px solid #DCDCDC;
+        }
+    
+    /* Tables */
+        div.informaltable table tr td, 
+        div.table table tr td
+        {
+            border: 1px solid #DCDCDC;
+        }
+    
+        div.informaltable table tr th, 
+        div.table table tr th
+        {
+            background-color: #F0F0F0;
+            border: 1px solid #DCDCDC;
+        }
+    
+    /* Misc */
+        span.highlight
+        {
+            color: #00A000;
+        }
+    }
+    
+    @media print
+    {
+    /* Links */
+        a
+        {
+            color: black;
+        }
+    
+        a:visited
+        {
+            color: black;
+        }
+    
+        .spirit-nav
+        {
+            display: none;
+        }
+    
+    /* Program listing */
+        pre.synopsis
+        {
+            border: 1px solid gray;
+        }
+    
+        .programlisting, 
+        .screen
+        {
+            border: 1px solid gray;
+        }
+    
+        td .programlisting, 
+        td .screen
+        {
+            border: 0px solid #DCDCDC;
+        }
+    
+    /* Table of contents */
+        .toc
+        {
+            border: 1px solid gray;
+        }
+    
+        .informaltable table, 
+        .table table
+        {
+            border: 1px solid gray;
+            border-collapse: collapse;
+        }
+    
+    /* Tables */
+        div.informaltable table tr td, 
+        div.table table tr td
+        {
+            border: 1px solid gray;
+        }
+    
+        div.informaltable table tr th, 
+        div.table table tr th
+        {
+            border: 1px solid gray;
+        }
+    
+    /* Misc */
+        span.highlight
+        {
+            font-weight: bold;
+        }
+    }

Modified: boost-jam/branches/upstream/current/build.bat
===================================================================
--- boost-jam/branches/upstream/current/build.bat	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/build.bat	2006-11-07 14:20:16 UTC (rev 14010)
@@ -19,7 +19,7 @@
 ECHO ### You can specify the toolset as the argument, i.e.:
 ECHO ###     .\build.bat msvc
 ECHO ###
-ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin, intel-win32, metrowerks, mingw, msvc, vc7
+ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin, intel-win32, metrowerks, mingw, msvc, vc7, vc8
 ECHO ###
 set _error_=
 endlocal
@@ -41,7 +41,11 @@
 setlocal & endlocal
 setlocal
 set test=%1
-if not "-" == "%test:~0,1%" set _error_=
+set test=###%test%###
+set test=%test:"###=%
+set test=%test:###"=%
+set test=%test:###=%
+if not [-] == [%test:~0,1%] set _error_=
 endlocal
 goto :eof
 
@@ -50,7 +54,20 @@
 REM Sets BOOST_JAM_TOOLSET to the first found toolset.
 REM May also set BOOST_JAM_TOOLSET_ROOT to the
 REM location of the found toolset.
+
+if "_%ProgramFiles%_" == "__" set ProgramFiles=C:\Program Files
+
 setlocal & endlocal
+if NOT "_%VS80COMNTOOLS%_" == "__" (
+    set BOOST_JAM_TOOLSET=vc8
+    set BOOST_JAM_TOOLSET_ROOT=%VS80COMNTOOLS%..\..\VC\
+    goto :eof)
+setlocal & endlocal
+if EXIST "%ProgramFiles%\Microsoft Visual Studio 8\VC\bin\VCVARS32.BAT" (
+    set BOOST_JAM_TOOLSET=vc8
+    set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 8\VC\
+    goto :eof)
+setlocal & endlocal
 if NOT "_%VS71COMNTOOLS%_" == "__" (
     set BOOST_JAM_TOOLSET=vc7
     set BOOST_JAM_TOOLSET_ROOT=%VS71COMNTOOLS%\..\..\VC7\
@@ -66,21 +83,11 @@
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
-    set BOOST_JAM_TOOLSET=vc7
-    set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\
-    goto :eof)
-setlocal & endlocal
 if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
     set BOOST_JAM_TOOLSET=vc7
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET\VC7\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
-    set BOOST_JAM_TOOLSET=vc7
-    set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET\VC7\
-    goto :eof)
-setlocal & endlocal
 if NOT "_%MSVCDir%_" == "__" (
     set BOOST_JAM_TOOLSET=msvc
     set BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\
@@ -91,21 +98,11 @@
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio\VC98\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual Studio\VC98\bin\VCVARS32.BAT" (
-    set BOOST_JAM_TOOLSET=msvc
-    set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio\VC98\
-    goto :eof)
-setlocal & endlocal
 if EXIST "%ProgramFiles%\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
     set BOOST_JAM_TOOLSET=msvc
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual C++\VC98\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
-    set BOOST_JAM_TOOLSET=msvc
-    set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual C++\VC98\
-    goto :eof)
-setlocal & endlocal
 call :Test_Path cl.exe
 if not errorlevel 1 (
     set BOOST_JAM_TOOLSET=msvc
@@ -213,7 +210,7 @@
 if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
     if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
         set PATH=%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools;%PATH%)
-    set BOOST_JAM_CC=mwcc -runtime ss -cwd include -DNT -ladvapi32.lib
+    set BOOST_JAM_CC=mwcc -runtime ss -cwd include -DNT -lkernel32.lib -ladvapi32.lib -luser32.lib
     set BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe
     set BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe
     set BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe
@@ -228,7 +225,7 @@
 if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
     if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
         set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
-    set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib
+    set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib
     set BOOST_JAM_OPT_JAM=/Febootstrap\jam0
     set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0
     set BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0
@@ -243,12 +240,27 @@
 if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
     if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
         set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
-    set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib
+    set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib
     set BOOST_JAM_OPT_JAM=/Febootstrap\jam0
     set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0
     set BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0
     set _known_=1
 )
+if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
+    if NOT "_%MSVCDir%_" == "__" (
+        set BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\) )
+if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
+    if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" (
+        call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
+if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
+    if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+        set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
+    set BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib
+    set BOOST_JAM_OPT_JAM=/Febootstrap\jam0
+    set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0
+    set BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0
+    set _known_=1
+)
 if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
     if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
         call :Test_Path bcc32.exe ) )
@@ -286,7 +298,7 @@
     set _known_=1
 )
 if "_%BOOST_JAM_TOOLSET%_" == "_intel-win32_" (
-    set BOOST_JAM_CC=icl -DNT /nologo
+    set BOOST_JAM_CC=icl -DNT /nologo kernel32.lib advapi32.lib user32.lib
     set BOOST_JAM_OPT_JAM=/Febootstrap\jam0
     set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0
     set BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0
@@ -312,10 +324,9 @@
 set YYACC_SOURCES=yyacc.c
 set MKJAMBASE_SOURCES=mkjambase.c
 set BJAM_SOURCES=
-set BJAM_SOURCES=%BJAM_SOURCES% command.c compile.c execnt.c execunix.c execvms.c expand.c
-set BJAM_SOURCES=%BJAM_SOURCES% filent.c fileos2.c fileunix.c filevms.c glob.c hash.c
+set BJAM_SOURCES=%BJAM_SOURCES% command.c compile.c debug.c execnt.c expand.c filent.c glob.c hash.c
 set BJAM_SOURCES=%BJAM_SOURCES% hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c
-set BJAM_SOURCES=%BJAM_SOURCES% newstr.c option.c parse.c pathunix.c pathvms.c regexp.c
+set BJAM_SOURCES=%BJAM_SOURCES% newstr.c option.c parse.c pathunix.c regexp.c
 set BJAM_SOURCES=%BJAM_SOURCES% rules.c scan.c search.c subst.c timestamp.c variable.c modules.c
 set BJAM_SOURCES=%BJAM_SOURCES% strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c
 set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c 
@@ -382,7 +393,14 @@
 @if "_%BJAM_UPDATE%_" == "_update_" goto Skip_Clean
 .\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " clean
 :Skip_Clean
-.\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " %1 %2 %3 %4 %5 %6 %7 %8 %9
+ at set args=
+:Set_Args
+ at if not "_%1_" == "__" (
+    set args=%args% %1
+    shift
+    goto Set_Args
+)
+.\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " %args%
 :Skip_Jam
 
 :Finish

Modified: boost-jam/branches/upstream/current/build.jam
===================================================================
--- boost-jam/branches/upstream/current/build.jam	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/build.jam	2006-11-07 14:20:16 UTC (rev 14010)
@@ -12,16 +12,12 @@
 else { . = "." ; }
 
 # Info about what we are building.
+_VERSION_ = 3 1 13 ;
 NAME = boost-jam ;
-VERSION = 3$(.)1$(.)11 ;
+VERSION = $(_VERSION_:J=$(.)) ;
 RELEASE = 1 ;
-LICENSE = 1_0 ;
+LICENSE = LICENSE_1_0 ;
 
-HAVE_PYTHON = 0 ;
-PYTHON_INCUDES = /usr/include/python2.3 ;
-PYTHON_LIB = -lpython2.3 ;
-
-
 # Generate development debug binaries?
 if --debug in $(ARGV)
 {
@@ -41,6 +37,53 @@
     ARGV += --release ;
 }
 
+# Enable, and configure, Python hooks.
+with-python = ;
+python-location = [ MATCH --with-python=(.*) : $(ARGV) ] ;
+if $(python-location)
+{
+    with-python = true ;
+}
+if $(with-python)
+{
+    if $(NT)
+    {
+        --python-include = [ .path $(python-location) include ] ;
+        --python-lib = ;
+        for local v in 25 24 23 22
+        {
+            --python-lib ?=
+                [ GLOB [ .path $(python-location) libs ] : "python$(v).lib" ]
+                [ GLOB $(python-location) $(Path) $(PATH) $(path) : "python$(v).dll" ]
+                ;
+            if ! $(--python-lib[2])
+            {
+                --python-lib = ;
+            }
+        }
+    }
+    else if $(OS) = MACOSX
+    {
+        --python-include = [ .path $(python-location) Headers ] ;
+        --python-lib = $(python-location) Python ;
+    }
+    else
+    {
+        --python-include = ;
+        --python-lib = ;
+        for local v in 2.5 2.4 2.3 2.2
+        {
+            local inc = [ GLOB [ .path $(python-location) include ] : python$(v) ] ;
+            local lib = [ GLOB [ .path $(python-location) lib ] : libpython$(v)* ] ;
+            if $(inc) && $(lib)
+            {
+                --python-include ?= $(inc) ;
+                --python-lib ?= $(lib[1]:D) python$(v) ;
+            }
+        }
+    }
+}
+
 # An explicit root for the toolset? (trim spaces)
 toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ;
 {
@@ -75,59 +118,80 @@
 toolset acc cc : "-o " : -D
     : -Ae
     [ opt --release : -s -O3 ]
-    [ opt --debug : -g -pg ] ;
+    [ opt --debug : -g -pg ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Borland C++ 5.5.x
 toolset borland bcc32 : -e -n : /D
     : -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib"
     [ opt --release : -O2 -vi -w-inl ]
-    [ opt --debug : -v -Od -vi- ] ;
+    [ opt --debug : -v -Od -vi- ]
+    -I$(--python-include)
+    : $(--python-lib[1]) ;
 ## Generic Unix cc
 if ! $(CC) { CC = cc ; }
 toolset cc $(CC) : "-o " : -D
     : $(CFLAGS)
     [ opt --release : -s -O ]
     [ opt --debug : -g ]
-    : $(LIBS) ;
+    -I$(--python-include)
+    : $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Comeau C/C++ 4.x
 toolset como como : "-o " : -D
     : --c
     [ opt --release : --inlining ]
-    [ opt --debug : --no_inlining ] ;
+    [ opt --debug : --no_inlining ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## MacOSX Darwin, using GCC 2.9.x, 3.x
 toolset darwin cc :  "-o " : -D
     :
     [ opt --release : -Wl,-x -O3 -finline-functions ]
-    [ opt --debug : -g -O0 -fno-inline -pg ] ;
-## GCC 2.x, 3.x
+    [ opt --debug : -g -O0 -fno-inline -pg ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+## GCC 2.x, 3.x, 4.x
 toolset gcc gcc : "-o " : -D
     : -pedantic
-    [ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ]
-    [ opt --debug : -g -O0 -fno-inline ] ;
+    [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
+    [ opt --debug : -g -O0 -fno-inline ]
+    -I$(--python-include) -Wno-long-long
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll
 toolset gcc-nocygwin gcc : "-o " : -D
     : -s -O3 -mno-cygwin
     [ opt --release : -finline-functions ]
-    [ opt --debug : -s -O3 -fno-inline -pg ] ;
+    [ opt --debug : -s -O3 -fno-inline -pg ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Intel C/C++ for Linux
 toolset intel-linux icc : "-o " : -D
     :
     [ opt --release : -Xlinker -s -O3 ]
-    [ opt --debug : -g -O0 -p ] ;
+    [ opt --debug : -g -O0 -p ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Intel C/C++ for Win32
 toolset intel-win32 icl : /Fe : -D
     : /nologo
     [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
-    [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] ;
+    [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
+    -I$(--python-include)
+    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
 ## KCC ?
 toolset kcc KCC : "-o " : -D
     :
     [ opt --release : -s +K2 ]
-    [ opt --debug : -g +K0 ] ;
+    [ opt --debug : -g +K0 ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Borland Kylix
 toolset kylix bc++ : -o : -D
     : -tC -q
     [ opt --release : -O2 -vi -w-inl ]
-    [ opt --debug : -v -Od -vi- ] ;
+    [ opt --debug : -v -Od -vi- ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Metrowerks CodeWarrior 8.x
 {
     # Even though CW can compile all files at once, it crashes if it tries in the bjam case.
@@ -136,49 +200,78 @@
     toolset metrowerks $(mwcc) : "-o " : -D
         : -c -lang c -subsystem console -cwd include
         [ opt --release : -runtime ss -opt full -inline all ]
-        [ opt --debug : -runtime ssd -opt none -inline off ] ;
+        [ opt --debug : -runtime ssd -opt none -inline off ]
+        -I$(--python-include) ;
     toolset metrowerks $(mwcc) .link : "-o " :
-        : -subsystem console -ladvapi32.lib
+        : -subsystem console -lkernel32.lib -ladvapi32.lib -luser32.lib
         [ opt --release : -runtime ss ]
-        [ opt --debug : -runtime ssd ] ;
+        [ opt --debug : -runtime ssd ]
+        : $(--python-lib[1]) ;
 }
 ## MINGW GCC
 toolset mingw gcc : "-o " : -D
     :
     [ opt --release : -s -O3 -finline-functions ]
-    [ opt --debug : -g -O0 -fno-inline -pg ] ;
+    [ opt --debug : -g -O0 -fno-inline -pg ]
+    -I$(--python-include)
+    : $(--python-lib[2]) ;
 ## MIPS Pro
 toolset mipspro cc : "-o " : -D
     :
     [ opt --release : -s -O3 -g0 -INLINE:none ]
-    [ opt --debug : -g -O0 -INLINE ] ;
+    [ opt --debug : -g -O0 -INLINE ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Microsoft Visual Studio C++ 6.x
 toolset msvc cl : /Fe : -D
     : /nologo
     [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
     [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
-    : kernel32.lib advapi32.lib ;
+    -I$(--python-include)
+    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
+## QNX 6.x GCC 3.x/2.95.3
+toolset qcc qcc : "-o " : -D
+    : -Wc,-pedantic
+    [ opt --release : [ opt --symbols : -g ] -O3 -Wc,-finline-functions ]
+    [ opt --debug : -g -O0 -Wc,-fno-inline ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Sun Workshop 6 C++
 toolset sunpro cc : "-o " : -D
     :
     [ opt --release : -s -fast -xO4 ]
-    [ opt --debug : -g ] ;
+    [ opt --debug : -g ]
+    -xarch=generic
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Compaq Alpha CXX
 toolset tru64cxx cc : "-o " : -D
     :
     [ opt --release : -s -O5 -inline speed ]
-    [ opt --debug : -g -O0 -pg ] ;
+    [ opt --debug : -g -O0 -pg ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## IBM VisualAge C++
 toolset vacpp xlc : "-o " : -D
     :
     [ opt --release : -s -O3 -qstrict -qinline ]
-    [ opt --debug : -g -qNOOPTimize -qnoinline -pg ] ;
+    [ opt --debug : -g -qNOOPTimize -qnoinline -pg ]
+    -I$(--python-include)
+    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Microsoft Visual C++ .NET 7.x
 toolset vc7 cl : /Fe : -D
     : /nologo
     [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
     [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
-    : kernel32.lib advapi32.lib ;
+    -I$(--python-include)
+    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
+## Microsoft Visual C++ 2005
+toolset vc8 cl : /Fe : -D
+    : /nologo
+    [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
+    [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
+    -I$(--python-include)
+    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
 ## VMS/OpenVMS DEC C
 toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")"
     : /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
@@ -275,14 +368,19 @@
     locate-target = [ .path $(locate-target) ] ;
 }
 
+if --show-locate-target in $(ARGV)
+{
+  ECHO $(locate-target) ;
+}
+
 # We have some different files for UNIX, VMS, and NT.
 jam.source =
-    command.c compile.c expand.c glob.c
+    command.c compile.c debug.c expand.c glob.c
     hash.c hcache.c headers.c hdrmacro.c
     jam.c jambase.c jamgram.c
     lists.c make.c make1.c newstr.c
     option.c parse.c regexp.c rules.c
-    scan.c search.c subst.c
+    scan.c search.c subst.c w32_getreg.c
     timestamp.c variable.c modules.c strings.c filesys.c 
     builtins.c pwd.c class.c native.c modules/set.c 
     modules/path.c modules/regex.c modules/property-set.c
@@ -290,7 +388,7 @@
     ;
 if $(NT)
 {
-    jam.source += execnt.c filent.c pathunix.c w32_getreg.c ;
+    jam.source += execnt.c filent.c pathunix.c ;
 }
 else if $(OS2)
 {
@@ -319,6 +417,7 @@
 --defs += OPT_HEADER_CACHE_EXT ;
 --defs += OPT_GRAPH_DEBUG_EXT ;
 --defs += OPT_SEMAPHORE ;
+--defs += OPT_AT_FILES ;
 
 # Bug fixes
 --defs += OPT_FIX_TARGET_VARIABLES_EXT ;
@@ -337,12 +436,9 @@
 }
 --defs += YYSTACKSIZE=5000 ;
 
-if $(HAVE_PYTHON) = 1
+if $(with-python)
 {
     --defs += HAVE_PYTHON ;
-    --flags += -I$(PYTHON_INCUDES) ;
-    --flags += -Wno-long-long ;
-    --libs += $(PYTHON_LIB) ;
 }
 
 
@@ -617,22 +713,28 @@
 }
 .scan [ GLOB . : *.c ] ;
 
-# Distribution making from here on out.
+# Distribution making from here on out. Assumes that
+# the docs are already built as html at ../doc/html. If
+# they aren't, then the docs are not included in the dist
+# archive.
 dist.license =
-    #~ [ GLOB . : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. .. .. ] : LICENSE_$(LICENSE).txt ] ;
-    [ GLOB . : LICENSE_$(LICENSE).txt ]
-    [ GLOB [ .path .. .. .. ] : LICENSE_$(LICENSE).txt ]
-    [ GLOB [ .path .. boost ] : LICENSE_$(LICENSE).txt ] ;
+    [ GLOB . : $(LICENSE).txt ]
+    ;
+dist.license = $(dist.license:D=)
+    [ GLOB [ .path .. .. .. ] : $(LICENSE).txt ]
+    [ GLOB [ .path .. boost ] : $(LICENSE).txt ] ;
 dist.docs =
-    $(dist.license[1])
-    index.html
-    Porting
-    Jam.html
+    [ GLOB . : *.png *.css *.html ]
     ;
+dist.docs = $(dist.docs:D=)
+    [ GLOB [ .path images ] : *.png ]
+    [ GLOB [ .path jam ] : *.html ]
+    ;
 dist.source =
     [ GLOB . : *.c *.h ]
     ;
 dist.source = $(dist.source:D=)
+    $(dist.license[1])
     $(dist.docs)
     build.jam build.bat build.sh build_vms.com
     Jambase
@@ -660,7 +762,8 @@
 
 if $(NT)
 {
-    zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7z.exe" "7zn.exe" ] ;
+    zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7z.exe" ] ;
+    zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7zn.exe" ] ;
     zip ?= [ GLOB $(PATH) : zip.exe ] ;
     zip ?= zip ;
     zip = $(zip[1]) ;
@@ -747,7 +850,9 @@
 }
 
 # RPM distro file.
-rpm-tool = [ GLOB $(PATH) : "rpmbuild" "rpm" ] ;
+rpm-tool = [ GLOB $(PATH) : "rpmbuild" ] ;
+rpm-tool ?= [ GLOB $(PATH) : "rpm" ] ;
+rpm-tool = $(rpm-tool[1]) ;
 rule .rpm ( name : source )
 {
     local rpm-arch = ;
@@ -776,8 +881,9 @@
     .clean $(name).$(rpm-arch).rpm $(name).src.rpm ;
 }
 actions [RPM] {
+    set -e
     export BOOST_JAM_TOOLSET="$(toolset)"
-    $(rpm-tool[1]) -ta $(target-opt)$(arch) $(>) | tee rpm.out
+    $(rpm-tool) -ta $(target-opt)$(arch) $(>) | tee rpm.out
     cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` .
     rm -f rpm.out
 }


Property changes on: boost-jam/branches/upstream/current/build.jam
___________________________________________________________________
Name: svn:executable
   + *

Modified: boost-jam/branches/upstream/current/build.sh
===================================================================
--- boost-jam/branches/upstream/current/build.sh	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/build.sh	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#~ Copyright 2002-2004 Rene Rivera.
+#~ Copyright 2002-2005 Rene Rivera.
 #~ Distributed under the Boost Software License, Version 1.0.
 #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
@@ -30,7 +30,7 @@
     echo "###"
     echo "### Toolsets supported by this script are:"
     echo "###     acc, como, darwin, gcc, intel-linux, kcc, kylix, mipspro,"
-    echo "###     sunpro, tru64cxx, vacpp"
+    echo "###     mingw(msys), qcc, sunpro, tru64cxx, vacpp"
     echo "###"
     echo "### A special toolset; cc, is available which is used as a fallback"
     echo "### when a more specific toolset is not found and the cc command is"
@@ -61,12 +61,22 @@
 # Try and guess the toolset to bootstrap the build with...
 Guess_Toolset ()
 {
-    if test_uname Darwin ; then BOOST_JAM_TOOLSET=darwin
+    if test -r /mingw/bin/gcc ; then
+        BOOST_JAM_TOOLSET=mingw
+        BOOST_JAM_TOOLSET_ROOT=/mingw/
+    elif test_uname Darwin ; then BOOST_JAM_TOOLSET=darwin
     elif test_uname IRIX ; then BOOST_JAM_TOOLSET=mipspro
     elif test_uname IRIX64 ; then BOOST_JAM_TOOLSET=mipspro
     elif test_uname OSF1 ; then BOOST_JAM_TOOLSET=tru64cxx
+    elif test_uname QNX && test_path qcc ; then BOOST_JAM_TOOLSET=qcc
     elif test_path gcc ; then BOOST_JAM_TOOLSET=gcc
     elif test_path icc ; then BOOST_JAM_TOOLSET=intel-linux
+    elif test -r /opt/intel/cc/9.0/bin/iccvars.sh ; then
+        BOOST_JAM_TOOLSET=intel-linux
+        BOOST_JAM_TOOLSET_ROOT=/opt/intel/cc/9.0
+    elif test -r /opt/intel_cc_80/bin/iccvars.sh ; then
+        BOOST_JAM_TOOLSET=intel-linux
+        BOOST_JAM_TOOLSET_ROOT=/opt/intel_cc_80
     elif test -r /opt/intel/compiler70/ia32/bin/iccvars.sh ; then
         BOOST_JAM_TOOLSET=intel-linux
         BOOST_JAM_TOOLSET_ROOT=/opt/intel/compiler70/ia32/
@@ -100,6 +110,7 @@
 # is the name of the toolset to force building
 # with.
 case "$1" in
+    --guess-toolset) Guess_Toolset ; echo "$BOOST_JAM_TOOLSET" ; exit 1 ;;
     -*) Guess_Toolset ;;
     ?*) BOOST_JAM_TOOLSET=$1 ; shift ;;
     *) Guess_Toolset ;;
@@ -108,6 +119,13 @@
 BOOST_JAM_OPT_MKJAMBASE="-o bootstrap/mkjambase0"
 BOOST_JAM_OPT_YYACC="-o bootstrap/yyacc0"
 case $BOOST_JAM_TOOLSET in
+    mingw)
+    if test -r ${BOOST_JAM_TOOLSET_ROOT}bin/gcc ; then
+        export PATH=${BOOST_JAM_TOOLSET_ROOT}bin:$PATH
+    fi
+    BOOST_JAM_CC="gcc -DNT"
+    ;;
+    
     gcc)
     BOOST_JAM_CC=gcc
     ;;
@@ -117,7 +135,11 @@
     ;;
     
     intel-linux)
-    if test -r /opt/intel/compiler70/ia32/bin/iccvars.sh ; then
+    if test -r /opt/intel/cc/9.0/bin/iccvars.sh ; then
+        BOOST_JAM_TOOLSET_ROOT=/opt/intel/cc/9.0/
+    elif test -r /opt/intel_cc_80/bin/iccvars.sh ; then
+        BOOST_JAM_TOOLSET_ROOT=/opt/intel_cc_80/
+    elif test -r /opt/intel/compiler70/ia32/bin/iccvars.sh ; then
         BOOST_JAM_TOOLSET_ROOT=/opt/intel/compiler70/ia32/
     elif test -r /opt/intel/compiler60/ia32/bin/iccvars.sh ; then
         BOOST_JAM_TOOLSET_ROOT=/opt/intel/compiler60/ia32/
@@ -125,6 +147,17 @@
         BOOST_JAM_TOOLSET_ROOT=/opt/intel/compiler50/ia32/
     fi
     if test -r ${BOOST_JAM_TOOLSET_ROOT}bin/iccvars.sh ; then
+        # iccvars doesn't change LD_RUN_PATH. We adjust LD_RUN_PATH
+        # here in order not to have to rely on ld.so.conf knowing the
+        # icc library directory. We do this before running iccvars.sh
+        # in order to allow a user to add modifications to LD_RUN_PATH
+        # in iccvars.sh.
+        if test -z "${LD_RUN_PATH}"; then
+            LD_RUN_PATH="${BOOST_JAM_TOOLSET_ROOT}lib"
+        else
+            LD_RUN_PATH="${BOOST_JAM_TOOLSET_ROOT}lib:${LD_RUN_PATH}"
+        fi
+        export LD_RUN_PATH
         . ${BOOST_JAM_TOOLSET_ROOT}bin/iccvars.sh
     fi
     BOOST_JAM_CC=icc
@@ -151,11 +184,12 @@
     ;;
     
     sunpro)
-    if test -r /opt/SUNWspro/bin/cc ; then
+    if test -z "${BOOST_JAM_TOOLSET_ROOT}" -a -r /opt/SUNWspro/bin/cc ; then
         BOOST_JAM_TOOLSET_ROOT=/opt/SUNWspro/
     fi
-    if test -r $BOOST_JAM_TOOLSET_ROOTbin/cc ; then
-        export PATH=$BOOST_JAM_TOOLSET_ROOTbin:$PATH
+    if test -r "${BOOST_JAM_TOOLSET_ROOT}bin/cc" ; then
+        PATH=${BOOST_JAM_TOOLSET_ROOT}bin:${PATH}
+        export PATH
     fi
     BOOST_JAM_CC=cc
     ;;
@@ -176,6 +210,10 @@
     BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC $CFLAGS $LIBS"
     ;;
    
+    qcc)
+    BOOST_JAM_CC=qcc
+    ;;
+    
     *)
     error_exit "Unknown toolset: $BOOST_JAM_TOOLSET"
     ;;
@@ -188,14 +226,14 @@
 YYACC_SOURCES="yyacc.c"
 MKJAMBASE_SOURCES="mkjambase.c"
 BJAM_SOURCES="\
- command.c compile.c execnt.c execunix.c execvms.c expand.c\
- filent.c fileos2.c fileunix.c filevms.c glob.c hash.c\
+ command.c compile.c debug.c execunix.c expand.c fileunix.c glob.c hash.c\
  hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c\
  newstr.c option.c parse.c pathunix.c pathvms.c regexp.c\
  rules.c scan.c search.c subst.c timestamp.c variable.c modules.c\
- strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c\
- modules/path.c modules/regex.c modules/property-set.c\
- modules/sequence.c modules/order.c"
+ strings.c filesys.c builtins.c pwd.c class.c native.c w32_getreg.c\
+ modules/set.c modules/path.c modules/regex.c modules/property-set.c\
+ modules/sequence.c modules/order.c\
+ execnt.c filent.c"
 
 BJAM_UPDATE=
 if test "$1" = "--update" -o "$2" = "--update" -o "$3" = "--update" -o "$4" = "--update"  ; then

Modified: boost-jam/branches/upstream/current/builtins.c
===================================================================
--- boost-jam/branches/upstream/current/builtins.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/builtins.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -5,6 +5,7 @@
  */
 
 # include "jam.h"
+# include "debug.h"
 
 # include "lists.h"
 # include "parse.h"
@@ -51,7 +52,7 @@
 # define P0 (PARSE *)0
 # define C0 (char *)0
 
-# ifdef OS_NT
+# if defined( OS_NT ) || defined( OS_CYGWIN )
 LIST* builtin_system_registry( PARSE *parse, FRAME *frame );
 # endif
 
@@ -97,12 +98,16 @@
       bind_builtin( "ECHO" ,
                     builtin_echo, 0, 0 ) ) );
 
-    duplicate_rule( "exit" ,
-    duplicate_rule( "Exit" ,
-      bind_builtin( "EXIT" ,
-                    builtin_exit, 0, 0 ) ) );
 
     {
+        char * args[] = { "message", "*", ":", "result-value", "?", 0 };
+        duplicate_rule( "exit" ,
+        duplicate_rule( "Exit" ,
+          bind_builtin( "EXIT" ,
+                        builtin_exit, 0, args ) ) );
+    }
+
+    {
         char * args[] = { "directories", "*", ":", "patterns", "*", ":", "case-insensitive", "?", 0 };
         duplicate_rule(
             "Glob" ,
@@ -266,7 +271,7 @@
       }
 
       {
-          char * args[] = { "path", 0 };
+          char * args[] = { "path_parts", "*", 0 };
           bind_builtin( "NORMALIZE_PATH",
               builtin_normalize_path, 0, args );
       }
@@ -284,6 +289,13 @@
       }
 
       {
+          char * args[] = { "module", ":", "rule", ":", "version", 0 };
+          bind_builtin( "HAS_NATIVE_RULE",
+              builtin_has_native_rule, 0, args );
+      }
+
+
+      {
           char * args[] = { "module", "*", 0 };
           bind_builtin( "USER_MODULE",
               builtin_user_module, 0, args );
@@ -310,7 +322,7 @@
       }
 #endif
 
-# ifdef OS_NT
+# if defined( OS_NT ) || defined( OS_CYGWIN )
       {
           char * args[] = { "key_path", ":", "data", "?", 0 };
           bind_builtin( "W32_GETREG",
@@ -319,9 +331,11 @@
 # endif
 
       {
-          char * args[] = { "command", 0 };
+          char * args[] = { "command", ":", "*", 0 };
           bind_builtin( "SHELL",
               builtin_shell, 0, args );
+          bind_builtin( "COMMAND",
+              builtin_shell, 0, args );
       }
 
       /* Initialize builtin modules */
@@ -486,13 +500,20 @@
 
 LIST *
 builtin_exit(
-	PARSE	*parse,
-	FRAME *frame )
+    PARSE   *parse,
+    FRAME   *frame )
 {
-	list_print( lol_get( frame->args, 0 ) );
-	printf( "\n" );
-	exit( EXITBAD ); /* yeech */
-	return L0;
+    list_print( lol_get( frame->args, 0 ) );
+    printf( "\n" );
+    if ( lol_get( frame->args, 1 ) )
+    {
+        exit ( atoi( lol_get( frame->args, 1 )->string ) );
+    }
+    else
+    {
+        exit( EXITBAD ); /* yeech */
+    }
+    return L0;
 }
 
 /*
@@ -540,11 +561,13 @@
     int status,
     time_t  time )
 {
+    PROFILE_ENTER(BUILTIN_GLOB_BACK);
+    
     struct globbing *globbing = (struct globbing *)closure;
     LIST        *l;
     PATHNAME    f;
     string          buf[1];
-
+    
     /* Null out directory for matching. */
     /* We wish we had file_dirscan() pass up a PATHNAME. */
 
@@ -558,7 +581,10 @@
        "." and ".." won't work anywhere.
     */
     if (strcmp(f.f_base.ptr, ".") == 0 || strcmp(f.f_base.ptr, "..") == 0)
+    {
+        PROFILE_EXIT(BUILTIN_GLOB_BACK);
         return;
+    }
 
     string_new( buf );
     path_build( &f, buf, 0 );
@@ -577,6 +603,8 @@
     }
     
     string_free( buf );
+    
+    PROFILE_EXIT(BUILTIN_GLOB_BACK);
 }
 
 static LIST* downcase_list( LIST *in )
@@ -1256,7 +1284,7 @@
 
 LIST *builtin_normalize_path( PARSE *parse, FRAME *frame )
 {
-    LIST* arg1 = lol_get( frame->args, 0 );
+    LIST* arg = lol_get( frame->args, 0 );
 
     /* First, we iterate over all '/'-separated elements, starting from
        the end of string. If we see '..', we remove previous path elements.
@@ -1269,14 +1297,20 @@
     char* end;      /* Last character of the part of string still to be processed. */
     char* current;  /* Working pointer. */  
     int dotdots = 0; /* Number of '..' elements seen and not processed yet. */
-    int rooted = arg1->string[0] == '/';
+    int rooted = arg->string[0] == '/';
     char* result;
 
     /* Make a copy of input: we should not change it. */
     string_new(in);
     if (!rooted)
         string_push_back(in, '/');
-    string_append(in, arg1->string);
+    while (arg)
+    {
+        string_append(in, arg->string);
+        arg = list_next(arg);
+        if (arg)
+            string_append(in, "/");
+    }
     
 
     end = in->value + in->size - 1;
@@ -1368,6 +1402,26 @@
     return L0;    
 }
 
+LIST *builtin_has_native_rule( PARSE *parse, FRAME *frame )
+{
+    LIST* module_name = lol_get( frame->args, 0 );    
+    LIST* rule_name = lol_get( frame->args, 1 );    
+    LIST* version = lol_get( frame->args, 2 );    
+
+    module_t* module = bindmodule(module_name->string);
+
+    native_rule_t n, *np = &n;
+    n.name = rule_name->string;
+    if (module->native_rules && hashcheck(module->native_rules, (HASHDATA**)&np))
+    {
+        int expected_version = atoi(version->string);
+        if (np->version == expected_version)
+            return list_new(0, newstr("true"));
+    }
+    return L0;    
+}
+
+
 LIST *builtin_user_module( PARSE *parse, FRAME *frame )
 {
     LIST* module_name = lol_get( frame->args, 0 );    
@@ -1567,7 +1621,13 @@
                 {
                     /* PySequence_GetItem returns new reference. */
                     PyObject* e = PySequence_GetItem(a, i);
-                    l = list_new(l, newstr(PyString_AsString(e)));
+                    char* s = PyString_AsString(e);
+                    if (!s)
+                    {
+                        printf("Invalid parameter type passed from Python\n");
+                        exit(1);
+                    }
+                    l = list_new(l, newstr(s));
                     Py_DECREF(e);
                 }
                 lol_add(inner->args, l);
@@ -1578,6 +1638,8 @@
     result = evaluate_rule( rulename, inner );
 
     frame_free( inner );
+
+    return Py_None;
 }
 
 /** Accepts three arguments: module name, rule name and Python callable.
@@ -1620,31 +1682,64 @@
 
 LIST *builtin_shell( PARSE *parse, FRAME *frame )
 {
-    LIST* arg = lol_get( frame->args, 0 );
-    LIST* result = 0; 
+    LIST* command = lol_get( frame->args, 0 );
+    LIST* result = 0;
     string s;
     int ret;
     char buffer[1024];
     FILE *p = NULL;
+    int exit_status = -1;
+    int exit_status_opt = 0;
+    int no_output_opt = 0;
+    
+    /* Process the variable args options. */
+    {
+        int a = 1;
+        LIST * arg = lol_get( frame->args, a );
+        while ( arg )
+        {
+            if ( strcmp("exit-status", arg->string) == 0 )
+            {
+                exit_status_opt = 1;
+            }
+            else if ( strcmp("no-output", arg->string) == 0 )
+            {
+                no_output_opt = 1;
+            }
+            arg = lol_get( frame->args, ++a );
+        }
+    }
 
     string_new( &s );
 
     fflush(NULL);
 
-    p = popen(arg->string, "r");
+    p = popen(command->string, "r");
     if ( p == NULL )
         return L0;
 
     while ( (ret = fread(buffer, sizeof(char), sizeof(buffer)-1, p)) > 0 )
     {
-        buffer[ret+1] = 0;
-        string_append( &s, buffer );
+        buffer[ret] = 0;
+        if ( ! no_output_opt )
+        {
+            string_append( &s, buffer );
+        }
     }
 
-    pclose(p);
+    exit_status = pclose(p);
 
+    /* The command output is returned first. */
     result = list_new( L0, newstr(s.value) );
     string_free(&s);
+    
+    /* The command exit result next. */
+    if ( exit_status_opt )
+    {
+        sprintf (buffer, "%d", exit_status);
+        result = list_new( result, newstr( buffer ) );
+    }
+    
     return result;
 }
 

Modified: boost-jam/branches/upstream/current/builtins.h
===================================================================
--- boost-jam/branches/upstream/current/builtins.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/builtins.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -42,6 +42,7 @@
 LIST *builtin_sort( PARSE *parse, FRAME *frame );
 LIST *builtin_normalize_path( PARSE *parse, FRAME *frame );
 LIST *builtin_native_rule( PARSE *parse, FRAME *frame );
+LIST *builtin_has_native_rule( PARSE *parse, FRAME *frame );
 LIST *builtin_user_module( PARSE *parse, FRAME *frame );
 LIST *builtin_nearest_user_location( PARSE *parse, FRAME *frame );
 LIST *builtin_check_if_file( PARSE *parse, FRAME *frame );

Modified: boost-jam/branches/upstream/current/command.c
===================================================================
--- boost-jam/branches/upstream/current/command.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/command.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -20,6 +20,7 @@
 # include "parse.h"
 # include "variable.h"
 # include "rules.h"
+# include "debug.h"
 
 # include "command.h"
 # include <limits.h>
@@ -42,6 +43,9 @@
     int max_line = MAXLINE;
     int allocated = -1;
 
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( CMD ) );
+
     cmd->rule = rule;
     cmd->shell = shell;
     cmd->next = 0;
@@ -56,6 +60,9 @@
         free(cmd->buf); /* free any buffer from previous iteration */
         
         cmd->buf = (char*)malloc(max_line + 1);
+
+        if ( DEBUG_PROFILE )
+            profile_memory( max_line + 1 );
         
         if (cmd->buf == 0)
             break;

Modified: boost-jam/branches/upstream/current/compile.c
===================================================================
--- boost-jam/branches/upstream/current/compile.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/compile.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -11,6 +11,7 @@
  */
 
 # include "jam.h"
+# include "debug.h"
 
 # include "lists.h"
 # include "parse.h"
@@ -28,7 +29,6 @@
 # include "builtins.h"
 # include "class.h"
 
-# include <time.h>
 # include <assert.h>
 # include <string.h>
 # include <stdarg.h>
@@ -799,96 +799,6 @@
     return locals;
 }
 
-struct profile_info
-{
-    char* name;                 /* name of rule being called */
-    clock_t cumulative;         /* cumulative time spent in rule */
-    clock_t net;                /* time spent in rule proper */
-    unsigned long num_entries;  /* number of time rule was entered */
-    unsigned long stack_count;  /* number of the times this function is present in stack */
-};
-typedef struct profile_info profile_info;
-
-struct profile_frame
-{
-    profile_info* info;               /* permanent storage where data accumulates */
-    clock_t overhead;                 /* overhead for profiling in this call */
-    clock_t entry_time;               /* time of last entry to rule */
-    struct profile_frame* caller;     /* stack frame of caller */
-    clock_t subrules;                 /* time spent in subrules */
-};
-typedef struct profile_frame profile_frame;
-
-static profile_frame* profile_stack = 0;
-static struct hash* profile_hash = 0;
-
-static void profile_enter( char* rulename, profile_frame* frame )
-{
-    clock_t start = clock();
-    profile_info info, *p = &info;
-    
-    if ( !profile_hash )
-        profile_hash = hashinit(sizeof(profile_info), "profile");
-
-    info.name = rulename;
-    
-    if ( hashenter( profile_hash, (HASHDATA **)&p ) )
-        p->cumulative = p->net = p->num_entries = p->stack_count = 0;
-
-    ++(p->num_entries);
-    ++(p->stack_count);
-    
-    frame->info = p;
-    
-    frame->caller = profile_stack;
-    profile_stack = frame;
-
-    frame->entry_time = clock();
-    frame->overhead = 0;
-    frame->subrules = 0;
-
-    /* caller pays for the time it takes to play with the hash table */
-    if ( frame->caller )
-        frame->caller->overhead += frame->entry_time - start;
-}
-    
-static void profile_exit(profile_frame* frame)
-{
-    /* cumulative time for this call */
-    clock_t t = clock() - frame->entry_time - frame->overhead;
-    /* If this rule is already present on the stack, don't add the time for
-       this instance. */
-    if (frame->info->stack_count == 1)
-        frame->info->cumulative += t;
-    /* Net time does not depend on presense of the same rule in call stack. */
-    frame->info->net += t - frame->subrules;
-        
-    if (frame->caller)
-    {
-        /* caller's cumulative time must account for this overhead */
-        frame->caller->overhead += frame->overhead;
-        frame->caller->subrules += t;
-    }
-    /* pop this stack frame */
-    --frame->info->stack_count;
-    profile_stack = frame->caller;
-}
-
-static void dump_profile_entry(void* p_, void* ignored)
-{
-    profile_info* p = (profile_info*)p_;
-    printf("%10d %10d %10d %s\n", p->cumulative, p->net, p->num_entries, p->name);
-}
-
-void profile_dump()
-{
-    if ( profile_hash )
-    {
-        printf("%10s %10s %10s %s\n", "gross", "net", "# entries", "name");
-        hashenumerate( profile_hash, dump_profile_entry, 0 );
-    }
-}
-
 static int python_instance_number = 0;
 
 RULE *
@@ -1100,6 +1010,9 @@
         action = (ACTION *)malloc( sizeof( ACTION ) );
         memset( (char *)action, '\0', sizeof( *action ) );
 
+        if ( DEBUG_PROFILE )
+            profile_memory( sizeof( ACTION ) );
+
         action->rule = rule;
         action->targets = targetlist( (TARGETS *)0, lol_get( frame->args, 0 ) );
         action->sources = targetlist( (TARGETS *)0, lol_get( frame->args, 1 ) );

Modified: boost-jam/branches/upstream/current/compile.h
===================================================================
--- boost-jam/branches/upstream/current/compile.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/compile.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -48,8 +48,6 @@
 
 regexp* regex_compile( const char* pattern );
 
-void profile_dump();
-
 /* Flags for compile_set(), etc */
 
 # define ASSIGN_SET	0x00	/* = assign variable */

Modified: boost-jam/branches/upstream/current/debian/changelog
===================================================================
--- boost-jam/branches/upstream/current/debian/changelog	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/debian/changelog	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,3 +1,9 @@
+bjam (3.1.12-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Rene Rivera <grafik at redshift-software.com>  Sat, 01 Oct 2005 00:00:00 +0000
+
 bjam (3.1.11-1) unstable; urgency=low
 
   * New upstream release.

Modified: boost-jam/branches/upstream/current/debian/copyright
===================================================================
--- boost-jam/branches/upstream/current/debian/copyright	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/debian/copyright	2006-11-07 14:20:16 UTC (rev 14010)
@@ -17,8 +17,9 @@
 
 Some portions are also:
 
-    Copyright 2001-2004 David Abrahams.
-    Copyright 2002-2005 Rene Rivera.
+    Copyright 2001-2006 David Abrahams.
+    Copyright 2002-2006 Rene Rivera.
+    Copyright 2003-2006 Vladimir Prus.
     
     Distributed under the Boost Software License, Version 1.0.
     (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

Added: boost-jam/branches/upstream/current/debug.c
===================================================================
--- boost-jam/branches/upstream/current/debug.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/debug.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,127 @@
+/*
+    Copyright Rene Rivera 2005.
+    Distributed under the Boost Software License, Version 1.0.
+    (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+# include "jam.h"
+# include "debug.h"
+
+# include "hash.h"
+
+# include <time.h>
+# include <assert.h>
+
+static profile_frame* profile_stack = 0;
+static struct hash* profile_hash = 0;
+static profile_info profile_other = { "[OTHER]", 0, 0, 0, 0, 0 };
+static profile_info profile_total = { "[TOTAL]", 0, 0, 0, 0, 0 };
+
+profile_frame* profile_init( char* rulename, profile_frame* frame )
+{
+    if ( DEBUG_PROFILE ) profile_enter(rulename,frame);
+    return frame;
+}
+
+void profile_enter( char* rulename, profile_frame* frame )
+{
+    if ( DEBUG_PROFILE )
+    {
+        clock_t start = clock();
+        profile_info info, *p = &info;
+
+        if ( !rulename ) p = &profile_other;
+
+        if ( !profile_hash )
+        {
+            if ( rulename ) profile_hash = hashinit(sizeof(profile_info), "profile");
+        }
+
+        info.name = rulename;
+
+        if ( rulename && hashenter( profile_hash, (HASHDATA **)&p ) )
+            p->cumulative = p->net = p->num_entries = p->stack_count = p->memory = 0;
+
+        ++(p->num_entries);
+        ++(p->stack_count);
+
+        frame->info = p;
+
+        frame->caller = profile_stack;
+        profile_stack = frame;
+
+        frame->entry_time = clock();
+        frame->overhead = 0;
+        frame->subrules = 0;
+
+        /* caller pays for the time it takes to play with the hash table */
+        if ( frame->caller )
+            frame->caller->overhead += frame->entry_time - start;
+    }
+}
+
+void profile_memory( long mem )
+{
+    if ( DEBUG_PROFILE )
+    {
+        if ( profile_stack && profile_stack->info )
+        {
+            profile_stack->info->memory += mem;
+        }
+    }
+}
+    
+void profile_exit(profile_frame* frame)
+{
+    if ( DEBUG_PROFILE )
+    {
+        /* cumulative time for this call */
+        clock_t t = clock() - frame->entry_time - frame->overhead;
+        /* If this rule is already present on the stack, don't add the time for
+           this instance. */
+        if (frame->info->stack_count == 1)
+            frame->info->cumulative += t;
+        /* Net time does not depend on presense of the same rule in call stack. */
+        frame->info->net += t - frame->subrules;
+
+        if (frame->caller)
+        {
+            /* caller's cumulative time must account for this overhead */
+            frame->caller->overhead += frame->overhead;
+            frame->caller->subrules += t;
+        }
+        /* pop this stack frame */
+        --frame->info->stack_count;
+        profile_stack = frame->caller;
+    }
+}
+
+static void dump_profile_entry(void* p_, void* ignored)
+{
+    profile_info* p = (profile_info*)p_;
+    unsigned long mem_each = (p->memory/(p->num_entries ? p->num_entries : 1));
+    double q = p->net; q /= (p->num_entries ? p->num_entries : 1);
+    if (!ignored)
+    {
+        profile_total.cumulative += p->net;
+        profile_total.memory += p->memory;
+    }
+    printf("%10d %10d %10d %12.6f %10d %10d %s\n",
+        p->num_entries, p->cumulative, p->net, q,
+        p->memory, mem_each,
+        p->name);
+}
+
+void profile_dump()
+{
+    if ( profile_hash )
+    {
+        printf("%10s %10s %10s %12s %10s %10s %s\n",
+            "--count--", "--gross--", "--net--", "--each--",
+            "--mem--", "--each--",
+            "--name--");
+        hashenumerate( profile_hash, dump_profile_entry, 0 );
+        dump_profile_entry(&profile_other,0);
+        dump_profile_entry(&profile_total,(void*)1);
+    }
+}

Added: boost-jam/branches/upstream/current/debug.h
===================================================================
--- boost-jam/branches/upstream/current/debug.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/debug.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,53 @@
+/*
+    Copyright Rene Rivera 2005.
+    Distributed under the Boost Software License, Version 1.0.
+    (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BJAM_DEBUG_H
+#define BJAM_DEBUG_H
+
+# include "jam.h"
+# include <time.h>
+
+struct profile_info
+{
+    /* name of rule being called */
+    char* name;
+    /* cumulative time spent in rule */
+    clock_t cumulative;
+    /* time spent in rule proper */
+    clock_t net;
+    /* number of time rule was entered */
+    unsigned long num_entries;
+    /* number of the times this function is present in stack */
+    unsigned long stack_count;
+    /* bytes of memory allocated by the call */
+    unsigned long memory;
+};
+typedef struct profile_info profile_info;
+
+struct profile_frame
+{
+    /* permanent storage where data accumulates */
+    profile_info* info;
+    /* overhead for profiling in this call */
+    clock_t overhead;
+    /* time of last entry to rule */
+    clock_t entry_time;
+    /* stack frame of caller */
+    struct profile_frame* caller;
+    /* time spent in subrules */
+    clock_t subrules;
+};
+typedef struct profile_frame profile_frame;
+
+profile_frame * profile_init( char* rulename, profile_frame* frame );
+void profile_enter( char* rulename, profile_frame* frame );
+void profile_memory( long mem );
+void profile_exit(profile_frame* frame);
+void profile_dump();
+
+#define PROFILE_ENTER(scope) profile_frame PROF_ ## scope, *PROF_ ## scope ## _p = profile_init(#scope,&PROF_ ## scope)
+#define PROFILE_EXIT(scope) profile_exit(PROF_ ## scope ## _p)
+
+#endif

Modified: boost-jam/branches/upstream/current/execnt.c
===================================================================
--- boost-jam/branches/upstream/current/execnt.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/execnt.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -13,6 +13,8 @@
 # include "jam.h"
 # include "lists.h"
 # include "execcmd.h"
+# include "pathsys.h"
+# include "debug.h"
 # include <errno.h>
 # include <assert.h>
 # include <ctype.h>
@@ -23,6 +25,9 @@
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>		/* do the ugly deed */
 # include <process.h>
+# if !defined( __BORLANDC__ )
+# include <tlhelp32.h>
+# endif
 
 # if !defined( __BORLANDC__ ) && !defined( OS_OS2 )
 # define wait my_wait
@@ -149,6 +154,9 @@
     if (!line)
         return 0;
 
+    if ( DEBUG_PROFILE )
+        profile_memory( src_len+1 );
+
     /* allocate the argv array.
      *   element 0: stores the path to the executable
      *   element 1: stores the command-line arguments to the executable
@@ -160,6 +168,9 @@
         free( line );
         return 0;
     }
+
+    if ( DEBUG_PROFILE )
+        profile_memory( 3 * sizeof(char*) );
     
     /* Strip quotes from the first command-line argument and find
      * where it ends.  Quotes are illegal in Win32 pathnames, so we
@@ -279,6 +290,8 @@
               line = (char*)malloc( len+4+1 );
               if (!line)
                 return 1;
+              if ( DEBUG_PROFILE )
+                  profile_memory( len+4+1 );
                 
               strncpy( line, "del ", 4 );
               strncpy( line+4, q, len );
@@ -428,34 +441,6 @@
 #endif 
 }
 
-/* SVA - handle temp dirs with spaces in the path */
-static const char *getTempDir(void)
-{
-    static char tempPath[_MAX_PATH];
-    static char *pTempPath=NULL;
-
-    if(pTempPath == NULL)
-    {
-        char *p;
-
-        p = getenv("TEMP");
-        if(p == NULL)
-        {
-            p = getenv("TMP");
-        }
-        if(p == NULL)
-        {
-            pTempPath = "\\temp";
-        }
-        else
-        {
-            GetShortPathName(p, tempPath, _MAX_PATH);
-            pTempPath = tempPath;
-        }
-    }
-    return pTempPath;
-}
-
 /* 64-bit arithmetic helpers */
 
 /* Compute the carry bit from the addition of two 32-bit unsigned numbers */
@@ -565,16 +550,14 @@
   
     if( !cmdtab[ slot ].tempfile )
     {
-        const char *tempdir;
-        DWORD procID;
-
-        tempdir = getTempDir();
+        const char *tempdir = path_tmpdir();
+        DWORD procID = GetCurrentProcessId();
   
         /* SVA - allocate 64 other just to be safe */
         cmdtab[ slot ].tempfile = malloc( strlen( tempdir ) + 64 );
+        if ( DEBUG_PROFILE )
+            profile_memory( strlen( tempdir ) + 64 );
   
-        procID = GetCurrentProcessId();
-  
         sprintf( cmdtab[ slot ].tempfile, "%s\\jam%d-%02d.bat", 
                  tempdir, procID, slot );		
     }
@@ -594,11 +577,20 @@
     }
     else
     {
-        FILE *f;
+        FILE *f = 0;
+        int tries = 0;
         raw_cmd = 0;
         
-        /* Write command to bat file. */
-        f = fopen( cmdtab[ slot ].tempfile, "w" );
+        /* Write command to bat file. For some reason this open can
+           fails intermitently. But doing some retries works. Most likely
+           this is due to a previously existing file of the same name that
+           happens to be opened by an active virus scanner. Pointed out,
+           and fix by Bronek Kozicki. */
+        for (; !f && tries < 4; ++tries)
+        {
+            f = fopen( cmdtab[ slot ].tempfile, "w" );
+            if ( !f && tries < 4 ) Sleep( 250 );
+        }
         if (!f)
         {
             printf( "failed to write command file!\n" );
@@ -905,6 +897,168 @@
     return result;
 }
 
+static double
+running_time(HANDLE process)
+{
+    FILETIME creation, exit, kernel, user, current;
+    if (GetProcessTimes(process, &creation, &exit, &kernel, &user))
+    {
+        /* Compute the elapsed time */
+        GetSystemTimeAsFileTime(&current);
+        {
+            double delta = filetime_seconds(
+                add_FILETIME( current, negate_FILETIME(creation) )
+                );
+            return delta;
+        }
+    }
+    return 0.0;
+}
+
+/* it's just stupidly silly that one has to do this! */
+typedef struct PROCESS_BASIC_INFORMATION__ {
+    LONG ExitStatus;
+    PVOID PebBaseAddress;
+    ULONG AffinityMask;
+    LONG BasePriority;
+    ULONG UniqueProcessId;
+    ULONG InheritedFromUniqueProcessId;
+    } PROCESS_BASIC_INFORMATION_;
+typedef LONG (__stdcall * NtQueryInformationProcess__)(
+    HANDLE ProcessHandle,
+    LONG ProcessInformationClass,
+    PVOID ProcessInformation,
+    ULONG ProcessInformationLength,
+    PULONG ReturnLength);
+static NtQueryInformationProcess__ NtQueryInformationProcess_ = NULL;
+static HMODULE NTDLL_ = NULL;
+DWORD get_process_id(HANDLE process)
+{
+    PROCESS_BASIC_INFORMATION_ pinfo;
+    if ( ! NtQueryInformationProcess_ )
+    {
+        if ( ! NTDLL_ )
+        {
+            NTDLL_ = GetModuleHandleA("ntdll");
+        }
+        if ( NTDLL_ )
+        {
+            NtQueryInformationProcess_
+                = (NtQueryInformationProcess__)GetProcAddress( NTDLL_,"NtQueryInformationProcess" );
+        }
+    }
+    if ( NtQueryInformationProcess_ )
+    {
+        LONG r = (*NtQueryInformationProcess_)(
+            process,/* ProcessBasicInformation == */ 0,&pinfo,sizeof(PROCESS_BASIC_INFORMATION_),NULL);
+        return pinfo.UniqueProcessId;
+    }
+    else
+    {
+        return 0;
+    }
+}
+
+/* not really optimal, or efficient, but it's easier this way, and it's not
+like we are going to be killing thousands, or even tens or processes. */
+static void
+kill_all(DWORD pid, HANDLE process)
+{
+    HANDLE process_snapshot_h = INVALID_HANDLE_VALUE;
+    if ( !pid )
+    {
+        pid = get_process_id(process);
+    }
+    process_snapshot_h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
+    
+    if (INVALID_HANDLE_VALUE != process_snapshot_h)
+    {
+        BOOL ok = TRUE;
+        PROCESSENTRY32 pinfo;
+        pinfo.dwSize = sizeof(PROCESSENTRY32);
+        for (
+            ok = Process32First(process_snapshot_h,&pinfo);
+            TRUE == ok;
+            ok = Process32Next(process_snapshot_h,&pinfo) )
+        {
+            if (pinfo.th32ParentProcessID == pid)
+            {
+                /* found a child, recurse to kill it and anything else below it */
+                HANDLE ph = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pinfo.th32ProcessID);
+                if (NULL != ph)
+                {
+                    kill_all(pinfo.th32ProcessID,ph);
+                    CloseHandle(ph);
+                }
+            }
+        }
+        CloseHandle(process_snapshot_h);
+    }
+    /* now that the children are all dead, kill the root */
+    TerminateProcess(process,-2);
+}
+
+int is_parent_child(DWORD parent, DWORD child)
+{
+    HANDLE process_snapshot_h = INVALID_HANDLE_VALUE;
+
+    if (parent == child)
+        return 1;
+
+    process_snapshot_h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
+    if (INVALID_HANDLE_VALUE != process_snapshot_h)
+    {
+        BOOL ok = TRUE;
+        PROCESSENTRY32 pinfo;
+        pinfo.dwSize = sizeof(PROCESSENTRY32);
+        for (
+            ok = Process32First(process_snapshot_h, &pinfo); 
+            ok == TRUE; 
+            ok = Process32Next(process_snapshot_h, &pinfo) )
+        {
+            if (pinfo.th32ProcessID == child && pinfo.th32ParentProcessID)
+                return is_parent_child(parent, pinfo.th32ParentProcessID);
+        }
+
+        CloseHandle(process_snapshot_h);
+    }
+
+    return 0;
+}
+
+int related(HANDLE h, DWORD p)
+{
+    return is_parent_child(get_process_id(h), p);
+}
+
+BOOL CALLBACK window_enum(HWND hwnd, LPARAM lParam)
+{
+    char buf[10] = {0};
+    HANDLE h = *((HANDLE*) (lParam));
+    DWORD pid = 0;
+
+    if (!GetClassNameA(hwnd, buf, 10))
+        return TRUE; // failed to read class name
+
+    if (strcmp(buf, "#32770"))
+        return TRUE; // not a dialog
+
+    GetWindowThreadProcessId(hwnd, &pid);
+    if (related(h, pid))
+    {
+        PostMessage(hwnd, WM_QUIT, 0, 0);
+        // just one window at a time
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+void close_alert(HANDLE process)
+{
+    EnumWindows(&window_enum, (LPARAM) &process);
+}
+
 static int
 my_wait( int *status )
 {
@@ -938,10 +1092,38 @@
 	    return -1;
 	}
     
-	waitcode = WaitForMultipleObjects( num_active,
-                                       active_handles,
-                                       FALSE,
-                                       INFINITE );
+    if ( globs.timeout > 0 )
+    {
+        /* with a timeout we wait for a finish or a timeout, we check every second
+         to see if something timed out */
+        for (waitcode = WAIT_TIMEOUT; waitcode == WAIT_TIMEOUT;)
+        {
+            waitcode = WaitForMultipleObjects( num_active, active_handles, FALSE, 1*1000 /* 1 second */ );
+            if ( waitcode == WAIT_TIMEOUT )
+            {
+                /* check if any jobs have surpassed the maximum run time. */
+                for ( i = 0; i < num_active; ++i )
+                {
+                    double t = running_time(active_handles[i]);
+                    if ( t > (double)globs.timeout )
+                    {
+                        /* the job may have left an alert dialog around,
+                         try and get rid of it before killing */
+                        close_alert(active_handles[i]);
+                        /* we have a "runaway" job, kill it */
+                        kill_all(0,active_handles[i]);
+                        /* indicate the job "finished" so we query its status below */
+                        waitcode = WAIT_ABANDONED_0+i;
+                    }
+                }
+            }
+        }
+    }
+    else
+    {
+        /* no timeout, so just wait indefinately for something to finish */
+        waitcode = WaitForMultipleObjects( num_active, active_handles, FALSE, INFINITE );
+    }
 	if ( waitcode != WAIT_FAILED )
     {
 	    if ( waitcode >= WAIT_ABANDONED_0

Modified: boost-jam/branches/upstream/current/execunix.c
===================================================================
--- boost-jam/branches/upstream/current/execunix.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/execunix.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -9,9 +9,9 @@
 # include "execcmd.h"
 # include <errno.h>
 # include <time.h>
+# include <unistd.h> /* needed for vfork(), _exit() prototypes */
 
-#if defined(sun) || defined(__sun)
-#include <unistd.h> /* need to include unistd.h on sun for the vfork prototype*/
+#if defined(sun) || defined(__sun) || defined(linux)
 #include <wait.h>
 #endif
 
@@ -255,7 +255,11 @@
 	static HANDLE *active_handles = 0;
 
 	if (!active_handles)
+    {
 	    active_handles = (HANDLE *)malloc(globs.jobs * sizeof(HANDLE) );
+        if ( DEBUG_PROFILE )
+            profile_memory( globs.jobs * sizeof(HANDLE) );
+    }
 
 	/* first see if any non-waited-for processes are dead,
 	 * and return if so.

Modified: boost-jam/branches/upstream/current/expand.c
===================================================================
--- boost-jam/branches/upstream/current/expand.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/expand.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -15,6 +15,7 @@
 # ifdef OS_CYGWIN
 #  include <sys/cygwin.h>
 #  include <windows.h>
+#  include <stdlib.h>
 # endif
 
 /*
@@ -681,11 +682,18 @@
     char axyb[] = "a$(xy)b";
     char azb[] = "a$($(z))b";
     char path[] = "$(p:W)";
+    
+    # ifdef OS_CYGWIN
+    char cygpath[256];
+    cygwin_conv_to_posix_path("c:\\foo\\bar", cygpath);
+    # else
+    char cygpath[] = "/cygdrive/c/foo/bar";
+    # endif
         
     lol_init(lol);
     var_set("xy", list_new( list_new( L0, newstr( "x" ) ), newstr( "y" ) ), VAR_SET );
     var_set("z", list_new( L0, newstr( "xy" ) ), VAR_SET );
-    var_set("p", list_new( L0, newstr( "/cygdrive/c/foo/bar" ) ), VAR_SET );
+    var_set("p", list_new( L0, newstr( cygpath ) ), VAR_SET );
 
     l = var_expand( 0, axyb, axyb + sizeof(axyb) - 1, lol, 0 );
     for ( l2 = l, e2 = expected; l2 && e2; l2 = list_next(l2), e2 = list_next(e2) )
@@ -702,11 +710,11 @@
     l = var_expand( 0, path, path + sizeof(path) - 1, lol, 0 );
     assert(l != 0);
     assert(list_next(l) == 0);
-# ifdef OS_CYGWIN
+    # ifdef OS_CYGWIN
     assert( !strcmp( l->string, "c:\\foo\\bar" ) );
-# else 
-    assert( !strcmp( l->string, "/cygdrive/c/foo/bar" ) );
-# endif   
+    # else 
+    assert( !strcmp( l->string, cygpath ) );
+    # endif   
     list_free(l);
 
     list_free(expected);

Modified: boost-jam/branches/upstream/current/filent.c
===================================================================
--- boost-jam/branches/upstream/current/filent.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/filent.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -6,14 +6,18 @@
 
 /*  This file is ALSO:
  *  Copyright 2001-2004 David Abrahams.
+ *  Copyright 2005 Rene Rivera.
  *  Distributed under the Boost Software License, Version 1.0.
  *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  */
 
 # include "jam.h"
+# include "debug.h"
+
 # include "filesys.h"
 # include "pathsys.h"
 # include "strings.h"
+# include "newstr.h"
 
 # ifdef OS_NT
 
@@ -59,89 +63,152 @@
 	scanback func,
 	void *closure )
 {
-    PATHNAME f;
-    string filespec[1];
-    string filename[1];
-    long handle;
-    int ret;
-    struct _finddata_t finfo[1];
+    PROFILE_ENTER(FILE_DIRSCAN);
+    
+    file_info_t * d = 0;
 
     dir = short_path_to_long_path( dir );
 
     /* First enter directory itself */
 
-    memset( (char *)&f, '\0', sizeof( f ) );
+    d = file_query( dir );
+    
+    if ( ! d || ! d->is_dir )
+    {
+        PROFILE_EXIT(FILE_DIRSCAN);
+        return;
+    }
 
-    f.f_dir.ptr = dir;
-    f.f_dir.len = strlen(dir);
+    if ( ! d->files )
+    {
+        PATHNAME f;
+        string filespec[1];
+        string filename[1];
+        long handle;
+        int ret;
+        struct _finddata_t finfo[1];
+        LIST* files = L0;
 
-    dir = *dir ? dir : ".";
+        memset( (char *)&f, '\0', sizeof( f ) );
+        
+        f.f_dir.ptr = d->name;
+        f.f_dir.len = strlen(d->name);
+        
+        /* Now enter contents of directory */
 
-    /* Special case \ or d:\ : enter it */
+        string_copy( filespec, *d->name ? d->name : "." );
+        string_append( filespec, "/*" );
 
-    if( f.f_dir.len == 1 && f.f_dir.ptr[0] == '\\' )
-        (*func)( closure, dir, 0 /* not stat()'ed */, (time_t)0 );
-    else if( f.f_dir.len == 3 && f.f_dir.ptr[1] == ':' )
-        (*func)( closure, dir, 0 /* not stat()'ed */, (time_t)0 );
+        if( DEBUG_BINDSCAN )
+            printf( "scan directory %s\n", dir );
 
-    /* Now enter contents of directory */
+        # if defined(__BORLANDC__) && __BORLANDC__ < 0x550
+        if ( ret = findfirst( filespec->value, finfo, FA_NORMAL | FA_DIREC ) )
+        {
+            string_free( filespec );
+            PROFILE_EXIT(FILE_DIRSCAN);
+            return;
+        }
 
-    string_copy( filespec, dir );
-    string_append( filespec, "/*" );
+        string_new( filename );
+        while( !ret )
+        {
+            file_info_t * ff = 0;
+            
+            f.f_base.ptr = finfo->ff_name;
+            f.f_base.len = strlen( finfo->ff_name );
 
-    if( DEBUG_BINDSCAN )
-        printf( "scan directory %s\n", dir );
+            string_truncate( filename, 0 );
+            path_build( &f, filename );
 
-# if defined(__BORLANDC__) && __BORLANDC__ < 0x550
-    if ( ret = findfirst( filespec->value, finfo, FA_NORMAL | FA_DIREC ) )
-    {
-        string_free( filespec );
-        return;
-    }
+            files = list_new( files, newstr(filename->value) );
+            ff = file_info( filename->value );
+            ff->is_file = finfo->ff_attrib & FA_DIREC ? 0 : 1;
+            ff->is_dir = finfo->ff_attrib & FA_DIREC ? 1 : 0;
+            ff->size = finfo->ff_fsize;
+            ff->time = (finfo->ff_ftime << 16) | finfo->ff_ftime;
 
-    string_new( filename );
-    while( !ret )
-    {
-        time_t time_write = finfo->ff_fdate;
+            ret = findnext( finfo );
+        }
+        # else
+        handle = _findfirst( filespec->value, finfo );
 
-        time_write = (time_write << 16) | finfo->ff_ftime;
-        f.f_base.ptr = finfo->ff_name;
-        f.f_base.len = strlen( finfo->ff_name );
+        if( ret = ( handle < 0L ) )
+        {
+            string_free( filespec );
+            PROFILE_EXIT(FILE_DIRSCAN);
+            return;
+        }
 
-        string_truncate( filename, 0 );
-        path_build( &f, filename );
+        string_new( filename );
+        while( !ret )
+        {
+            file_info_t * ff = 0;
 
-        (*func)( closure, filename->value, 1 /* stat()'ed */, time_write );
+            f.f_base.ptr = finfo->name;
+            f.f_base.len = strlen( finfo->name );
 
-        ret = findnext( finfo );
+            string_truncate( filename, 0 );
+            path_build( &f, filename, 0 );
+
+            files = list_new( files, newstr(filename->value) );
+            ff = file_info( filename->value );
+            ff->is_file = finfo->attrib & _A_SUBDIR ? 0 : 1;
+            ff->is_dir = finfo->attrib & _A_SUBDIR ? 1 : 0;
+            ff->size = finfo->size;
+            ff->time = finfo->time_write;
+
+            ret = _findnext( handle, finfo );
+        }
+
+        _findclose( handle );
+        # endif
+        string_free( filename );
+        string_free( filespec );
+    
+        d->files = files;
     }
-# else
-    handle = _findfirst( filespec->value, finfo );
 
-    if( ret = ( handle < 0L ) )
+    /* Special case \ or d:\ : enter it */
     {
-        string_free( filespec );
-        return;
+        unsigned long len = strlen(d->name);
+        if( len == 1 && d->name[0] == '\\' )
+            (*func)( closure, d->name, 1 /* stat()'ed */, d->time );
+        else if( len == 3 && d->name[1] == ':' )
+            (*func)( closure, d->name, 1 /* stat()'ed */, d->time );
     }
 
-    string_new( filename );
-    while( !ret )
+    /* Now enter contents of directory */
+    if ( d->files )
     {
-        f.f_base.ptr = finfo->name;
-        f.f_base.len = strlen( finfo->name );
+        LIST * files = d->files;
+        while ( files )
+        {
+            file_info_t * ff = file_info( files->string );
+            (*func)( closure, ff->name, 1 /* stat()'ed */, ff->time );
+            files = list_next( files );
+        }
+    }
+    
+    PROFILE_EXIT(FILE_DIRSCAN);
+}
 
-        string_truncate( filename, 0 );
-        path_build( &f, filename, 0 );
+file_info_t * file_query( char * filename )
+{
+    file_info_t * ff = file_info( filename );
+    if ( ! ff->time )
+    {
+        struct stat statbuf;
 
-        (*func)( closure, filename->value, 1 /* stat()'ed */, finfo->time_write );
+        if( stat( *filename ? filename : ".", &statbuf ) < 0 )
+            return 0;
 
-        ret = _findnext( handle, finfo );
+        ff->is_file = statbuf.st_mode & S_IFREG ? 1 : 0;
+        ff->is_dir = statbuf.st_mode & S_IFDIR ? 1 : 0;
+        ff->size = statbuf.st_size;
+        ff->time = statbuf.st_mtime ? statbuf.st_mtime : 1;
     }
-
-    _findclose( handle );
-# endif
-    string_free( filename );
-    string_free( filespec );
+    return ff;
 }
 
 /*
@@ -153,29 +220,17 @@
 	char	*filename,
 	time_t	*time )
 {
-	/* On NT this is called only for C:/ */
-
-	struct stat statbuf;
-
-	if( stat( filename, &statbuf ) < 0 )
-	    return -1;
-
-	*time = statbuf.st_mtime;
-
-	return 0;
+    file_info_t * ff = file_query( filename );
+    if ( !ff ) return -1;
+    *time = ff->time;
+    return 0;
 }
 
 int file_is_file(char* filename)
 {
-	struct stat statbuf;
-
-	if( stat( filename, &statbuf ) < 0 )
-	    return -1;
-
-    if (statbuf.st_mode & S_IFREG) 
-        return 1;
-    else
-        return 0;    
+    file_info_t * ff = file_query( filename );
+    if ( !ff ) return -1;
+    return ff->is_file;
 }
 
 
@@ -252,6 +307,8 @@
 		*/
 
 		string_table = malloc(lar_size+1);
+        if ( DEBUG_PROFILE )
+            profile_memory( lar_size+1 );
 		if (read(fd, string_table, lar_size) != lar_size)
 		    printf("error reading string table\n");
 		string_table[lar_size] = '\0';

Modified: boost-jam/branches/upstream/current/filesys.c
===================================================================
--- boost-jam/branches/upstream/current/filesys.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/filesys.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,6 +1,9 @@
 # include "jam.h"
 # include "pathsys.h"
 # include "strings.h"
+# include "newstr.h"
+# include "filesys.h"
+# include "lists.h"
 
 void
 file_build1(
@@ -31,3 +34,51 @@
             string_push_back( file, '>' );
     }
 }
+
+static struct hash * filecache_hash = 0;
+
+file_info_t * file_info(char * filename)
+{
+    file_info_t finfo_, *finfo = &finfo_;
+    
+    if ( !filecache_hash )
+        filecache_hash = hashinit( sizeof( file_info_t ), "file_info" );
+    
+    finfo->name = filename;
+    if ( hashenter( filecache_hash, (HASHDATA**)&finfo ) )
+    {
+        /* printf( "file_info: %s\n", filename ); */
+        finfo->name = newstr( finfo->name );
+        finfo->is_file = 0;
+        finfo->is_dir = 0;
+        finfo->size = 0;
+        finfo->time = 0;
+        finfo->files = 0;
+    }
+    
+    return finfo;
+}
+
+static LIST * files_to_remove = L0;
+
+static void remove_files_atexit(void)
+{
+    /* we do pop front in case this exit function is called
+       more than once */
+    while ( files_to_remove )
+    {
+        remove( files_to_remove->string );
+        files_to_remove = list_pop_front( files_to_remove );
+    }
+}
+
+void file_done()
+{
+    remove_files_atexit();
+    hashdone( filecache_hash );
+}
+
+void file_remove_atexit( const char * path )
+{
+    files_to_remove = list_new( files_to_remove, newstr((char*)path) );
+}

Modified: boost-jam/branches/upstream/current/filesys.h
===================================================================
--- boost-jam/branches/upstream/current/filesys.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/filesys.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -18,6 +18,8 @@
 # define FILESYS_DWA20011025_H
 
 # include "pathsys.h"
+#include "hash.h"
+#include "lists.h"
 
 typedef void (*scanback)( void *closure, char *file, int found, time_t t );
 
@@ -29,4 +31,24 @@
 void file_build1(PATHNAME *f, string* file) ;
 int file_is_file(char* filename);
 
+struct file_info_t {
+    char * name;
+    short is_file;
+    short is_dir;
+    unsigned long size;
+    time_t time;
+    LIST * files;
+} ;
+typedef struct file_info_t file_info_t ;
+
+file_info_t * file_info(char * filename);
+
+file_info_t * file_query(char * filename);
+
+void file_done();
+
+/** Marks a path/file to be removed when jam exits.
+*/
+void file_remove_atexit( const char * path );
+
 #endif

Modified: boost-jam/branches/upstream/current/fileunix.c
===================================================================
--- boost-jam/branches/upstream/current/fileunix.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/fileunix.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -6,17 +6,20 @@
 
 /*  This file is ALSO:
  *  Copyright 2001-2004 David Abrahams.
+ *  Copyright 2005 Rene Rivera.
  *  Distributed under the Boost Software License, Version 1.0.
  *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  */
 
 # include "jam.h"
+# include "debug.h"
 # include "filesys.h"
 # include "strings.h"
 # include "pathsys.h"
+# include "newstr.h"
 # include <stdio.h>
 
-#if defined(sun) || defined(__sun)
+#if defined(sun) || defined(__sun) || defined(linux)
 # include <unistd.h> /* needed for read and close prototype */
 #endif
 
@@ -127,54 +130,112 @@
 	scanback func,
 	void *closure )
 {
-	PATHNAME f;
-	DIR *d;
-	STRUCT_DIRENT *dirent;
-        string filename[1];
+    PROFILE_ENTER(FILE_DIRSCAN);
+    
+    file_info_t * d = 0;
 
-	/* First enter directory itself */
+    d = file_query( dir );
+    
+    if ( ! d || ! d->is_dir )
+    {
+        PROFILE_EXIT(FILE_DIRSCAN);
+        return;
+    }
 
-	memset( (char *)&f, '\0', sizeof( f ) );
+    if ( ! d->files )
+    {
+        LIST* files = L0;
+        PATHNAME f;
+        DIR *dd;
+        STRUCT_DIRENT *dirent;
+        string filename[1];
 
-	f.f_dir.ptr = dir;
-	f.f_dir.len = strlen(dir);
+        /* First enter directory itself */
 
-	dir = *dir ? dir : ".";
+        memset( (char *)&f, '\0', sizeof( f ) );
 
-	/* Special case / : enter it */
+        f.f_dir.ptr = dir;
+        f.f_dir.len = strlen(dir);
 
-	if( f.f_dir.len == 1 && f.f_dir.ptr[0] == '/' )
-	    (*func)( closure, dir, 0 /* not stat()'ed */, (time_t)0 );
+        dir = *dir ? dir : ".";
 
-	/* Now enter contents of directory */
+        /* Now enter contents of directory */
 
-	if( !( d = opendir( dir ) ) )
-	    return;
+        if( !( dd = opendir( dir ) ) )
+        {
+            PROFILE_EXIT(FILE_DIRSCAN);
+            return;
+        }
 
-	if( DEBUG_BINDSCAN )
-	    printf( "scan directory %s\n", dir );
+        if( DEBUG_BINDSCAN )
+            printf( "scan directory %s\n", dir );
 
         string_new( filename );
-	while( dirent = readdir( d ) )
-	{
-# ifdef old_sinix
-	    /* Broken structure definition on sinix. */
-	    f.f_base.ptr = dirent->d_name - 2;
-# else
-	    f.f_base.ptr = dirent->d_name;
-# endif
-	    f.f_base.len = strlen( f.f_base.ptr );
+        while( dirent = readdir( dd ) )
+        {
+            file_info_t * ff = 0;
+            
+            # ifdef old_sinix
+            /* Broken structure definition on sinix. */
+            f.f_base.ptr = dirent->d_name - 2;
+            # else
+            f.f_base.ptr = dirent->d_name;
+            # endif
+            f.f_base.len = strlen( f.f_base.ptr );
 
             string_truncate( filename, 0 );
-	    path_build( &f, filename, 0 );
+            path_build( &f, filename, 0 );
 
-	    (*func)( closure, filename->value, 0 /* not stat()'ed */, (time_t)0 );
-	}
+            files = list_new( files, newstr(filename->value) );
+            file_query( filename->value );
+        }
         string_free( filename );
 
-	closedir( d );
+        closedir( dd );
+    
+        d->files = files;
+    }
+
+    /* Special case / : enter it */
+    {
+        unsigned long len = strlen(d->name);
+        if( len == 1 && d->name[0] == '/' )
+            (*func)( closure, d->name, 1 /* stat()'ed */, d->time );
+    }
+
+    /* Now enter contents of directory */
+    if ( d->files )
+    {
+        LIST * files = d->files;
+        while ( files )
+        {
+            file_info_t * ff = file_info( files->string );
+            (*func)( closure, ff->name, 1 /* stat()'ed */, ff->time );
+            files = list_next( files );
+        }
+    }
+    
+    PROFILE_EXIT(FILE_DIRSCAN);
 }
 
+file_info_t * file_query( char * filename )
+{
+    file_info_t * ff = file_info( filename );
+    if ( ! ff->time )
+    {
+        struct stat statbuf;
+
+        if( stat( *filename ? filename : ".", &statbuf ) < 0 )
+            return 0;
+
+        ff->is_file = statbuf.st_mode & S_IFREG ? 1 : 0;
+        ff->is_dir = statbuf.st_mode & S_IFDIR ? 1 : 0;
+        ff->size = statbuf.st_size;
+        ff->time = statbuf.st_mtime ? statbuf.st_mtime : 1;
+    }
+    return ff;
+}
+
 /*
  * file_time() - get timestamp of file, if not done by file_dirscan()
  */
@@ -184,32 +245,17 @@
 	char	*filename,
 	time_t	*time )
 {
-	struct stat statbuf;
-
-	if( stat( filename, &statbuf ) < 0 )
-	    return -1;
-
-    /* Technically, existing files can have 0 as statbuf.st_mtime 
-       --- in particular, the /cygdrive directory under cygwin. However, 
-       though all the code jam assumes that timestamp of 0 means
-       "does not exist" and will try to create the "missing" target, causing
-       problems. Work around this problem by chanding 0 to 1.
-    */
-	*time = statbuf.st_mtime ? statbuf.st_mtime : 1 ;
-	return 0;
+    file_info_t * ff = file_query( filename );
+    if ( !ff ) return -1;
+    *time = ff->time;
+    return 0;
 }
 
 int file_is_file(char* filename)
 {
-	struct stat statbuf;
-
-	if( stat( filename, &statbuf ) < 0 )
-	    return -1;
-
-    if (S_ISREG(statbuf.st_mode)) 
-        return 1;
-    else
-        return 0;    
+    file_info_t * ff = file_query( filename );
+    if ( !ff ) return -1;
+    return ff->is_file;
 }
 
 
@@ -281,6 +327,8 @@
 		    */
 
 		    string_table = (char *)malloc(lar_size);
+            if ( DEBUG_PROFILE )
+                profile_memory( lar_size );
 		    lseek(fd, offset + SARHDR, 0);
 		    if (read(fd, string_table, lar_size) != lar_size)
 			printf("error reading string table\n");

Modified: boost-jam/branches/upstream/current/hash.c
===================================================================
--- boost-jam/branches/upstream/current/hash.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/hash.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -6,6 +6,8 @@
 
 # include "jam.h"
 # include "hash.h"
+# include "compile.h"
+#include "debug.h"
 # include <assert.h>
 
 /* 
@@ -24,6 +26,10 @@
  * 4/29/93 - ensure ITEM's are aligned
  */
 
+/* */
+#define HASH_DEBUG_PROFILE 1
+/* */
+
 char 	*hashsccssid="@(#)hash.c	1.14  ()  6/20/88";
 
 /* Header attached to all data items entered into a hash table. */
@@ -144,12 +150,24 @@
 	register ITEM *i;
 	unsigned char *b = (unsigned char*)(*data)->key;
 	unsigned int keyval;
+    
+    #ifdef HASH_DEBUG_PROFILE
+    profile_frame prof[1];
+    if ( DEBUG_PROFILE )
+        profile_enter( 0, prof );
+    #endif
 
 	if( enter && !hp->items.more )
 	    hashrehash( hp );
 
 	if( !enter && !hp->items.nel )
+    {
+        #ifdef HASH_DEBUG_PROFILE
+        if ( DEBUG_PROFILE )
+            profile_exit( prof );
+        #endif
 	    return 0;
+    }
 
 	keyval = *b;
 
@@ -163,6 +181,10 @@
 		!strcmp( i->data.key, (*data)->key ) )
 	{
 		*data = &i->data;
+        #ifdef HASH_DEBUG_PROFILE
+        if ( DEBUG_PROFILE )
+            profile_exit( prof );
+        #endif
 		return !0;
 	}
 
@@ -188,6 +210,10 @@
 		*data = &i->data;
 	}
 
+    #ifdef HASH_DEBUG_PROFILE
+    if ( DEBUG_PROFILE )
+        profile_exit( prof );
+    #endif
 	return 0;
 }
 
@@ -198,10 +224,12 @@
 static void hashrehash( register struct hash *hp )
 {
 	int i = ++hp->items.list;
-
 	hp->items.more = i ? 2 * hp->items.nel : hp->inel;
 	hp->items.next = (char *)malloc( hp->items.more * hp->items.size );
     hp->items.free = 0;
+
+    if ( DEBUG_PROFILE )
+        profile_memory( hp->items.more * hp->items.size );
     
 	hp->items.lists[i].nel = hp->items.more;
 	hp->items.lists[i].base = hp->items.next;
@@ -213,6 +241,9 @@
 	hp->tab.nel = hp->items.nel * hp->bloat;
 	hp->tab.base = (ITEM **)malloc( hp->tab.nel * sizeof(ITEM **) );
 
+    if ( DEBUG_PROFILE )
+        profile_memory( hp->tab.nel * sizeof(ITEM **) );
+
 	memset( (char *)hp->tab.base, '\0', hp->tab.nel * sizeof( ITEM * ) );
 
 	for( i = 0; i < hp->items.list; i++ )
@@ -268,6 +299,9 @@
 {
 	struct hash *hp = (struct hash *)malloc( sizeof( *hp ) );
 
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( *hp ) );
+
 	hp->bloat = 3;
 	hp->tab.nel = 0;
 	hp->tab.base = (ITEM **)0;
@@ -277,7 +311,7 @@
 	hp->items.size = sizeof( struct hashhdr ) + ALIGNED( datalen );
 	hp->items.list = -1;
 	hp->items.nel = 0;
-	hp->inel = 11;
+	hp->inel = /* */ 11 /*/ 47 /* */;
 	hp->name = name;
 
 	return hp;

Modified: boost-jam/branches/upstream/current/hash.h
===================================================================
--- boost-jam/branches/upstream/current/hash.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/hash.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -7,6 +7,9 @@
 /*
  * hash.h - simple in-memory hashing routines 
  */
+ 
+#ifndef BOOST_JAM_HASH_H
+#define BOOST_JAM_HASH_H
 
 typedef struct hashdata HASHDATA;
 
@@ -18,3 +21,5 @@
 
 # define	hashenter( hp, data ) (!hashitem( hp, data, !0 ))
 # define	hashcheck( hp, data ) hashitem( hp, data, 0 )
+
+#endif

Added: boost-jam/branches/upstream/current/images/blank.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/blank.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/caution.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/caution.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/draft.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/draft.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/home.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/home.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/important.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/important.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/next.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/next.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/next_disabled.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/next_disabled.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/note.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/note.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/prev.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/prev.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/prev_disabled.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/prev_disabled.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/tip.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/tip.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/toc-blank.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/toc-blank.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/toc-minus.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/toc-minus.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/toc-plus.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/toc-plus.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/up.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/up.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/up_disabled.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/up_disabled.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: boost-jam/branches/upstream/current/images/warning.png
===================================================================
(Binary files differ)


Property changes on: boost-jam/branches/upstream/current/images/warning.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: boost-jam/branches/upstream/current/index.html
===================================================================
--- boost-jam/branches/upstream/current/index.html	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/index.html	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,1264 +1,130 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
 <html>
 <head>
-  <meta name="generator" content=
-  "HTML Tidy for Linux/x86 (vers 1st September 2003), see www.w3.org">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
-  <link rel="stylesheet" type="text/css" href="../../../boost.css">
-
-  <title>Boost.Jam</title>
-  <meta name="author" content="Rene Rivera">
-  <meta name="description" content=
-  "Boost.Jam (bjam) is the core build tool for using the Boost.Build system. BJam is based on Perforce's Jam/MR.">
-  </head>
-
-<body link="#0000FF" vlink="#800080">
-  <table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
-  "header">
-    <tbody>
-      <tr>
-        <td valign="top" width="300">
-          <h3><a href="../../../index.htm"><img height="86" width="277" alt=
-          "C++ Boost" src="../../../boost.png" border="0"></a></h3>
-        </td>
-
-        <td valign="top">
-          <h1 align="center">Boost.Jam</h1>
-
-          <h2 align="center"></h2>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-  <hr>
-
-  <dl class="index">
-    <dt><a href="#introduction">Introduction</a></dt>
-
-    <dt><a href="#features">Features</a></dt>
-
-    <dt><a href="#contents">Contents</a></dt>
-
-    <dt><a href="#building_bjam">Building Boost.Jam</a></dt>
-
-    <dt><a href="#core_extensions">Core Jam Extensions</a></dt>
-
-    <dd>
-      <dl class="index">
-        <dt><a href="#variable_quoting">Command-line and Environment Variable
-        Quoting</a></dt>
-
-        <dt><a href="#jambase_replacement">Startup Behavior</a></dt>
-
-        <dt><a href="#rule_indirection">Rule Indirection</a></dt>
-
-        <dt><a href="#argument_lists">Argument Lists</a></dt>
-
-        <dt><a href="#module_support">Module Support</a></dt>
-
-        <dd>
-          <dl class="index">
-            <dt><a href="#module_declaration">Declaration</a></dt>
-
-            <dt><a href="#module_locals">Variable Scope</a></dt>
-
-            <dt><a href="#local_rules">Local Rules</a></dt>
-
-            <dt><a href="#RULENAMES_rule">The <tt>RULENAMES</tt>
-            rule</a></dt>
-
-            <dt><a href="#VARNAMES_rule">The <tt>VARNAMES</tt> rule</a></dt>
-
-            <dt><a href="#IMPORT_rule">The <tt>IMPORT</tt> rule</a></dt>
-
-            <dt><a href="#EXPORT_rule">The <tt>EXPORT</tt> rule</a></dt>
-
-            <dt><a href="#CALLER_MODULE_rule">The
-            <tt>CALLER_MODULE</tt></a></dt>
-
-            <dt><a href="#DELETE_MODULE_rule">The <tt>DELETE_MODULE</tt>
-            rule</a></dt>
-          </dl>
-        </dd>
-
-        <dt><a href="#local_foreach">Local for Loop Variables</a></dt>
-
-        <dt><a href="#negative_indexing">Negative Indexing</a></dt>
-
-        <dt><a href="#cygwin_support">Support for Cygwin</a></dt>
-
-        <dt><a href="#BINDRULE">Target Binding Detection</a></dt>
-
-        <dt><a href="#FAIL_EXPECTED">Return Code Inversion</a></dt>
-
-        <dt><a href="#NOCARE">Ignoring Return Codes</a></dt>
-
-        <dt><a href="#RMOLD">Removing outdated targets</a></dt>
-
-        <dt><a href="#SUBST_rule">The <tt>SUBST</tt> Rule</a></dt>
-
-        <dt><a href="#JAM_VERSION">The <tt>JAM_VERSION</tt> global
-        variable</a></dt>
-
-        <dt><a href="#debugging_support">Debugging Support</a></dt>
-
-        <dd>
-          <dl class="index">
-            <dt><a href="#BACKTRACE_rule">The BACKTRACE rule</a></dt>
-
-            <dt><a href="#profiling">Profiling</a></dt>
-
-            <dt><a href="#parse_debugging">Parser Debugging</a></dt>
-
-            <dt><a href="#dependency_graph">Dependency Graph Output</a></dt>
-          </dl>
-        </dd>
-
-        <dt><a href="#UPDATE">The <tt>UPDATE</tt> rule and changes to command
-        line handling</a></dt>
-
-        <dt><a href="#semaphores">Semaphores</a></dt>
-
-        <dt><a href="#w32_getreg">The W32_GETREG rule</a></dt>
-
-        <dt><a href="#ISFILE_rule">The <tt>ISFILE</tt> rule</a></dt>
-
-        <dt><a href="#SHELL_rule">The <tt>SHELL</tt> rule</a></dt>
-      </dl>
-    </dd>
-
-    <dt><a href="#jam_fundamentals">Jam Fundamentals</a></dt>
-  </dl>
-
-  <h2><a name="introduction" id="introduction"></a>Introduction</h2>
-
-  <p>Boost.Jam (BJam) &nbsp;is a build tool based on FTJam, which in turn is
-  based on Perforce Jam. It contains significant improvements made to
-  facilitate its use in the Boost Build System, but should be backward
-  compatible with Perforce Jam.</p>
-
-  <p>This is version 3.1.10 of BJam and is based on version 2.4 of
-  Jam/MR:</p>
-  <pre>
-/+\
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Boost.Jam : 3.1.13</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="index.html" title="Boost.Jam : 3.1.13">
+<link rel="next" href="jam/building.html" title=" Building BJam">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="./boost.png"></td></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="jam/building.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="article" lang="en">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="jam"></a>Boost.Jam : 3.1.13</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Rene</span> <span class="surname">Rivera</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">David</span> <span class="surname">Abrahams</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Vladimir</span> <span class="surname">Prus</span>
+</h3></div></div>
+<div><p class="copyright">Copyright © 2003-2006 Rene
+      Rivera, David Abrahams, Vladimir Prus</p></div>
+<div><div class="legalnotice">
+<a name="id2546892"></a><p>
+        Distributed under the Boost Software License, Version 1.0. (See accompanying
+        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
+      </p>
+</div></div>
+</div>
+<hr>
+</div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="index.html#jam.intro"> Introduction</a></span></dt>
+<dd><dl><dt><span class="section"><a href="index.html#jam.intro.features"> Features</a></span></dt></dl></dd>
+<dt><span class="section"><a href="jam/building.html"> Building BJam</a></span></dt>
+<dt><span class="section"><a href="jam/usage.html"> Using BJam</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="jam/usage.html#jam.usage.options"> Options</a></span></dt>
+<dt><span class="section"><a href="jam/usage.html#jam.usage.operation"> Operation</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="jam/language.html"> Language</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="jam/language.html#jam.language.lexical"> Lexical Features</a></span></dt>
+<dt><span class="section"><a href="jam/language.html#jam.language.target"> Targets</a></span></dt>
+<dt><span class="section"><a href="jam/language.html#jam.language.rules"> Rules</a></span></dt>
+<dt><span class="section"><a href="jam/language.html#jam.language.flow_of_control">Flow-of-Control</a></span></dt>
+<dt><span class="section"><a href="jam/language.html#jam.language.variables">Variables</a></span></dt>
+<dt><span class="section"><a href="jam/language.html#jam.language.modules">Modules</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="jam/miscellaneous.html">Miscellaneous</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="jam/miscellaneous.html#jam.miscellaneous.diagnostics">Diagnostics</a></span></dt>
+<dt><span class="section"><a href="jam/miscellaneous.html#jam.miscellaneous.bugs__limitations">Bugs, Limitations</a></span></dt>
+<dt><span class="section"><a href="jam/miscellaneous.html#jam.miscellaneous.fundamentals">Fundamentals</a></span></dt>
+</dl></dd>
+</dl>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="jam.intro"></a><a href="index.html#jam.intro" title=" Introduction"> Introduction</a></h2></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="index.html#jam.intro.features"> Features</a></span></dt></dl></div>
+<p>
+      Boost.Jam (BJam) is a build tool based on FTJam, which in turn is based on
+      <a href="http://www.perforce.com/jam/jam.html" target="_top">Perforce Jam</a>. It
+      contains significant improvements made to facilitate its use in the Boost Build
+      System, but should be backward compatible with <a href="http://www.perforce.com/jam/jam.html" target="_top">Perforce
+      Jam</a>.
+    </p>
+<p>
+      This is version 3.1.13 of BJam and is based on version 2.4 of Jam/MR:
+    </p>
+<pre class="programlisting">/+\
 +\  Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
-\+/
++/
 This is Release 2.4 of Jam/MR, a make-like program.
 License is hereby granted to use this software and distribute it
 freely, as long as this copyright notice is retained and modifications
 are clearly marked.
 ALL WARRANTIES ARE HEREBY DISCLAIMED.
 </pre>
-
-  <h2><a name="features" id="features"></a>Features</h2>
-
-  <p>Jam is a make(1) replacement that makes building simple things simple
-  and building complicated things manageable.</p>
-
-  <p>Jam's language is expressive, making Jamfiles (c.f. Makefiles) compact.
-  Here's a sample:</p>
-  <pre>
-Main smail : main.c map.c resolve.c deliver.c
-     misc.c parser.y alias.c pw.c headers.c
-     scanner.l getpath.c str.c ;
-</pre>
-
-  <p>This builds "smail" from a dozen source files. Jam handles header file
-  dependencies automatically and on-the-fly.</p>
-
-  <p>Jam is very portable: it runs on UNIX, VMS, Mac, and NT. Most Jamfiles
-  themselves are portable, like the sample above.</p>
-
-  <p>Jam is unintrusive: it is small, it has negligible CPU overhead, and it
-  doesn't create any of its own funny files (c.f. Odin, nmake, SunOS
-  make).</p>
-
-  <p>Jam can build large projects spread across many directories in one pass,
-  without recursing, tracking the relationships among all files. Jam can do
-  this with multiple, concurrent processes.</p>
-
-  <p>Jam isn't under the blinkin GNU copyright, so you can incorporate it
-  into commercial products.</p>
-
-  <h2><a name="contents" id="contents"></a>Contents</h2>
-
-  <table cellpadding="2" cellspacing="2" border="0" summary=
-  "Contents of Jam documents.">
-    <tr>
-      <td valign="top"><a href="Jam.html">Jam.html</a></td>
-
-      <td valign="top">Jam and language reference.</td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="Porting">Porting</a></td>
-
-      <td valign="top">Notes on porting jam to wildcat platforms.</td>
-    </tr>
-  </table>
-
-  <h2><a name="building_bjam" id="building_bjam"></a>Building Boost.Jam</h2>
-
-  <p>Installing BJam after building it is simply a matter of copying the
-  generated executables someplace in your <tt>PATH</tt>. For building the
-  executables there are a set of <tt>build</tt> bootstrap scripts to
-  accomodate particular environments. The scripts take one optional argument,
-  the name of the toolset to build with. When the toolset is not given an
-  attempt is made to detect an available toolset and use that. The build
-  scripts accept these areguments:</p>
-  <pre>
-&lt;build script name&gt; [toolset]
-</pre>
-
-  <p>Running the scripts without arguments will give you the best chance of
-  success. On Windows platforms from a command console do:</p>
-  <pre>
-cd &lt;jam source location&gt;
-.\build.bat
-</pre>
-
-  <p>On Unix type platforms do:</p>
-  <pre>
-cd &lt;jam source location&gt;
-sh ./build.sh
-</pre>
-
-  <p>For the Boost.Jam source included with the Boost distribution the
-  <tt>&lt;jam source location&gt;</tt> is
-  <tt>BOOST_ROOT/tools/build/jam_src.</tt></p>
-
-  <p>If the scripts fail to detect an appropriate toolset to build with your
-  particular toolset may not be auto-detectable. In that case, you can
-  specify the toolset as the first argument, this assumes that the toolset is
-  readily available in the <tt>PATH</tt>. NOTE: The toolset used to build
-  Boost.Jam is independent of the toolsets used for Boost.Build. Only one
-  version of Boost.Jam is needed to use Boost.Build. The supported toolsets,
-  and wether they are auto-detected, are:</p>
-
-  <table cellpadding="2" cellspacing="2" border="1" summary=
-  "Bootstrap supported platforms and toolsets.">
-    <tr>
-      <th valign="top">Script</th>
-
-      <th valign="top">Platforms</th>
-
-      <th valign="top">Toolsets</th>
-
-      <th valign="top">Detection</th>
-    </tr>
-
-    <tr>
-      <td valign="top" rowspan="9" colspan="1"><tt>build.bat</tt></td>
-
-      <td valign="top" rowspan="9" colspan="1">Windows NT, 2000, and XP</td>
-
-      <td valign="top"><a href=
-      "http://www.comeaucomputing.com"><tt>como</tt></a>, Comeau.Computing
-      C/C++</td>
-
-      <td valign="top"></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.borland.com/bcppbuilder/freecompiler"><tt>borland</tt></a>,
-      <a href="http://www.borland.com/">Borland</a> C++Builder (BCC 5.5)</td>
-
-      <td valign="top">* Common install location:
-      <tt>"C:\Borland\BCC55"</tt><br>
-      * <tt>BCC32.EXE</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://gcc.gnu.org">gcc</a>, GNU GCC</td>
-
-      <td valign="top"></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://gcc.gnu.org">gcc-nocygwin</a>, GNU
-      GCC</td>
-
-      <td valign="top"></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.intel.com/software/products/compilers/c60"><tt>intel-win32</tt></a>,
-      Intel C++ Compiler for Windows</td>
-
-      <td valign="top">* <tt>ICL.EXE</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.metrowerks.com"><tt>metrowerks</tt></a>, MetroWerks
-      CodeWarrior C/C++ 7.x, 8.x</td>
-
-      <td valign="top">* <tt>CWFolder</tt> variable configured<br>
-      * <tt>MWCC.EXE</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://www.mingw.org">mingw</a>, GNU <a href=
-      "http://gcc.gnu.org">GCC</a> as the <a href=
-      "http://www.mingw.org">MinGW</a> configuration</td>
-
-      <td valign="top">* Common install location: <tt>"C:\MinGW"</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://msdn.microsoft.com/visualc/">msvc</a>,
-      Microsoft Visual C++ 6.x</td>
-
-      <td valign="top">* <tt>VCVARS32.BAT</tt> already configured<br>
-      * Common install locations: <tt>"C:\Program Files\Microsoft Visual
-      Studio"</tt>, <tt>"C:\Program Files\Microsoft Visual C++"<br></tt> *
-      <tt>CL.EXE</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://msdn.microsoft.com/visualc/">vc7</a>,
-      Microsoft Visual C++ 7.x</td>
-
-      <td valign="top">* <tt>VCVARS32.BAT</tt> or <tt>VSVARS32.BAT</tt>
-      already configured<br>
-      * Common install location: <tt>"C:\Program Files\Microsoft Visual
-      Studio .NET"</tt><br>
-      * Common install location: <tt>"C:\Program Files\Microsoft Visual
-      Studio .NET 2003"</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top" rowspan="11" colspan="1"><tt>build.sh</tt></td>
-
-      <td valign="top" rowspan="10" colspan="1">Unix, Linux, Cygwin,
-      etc.</td>
-
-      <td valign="top"><a href="http://www.hp.com/go/c++">acc</a>, HP-UX
-      aCC</td>
-
-      <td valign="top">* <tt>aCC</tt> in <tt>PATH</tt><br>
-      * <tt>uname</tt> is "HP-UX"</td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://www.comeaucomputing.com">como</a>,
-      Comeau.Computing C/C++</td>
-
-      <td valign="top">* <tt>como</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href="http://gcc.gnu.org">gcc</a>, GNU GCC</td>
-
-      <td valign="top">* <tt>gcc</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.intel.com/software/products/compilers/c60l/">intel-linux</a>,
-      Intel C++ for Linux</td>
-
-      <td valign="top">* <tt>icc</tt> in <tt>PATH</tt><br>
-      * Common install locations: <tt>"/opt/intel/compiler70"</tt>,
-      <tt>"/opt/intel/compiler60"</tt>, <tt>"/opt/intel/compiler50"</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://developer.intel.com/software/products/kcc/">kcc</a>, Intel KAI
-      C++</td>
-
-      <td valign="top">* <tt>KCC</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.borland.com/bcppbuilder/freecompiler"><tt>kylix</tt></a>,
-      <a href="http://www.borland.com/">Borland</a> C++Builder</td>
-
-      <td valign="top">* <tt>bc++</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.sgi.com/developers/devtools/languages/mipspro.html">mipspro</a>,
-      SGI MIPSpro C</td>
-
-      <td valign="top"></td>
-    </tr>
-
-    <tr>
-      <td valign="top">sunpro, Sun Workshop 6 C++</td>
-
-      <td valign="top">* Standard install location:
-      <tt>"/opt/SUNWspro"</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www.tru64unix.compaq.com/cplus/">true64cxx</a>, Compaq C++
-      Compiler for True64 UNIX</td>
-
-      <td valign="top"></td>
-    </tr>
-
-    <tr>
-      <td valign="top"><a href=
-      "http://www-3.ibm.com/software/ad/vacpp/">vacpp</a>, IBM VisualAge
-      C++</td>
-
-      <td valign="top">* <tt>xlc</tt> in <tt>PATH</tt></td>
-    </tr>
-
-    <tr>
-      <td valign="top">MacOS X<br></td>
-
-      <td valign="top"><a href=
-      "http://developer.apple.com/tools/compilers.html">darwin</a>, Apple
-      MacOS X GCC</td>
-
-      <td valign="top">* <tt>uname</tt> is <tt>"Darwin"</tt></td>
-    </tr>
-  </table>
-
-  <p>The built executables are placed in a subdirectory specific to your
-  platform. For example, in Linux running on an Intel x86 compatible chip,
-  the executables are placed in: <tt>"bin.linuxx86"</tt>. 
-  The <tt>bjam[.exe]</tt> executable can be used to invoke Boost.Build.</p>
-
-  <p>The <tt>build</tt> scripts support additional invocation arguments for
-  use by developers of Boost.Jam. The extra arguments come after the toolset,
-  and can take the form of <tt>"--option"</tt> or targets for the
-  <tt>build.jam</tt> script:</p>
-  <pre>
-&lt;build script name&gt; [toolset] [--option+ target*]
-</pre>
-
-  <p>There is current only one available option, <tt>"--debug"</tt>, which
-  builds debugging versions of the executable. When built they are placed in
-  their own directory <tt>"bin.&lt;platform&gt;.debug"</tt>. To specify
-  targets without options, one can suply a special ignore option
-  <tt>"---"</tt>.</p>
-
-  <p>Currently there are two targets supported: <tt>dist</tt>, and
-  <tt>clean</tt>. Respectively they: generate packages (compressed archives)
-  as appropriate for distribution in the platform, or remove all the built
-  executables and objects.</p>
-
-  <h2><a name="core_extensions" id="core_extensions">Core Jam
-  Extensions</a></h2>
-
-  <p>A number of enhancements have been made to the core language of Classic
-  Jam. These changes were aimed primarily at making it easier to manage the
-  complexity of a large system such as Boost.Build.</p>
-
-  <h3><a name="variable_quoting" id="variable_quoting"></a>Command-line and
-  Environment Variable Quoting</h3>
-
-  <p>Classic Jam had an <a href="#variable_splitting">odd behavior</a> with
-  respect to command-line variable ( <tt>-s...</tt>) and environment variable
-  settings which made it impossible to define an arbitrary variable with
-  spaces in the value. Boost Jam remedies that by treating all such settings
-  as a single string if they are surrounded by double-quotes. Uses of this
-  feature can look interesting, since shells require quotes to keep
-  characters separated by whitespace from being treated as separate
-  arguments:</p>
-  <pre>
-jam -sMSVCNT="\"\"C:\Program Files\Microsoft Visual C++\VC98\"\"" ...
-</pre>
-
-  <p>The outer quote is for the shell. The middle quote is for Jam, to tell
-  it to take everything within those quotes literally, and the inner quotes
-  are for the shell again when paths are passed as arguments to build
-  actions. Under NT, it looks a lot more sane to use environment variables
-  before invoking jam when you have to do this sort of quoting:</p>
-  <pre>
-set MSVCNT=""C:\Program Files\Microsoft Visual C++\VC98\""
-</pre>
-
-  <h3><a name="jambase_replacement" id="jambase_replacement">Startup
-  Behavior</a></h3>
-
-  <p>The Boost.Build v2 initialization behavior has been implemented. This
-  behavior only applies when the executable being invoked is called
-  "<code>bjam</code>" or, for backward-compatibility, when the
-  <code>BOOST_ROOT</code> variable is set.</p>
-
-  <ol>
-    <li>We attempt to load "boost-build.jam" by searching from the current
-    invocation directory up to the root of the file-system. This file is
-    expected to invoke the <tt>boost-build</tt> rule to indicate where the
-    Boost.Build system files are, and to load them.</li>
-
-    <li>If boost-build.jam is not found we error and exit, giving brief
-    instructions on possible errors.
-
-      <blockquote>
-        As a backward-compatibility measure for older versions of
-        Boost.Build, when the <code>BOOST_ROOT</code> variable is set, we
-        first search for <code>boost-build.jam</code> in
-        <code>$(BOOST_ROOT)/tools/build</code> and
-        <code>$(BOOST_BUILD_PATH)</code>. If found, it is loaded and
-        initialization is complete.
-      </blockquote>
-    </li>
-
-    <li>The <code>boost-build</code> rule adds its (optional) argument to the
-    front of <code>BOOST_BUILD_PATH</code>, and attempts to load
-    <code>bootstrap.jam</code> from those directories. If a relative path is
-    specified as an argument, it is treated as though it was relative to the
-    <code>boost-build.jam</code> file.</li>
-
-    <li>If the bootstrap.jam file was not found, we print a likely error
-    message and exit.</li>
-  </ol>
-
-  <h3><a name="rule_indirection" id="rule_indirection">Rule
-  Indirection</a></h3>
-
-  <p>Boost Jam allows you to call a rule whose name is held in a variable or
-  computed as the result of an expression:</p>
-  <pre>
-x = foo ;
-rule foobar { ECHO foobar ; }   # a trivial rule
-$(x)bar ;                       # invokes foobar
-</pre>
-
-  <p>Furthermore, if the first expression expands to more than one list item,
-  everything after the first item becomes part of the first argument. This
-  allows a crude form of argument binding:</p>
-  <pre>
-# return the elements of sequence for which predicate returns non-nil
-rule filter ( sequence * : predicate + )
-{
-    local result ;
-    for local x in $(sequence)
-    {
-        if [ $(predicate) $(x) ] { result += $(x); }
-    }
-    return $(result);
-}
-# true iff x == y
-rule equal ( x y )
-{
-    if $(x) = $(y) { return true; }
-}
-# bind 3 to the first argument of equal
-ECHO [ filter 1 2 3 4 5 4 3 : equal 3 ] ; # prints "3 3"
-</pre>
-
-  <h3><a name="argument_lists" id="argument_lists">Argument lists</a></h3>
-
-  <p>You can now describe the arguments accepted by a rule, and refer to them
-  by name within the rule. For example, the following prints ``I'm sorry,
-  Dave'' to the console:</p>
-  <pre>
-rule report ( pronoun index ? : state : names + )
-{
-    local he.suffix she.suffix it.suffix = s ;
-    local I.suffix = m ;
-    local they.suffix you.suffix = re ;
-    ECHO $(pronoun)'$($(pronoun).suffix) $(state), $(names[$(index)]) ;
-}
-report I 2 : sorry : Joe Dave Pete ;
-</pre>
-
-  <p>Each name in a list of formal arguments (separated by ``<tt>:</tt>'' in
-  the rule declaration) is bound to a single element of the corresponding
-  actual argument unless followed by one of these modifiers:</p>
-
-  <table border="1" summary="Argument modifiers">
-    <tr>
-      <th>Symbol</th>
-
-      <th>Semantics of preceding symbol</th>
-    </tr>
-
-    <tr>
-      <td><tt>?</tt></td>
-
-      <td>optional</td>
-    </tr>
-
-    <tr>
-      <td><tt>*</tt></td>
-
-      <td>Bind to zero or more unbound elements of the actual argument. When
-      ``<tt>*</tt>'' appears where an argument name is expected, any number
-      of additional arguments are accepted. This feature can be used to
-      implement "varargs" rules.</td>
-    </tr>
-
-    <tr>
-      <td><tt>+</tt></td>
-
-      <td>Bind to one or more unbound elements of the actual argument.</td>
-    </tr>
-  </table>
-
-  <p>The actual and formal arguments are checked for inconsistencies, which
-  cause Jam to exit with an error code:</p>
-  <pre>
-### argument error
-# rule report ( pronoun index ?  : state  : names + )
-# called with: ( I 2 foo  : sorry  : Joe Dave Pete )
-# extra argument foo
-### argument error
-# rule report ( pronoun index ?  : state  : names + )
-# called with: ( I 2  : sorry )
-# missing argument names
-</pre>
-
-  <p>If you omit the list of formal arguments, all checking is bypassed as in
-  ``classic'' Jam. Argument lists drastically improve the reliability and
-  readability of your rules, however, and are <b>strongly recommended</b> for
-  any new Jam code you write.</p>
-
-  <h3><a name="module_support" id="module_support">Module Support</a></h3>
-
-  <p>Boost Jam introduces support for modules, which provide some rudimentary
-  namespace protection for rules and variables. A new keyword,
-  ``<tt>module</tt>'' was also introduced. The features described in this
-  section are <i>primitives</i>, meaning that they are meant to provide the
-  operations needed to write Jam rules which provide a more elegant module
-  interface.</p>
-
-  <h4><a name="module_declaration" id=
-  "module_declaration">Declaration</a></h4>
-  <pre>
-module <i>expression</i> { ... }
-</pre>
-
-  <p>Code within the <tt>{</tt> ... <tt>}</tt> executes within the module
-  named by evaluating <i>expression</i>. Rule definitions can be found in the
-  module's own namespace, and in the namespace of the global module as
-  <i>module-name</i><tt>.</tt><i>rule-name</i>, so within a module, other
-  rules in that module may always be invoked without qualification:</p>
-  <pre>
-<b>module my_module
-{</b>
-    rule salute ( x ) { ECHO $(x), world ; }
-    rule greet ( ) { salute hello ; }
-    greet ;
-<b>}
-my_module.salute</b> goodbye ;
-</pre>
-
-  <p>When an invoked rule is not found in the current module's namespace, it
-  is looked up in the namespace of the global module, so qualified calls work
-  across modules:</p>
-  <pre>
-module your_module
-{
-    rule bedtime ( ) { <b>my_module.salute</b> goodnight ; }
-}
-</pre>
-
-  <h4><a name="module_locals" id="module_locals">Variable Scope</a></h4>
-
-  <p>Each module has its own set of dynamically nested variable scopes. When
-  execution passes from module A to module B, all the variable bindings from
-  A become unavailable, and are replaced by the bindings that belong to B.
-  This applies equally to local and global variables:</p>
-  <pre>
-module A
-{
-    x = 1 ;
-    rule f ( )
-    {
-        local y = 999 ; # becomes visible again when B.f calls A.g
-        B.f ;
-    }
-    rule g ( )
-    {
-        ECHO $(y) ;     # prints "999"
-    }
-}
-module B
-{
-    y = 2 ;
-    rule f ( )
-    {
-        ECHO $(y) ; # always prints "2"
-        A.g ;
-    }
-}
-</pre>
-
-  <p>The only way to access another module's variables is by entering that
-  module:</p>
-  <pre>
-rule peek ( module-name ? : variables + )
-{
-    module $(module-name)
-    {
-        return $($(&gt;)) ;
-    }
-}
-</pre>Note that because existing variable bindings change whenever a new
-module scope is entered, argument bindings become unavailable. That explains
-the use of "<code>$(&gt;)</code>" in the <code>peek</code> rule above.
-
-  <h4><a name="local_rules" id="local_rules">Local Rules</a></h4>
-  <pre>
-local rule <i>rulename...</i>
-</pre>
-
-  <p>The rule is declared locally to the current module. It is not entered in
-  the global module with qualification, and its name will not appear in the
-  result of:</p>
-  <pre>
-[ RULENAMES <i>module-name</i> ]
-</pre>
-
-  <h4><a name="RULENAMES_rule" id="RULENAMES_rule">The <tt>RULENAMES</tt>
-  Rule</a></h4>
-  <pre>
-rule RULENAMES ( module ? )
-</pre>
-
-  <p>Returns a list of the names of all non-local rules in the given module.
-  If <tt>module</tt> is omitted, the names of all non-local rules in the
-  global module are returned.</p>
-
-  <h4><a name="VARNAMES_rule" id="VARNAMES_rule">The <tt>VARNAMES</tt>
-  Rule</a></h4>
-  <pre>
-rule VARNAMES ( module ? )
-</pre>
-
-  <p>Returns a list of the names of all variable bindings in the given
-  module. If <tt>module</tt> is omitted, the names of all variable bindings
-  in the global module are returned. <b>Note:</b>this includes any local
-  variables in rules from the call stack which have not returned at the time
-  of the <code>VARNAMES</code> invocation.</p>
-
-  <h4><a name="IMPORT_rule" id="IMPORT_rule">The <tt>IMPORT</tt>
-  Rule</a></h4>
-
-  <p><tt>IMPORT</tt> allows rule name aliasing across modules:</p>
-  <pre>
-rule IMPORT ( source_module ? : source_rules *
-            : target_module ? : target_rules * )
-</pre>
-
-  <p>The <tt>IMPORT</tt> rule copies rules from the <tt>source_module</tt>
-  into the <tt>target_module</tt> as <tt>local</tt> rules. If either
-  <tt>source_module</tt> or <tt>target_module</tt> is not supplied, it refers
-  to the global module. <tt>source_rules</tt> specifies which rules from the
-  <tt>source_module</tt> to import; <tt>TARGET_RULES</tt> specifies the names
-  to give those rules in <tt>target_module</tt>. If <tt>source_rules</tt>
-  contains a name which doesn't correspond to a rule in
-  <tt>source_module</tt>, or if it contains a different number of items than
-  <tt>target_rules</tt>, an error is issued. For example,</p>
-  <pre>
-# import m1.rule1 into m2 as local rule m1-rule1.
-IMPORT m1 : rule1 : m2 : m1-rule1 ;
-# import all non-local rules from m1 into m2
-IMPORT m1 : [ RULENAMES m1 ] : m2 : [ RULENAMES m1 ] ;
-</pre>
-
-  <h4><a name="EXPORT_rule" id="EXPORT_rule">The <tt>EXPORT</tt>
-  Rule</a></h4>
-
-  <p><tt>EXPORT</tt> allows rule name aliasing across modules:</p>
-  <pre>
-rule EXPORT ( module ? : rules * )
-</pre>
-
-  <p>The <tt>EXPORT</tt> rule marks <tt>rules</tt> from the
-  <tt>source_module</tt> as non-local (and thus exportable). If an element of
-  <tt>rules</tt> does not name a rule in <tt>module</tt>, an error is issued.
-  For example,</p>
-  <pre>
-module X {
-  local rule r { ECHO X.r ; }
-}
-IMPORT X : r : : r ; # error - r is local in X
-EXPORT X : r ;
-IMPORT X : r : : r ; # OK.
-</pre>
-
-  <h4><a name="CALLER_MODULE_rule" id="CALLER_MODULE_rule">The
-  <tt>CALLER_MODULE</tt> Rule</a></h4>
-  <pre>
-rule CALLER_MODULE ( levels ? )
-</pre>
-
-  <p><tt>CALLER_MODULE</tt> returns the name of the module scope enclosing
-  the call to its caller (if levels is supplied, it is interpreted as an
-  integer number of additional levels of call stack to traverse to locate the
-  module). If the scope belongs to the global module, or if no such module
-  exists, returns the empty list. For example, the following prints "{Y}
-  {X}":</p>
-  <pre>
-module X {
-    rule get-caller { return [ CALLER_MODULE ] ; }
-    rule get-caller's-caller { return [ CALLER_MODULE 1 ] ; }
-    rule call-Y { return Y.call-X2 ; }
-}
-module Y {
-    rule call-X { return X.get-caller ; }
-    rule call-X2 { return X.get-caller's-caller ; }
-}
-callers = [ X.get-caller ] [ Y.call-X ] [ X.call-Y ] ;
-ECHO {$(callers)} ;
-</pre>
-
-  <h4><a name="DELETE_MODULE_rule" id="DELETE_MODULE_rule">The
-  <tt>DELETE_MODULE</tt> Rule</a></h4>
-  <pre>
-rule DELETE_MODULE ( module ? )
-</pre>
-
-  <p><tt>DELETE_MODULE</tt> removes all of the variable bindings and
-  otherwise-unreferenced rules from the given module (or the global module,
-  if no module is supplied), and returns their memory to the system.
-  <b>Note:</b> though it won't affect rules that are currently executing
-  until they complete, <code>DELETE_MODULE</code> should be used with extreme
-  care because it will wipe out any others and all variable (including locals
-  in that module) immediately. Because of the way dynamic binding works,
-  variables which are shadowed by locals will not be destroyed, so the
-  results can be really unpredictable.</p>
-
-  <h3><a name="local_foreach" id="local_foreach">Local For Loop
-  Variables</a></h3>
-
-  <p>Boost Jam allows you to declare a local <tt>for</tt> loop control
-  variable right in the loop:</p>
-  <pre>
-x = 1 2 3 ;
-y = 4 5 6 ;
-for <b>local</b> y in $(x)
-{
-    ECHO $(y) ; # prints "1", "2", or "3"
-}
-ECHO $(y) ;     # prints "4 5 6"
-</pre>
-
-  <h4><a name="negative_indexing" id="negative_indexing">Negative
-  Indexing</a></h4>
-
-  <p>Classic Jam supplies 1-based list indexing, and slicing on a closed
-  (inclusive) range:</p>
-  <pre>
-x = 1 2 3 4 5 ;
-ECHO $(x[3]) ;   # prints "3"
-ECHO $(x[2-4]) ; # prints "2 3 4"
-ECHO $(x[2-]) ;  # prints "2 3 4 5"
-</pre>
-
-  <p>Boost Jam adds Python-style negative indexing to access locations
-  relative to the <i>end</i> of the list.</p>
-  <pre>
-ECHO $(x[-1]) $(x[-3]) ; # prints "5 3"
-ECHO $(x[-3--1]) ;       # prints "3 4 5"
-ECHO $(x[-3-4]) ;        # prints "3 4"
-ECHO $(x[2--2]) ;        # prints "2 3 4"       
-</pre>
-
-  <p>Consistency with the 1-based, inclusive indexing of Classic Jam and the
-  use of ``<tt>-</tt>'' as the range separator make this feature a bit
-  clumsier than it would otherwise need to be, but it does work.</p>
-
-  <h4><a name="cygwin_support" id="cygwin_support">Support for
-  Cygwin</a></h4>
-
-  <p>When invoking Windows-based tools from <a href=
-  "www.cygwin.com">Cygwin</a> it can be important to pass them true
-  windows-style paths. Boost.Jam supplies the <code>:W</code> modifier which,
-  <em>under Cygwin only</em>, turns a cygwin path into a Win32 path using the
-  <a href=
-  "http://www.cygwin.com/cygwin-api/func-cygwin-conv-to-win32-path.html"><code>
-  cygwin_conv_to_win32_path</code></a> function. On other platforms, the
-  string is unchanged.</p>
-  <pre>
-x = /cygdrive/c/Program Files/Borland ;
-ECHO $(x:W) ; # prints "c:\Program Files\Borland" on Cygwin
-</pre>
-
-  <h4><a name="BINDRULE" id="BINDRULE">Target Binding Detection</a></h4>
-
-  <p>Whenever a target is <a href="#binding">bound</a> to a location in the
-  filesystem, Boost Jam will look for a variable called <tt>BINDRULE</tt>
-  (first ``<tt>on</tt>'' the target being bound, then in the global module).
-  If non-empty, <tt>$(BINDRULE[1])</tt> names a rule which is called with the
-  name of the target and the path it is being bound to. The signature of the
-  rule named by <tt>$(BINDRULE[1])</tt> should match the following:</p>
-  <pre>
-rule bind-rule ( target : path )
-</pre>
-
-  <p>This facility is useful for correct header file scanning, since many
-  compilers will search for <tt>#include</tt>d files first in the directory
-  containing the file doing the <tt>#include</tt> directive.
-  <tt>$(BINDRULE)</tt> can be used to make a record of that directory.</p>
-
-  <h4><a name="FAIL_EXPECTED" id="FAIL_EXPECTED">Return Code
-  Inversion</a></h4>
-
-  <p>For handling targets whose build actions are expected to fail (e.g. when
-  testing that assertions or compile-time type checkin work properly), Boost
-  Jam supplies a <tt>FAIL_EXPECTED</tt> rule in the same style as
-  <tt>NOCARE</tt>, et. al. During target updating, the return code of the
-  build actions for arguments to <tt>FAIL_EXPECTED</tt> is inverted: if it
-  fails, building of dependent targets continues as though it succeeded. If
-  it succeeds, dependent targets are skipped.</p>
-
-  <h4><a name="NOCARE" id="NOCARE">Ignoring Return Codes</a></h4>
-
-  <p>Perforce Jam supplied a <tt>NOCARE</tt> rule which is typically used for
-  header files to indicate that if they are not found, the dependent targets
-  should be built anyway. Boost Jam extends <tt>NOCARE</tt> to apply to
-  targets with build actions: if their build actions exit with a nonzero
-  return code, dependent targets will still be built.</p>
-
-  <h4><a name="RMOLD" id="RMOLD">Removing Outdated Targets</a></h4>
-  <pre>
-rule RMOLD ( targets * )
-</pre>
-
-  <p>Perforce Jam removes any target files that may exist on disk when the
-  rule used to build those targets fails. However, targets whose dependencies
-  fail to build are not removed by default. The <code>RMOLD</code> rule
-  causes its arguments to be removed if any of their dependencies fail to
-  build.</p>
-
-  <h3><a name="SUBST_rule" id="SUBST_rule">The <tt>SUBST</tt> Rule</a></h3>
-
-  <p><b>Note:</b> the <code>SUBST</code> rule is deprecated in favor of
-  Perforce Jam's built-in <code>MATCH</code> rule, which has been rolled into
-  Boost.Jam.</p>
-
-  <p>The behavior of the <tt>SUBST</tt> rule for regular-expression matching
-  and replacement (originally added in <a href=
-  "http://freetype.sourceforge.net/jam/index.html">FTJam</a>) has been
-  modified:</p>
-
-  <ul>
-    <li>One or more replacement patterns may be supplied. The new signature
-    for <tt>SUBST</tt> is:
-      <pre>
-SUBST ( source pattern replacements + )
-</pre>The return value is the concatenated results of applying each element
-of <tt>replacements</tt> in turn. For example, the following will print
-``<tt>[x] (y) {z}</tt>'':
-      <pre>
-ECHO [ SUBST xyz (.)(.)(.) [$1] ($2) {$3} ] ;
-</pre>
-    </li>
-
-    <li>If there is no match, <tt>SUBST</tt> now returns an empty list. In
-    FTJam, the original <tt>source</tt> string was returned, making it
-    awkward to check whether a pattern was matched.</li>
-
-    <li>Compiled regular expressions are now internally cached, making it
-    much faster to use <tt>SUBST</tt> multiple times with the same
-    string.</li>
-  </ul>
-
-  <h3><a name="JAM_VERSION" id="JAM_VERSION">The <tt>JAM_VERSION</tt> global
-  variable</a></h3>
-
-  <p>A predefined global variable with two elements indicates the version
-  number of Boost Jam. Boost Jam versions start at <tt>"03" "00"</tt>.
-  Earlier versions of Jam do not automatically define
-  <tt>JAM_VERSION</tt>.</p>
-
-  <h3><a name="debugging_support" id="debugging_support">Debugging
-  Support</a></h3>
-
-  <h4><a name="BACKTRACE_rule" id="BACKTRACE_rule">The BACKTRACE
-  rule</a></h4>
-  <pre>
-rule BACKTRACE ( )
-</pre>
-
-  <p>Returns a list of quadruples: <i>filename line module rulename</i>...,
-  describing each shallower level of the call stack. This rule can be used to
-  generate useful diagnostic messages from Jam rules.</p>
-
-  <p>The <tt>-d</tt> command-line option admits new arguments:</p>
-
-  <ul>
-    <li><tt>-d+10</tt> - enables <a name="profiling" id=
-    "profiling"><b>profiling</b></a> of rule invocations. When Jam exits, it
-    dumps all rules invoked, their gross and net times in platform-dependent
-    units, and the number of times the rule was invoked.</li>
-
-    <li><tt>-d+11</tt> - enables <a name="parse_debugging" id=
-    "parse_debugging"><b>parser debugging</b></a>, if Jam has been compiled
-    with the "--debug" option to the parser generator named by $(YACC).</li>
-
-    <li><tt>-d+12</tt> - enables <a name="dependency_graph" id=
-    "dependency_graph"><b>dependency graph output</b></a> . This feature was
-    ``stolen'' from a version of Jam modified by <a href=
-    "mailto:cmcpheeters at aw.sgi.com">Craig McPheeters</a>.</li>
-  </ul>
-
-  <h3><a name="UPDATE" id="UPDATE">The <tt>UPDATE</tt> rule and changes to
-  command line handling</a></h3>
-
-  <p>Classic jam treats any non-option element of command line as a name of
-  target to be updated. This prevented more sophisticated handling of command
-  line. This is now enabled again but with additional changes to the
-  <tt>UPDATE&gt;</tt> rule to allow for the flexibility of changing the list
-  of targets to update. The <tt>UPDATE</tt> builtin rule is:</p>
-  <pre>
-rule UPDATE ( targets * )
-</pre>
-
-  <p>The rule has two effects: 1. it clears the list of targets to update,
-  and 2. causes the specified targets to be updated. If no target was
-  specified with the <tt>UPDATE</tt> rule, no targets will be updated. To
-  support changing of the update list in more usefull ways, the rule also
-  returns the targets previously in the update list. This makes it possible
-  to add targets as such:</p>
-  <pre>
-local previous-updates = [ UPDATE ] ;
-UPDATE $(previous-updates) a-new-target ;
-</pre>
-
-  <h3 id="semaphores">Semaphores</h3>
-
-  <p>It is sometimes desirable to disallow parallel execution of some
-  actions. For example:</p>
-
-  <ul>
-    <li>Old versions of <tt>yacc</tt> use files with fixed names. So, running
-    two yacc actions is dangerous.</li>
-
-    <li>One might want to perform parallel compiling, but not do parallel
-    linking, because linking is i/o bound and only gets slower.</li>
-  </ul>Craig McPeeters has extended Perforce Jam to solve such problems, and
-  that extension was integrated in Boost.Jam.
-
-  <p>Any target can be assigned a <em>semaphore</em>, by setting a variable
-  called <tt>SEMAPHORE</tt> on that target. The value of the variable is the
-  semaphore name. It must be different from names of any declared target, but
-  is arbitrary otherwise.</p>
-
-  <p>The semantic of semaphores is that in a group of targets which have the
-  same semaphore, only one can be updated at the moment, regardless of "-j"
-  option.</p>
-
-  <h3 id="w32_getreg">The W32_GETREG rule</h3>
-  <pre>
-    rule W32_GETREG ( path : data ? )
-</pre>
-
-  <p>Defined only for win32 platform. It reads the registry of Windows.
-  'path' is the location of the information, and 'data' is the name of the
-  value which we want to get. If 'data' is omitted, the default value of
-  'path' will be returned. The 'path' value must conform to MS key path
-  format and must be prefixed with one of the predefined root keys. As
-  usual,</p>
-
-  <ul>
-    <li>'HKLM' is equivalent to 'HKEY_LOCAL_MACHINE'.</li>
-
-    <li>'HKCU' is equivalent to 'HKEY_CURRENT_USER'.</li>
-
-    <li>'HKCR' is equivalent to 'HKEY_CLASSES_ROOT'.</li>
-  </ul>
-
-  <p>Other predefined root keys are not supported.</p>
-
-  <p>Currently supported data types : 'REG_DWORD', 'REG_SZ', 'REG_EXPAND_SZ',
-  'REG_MULTI_SZ'. The data with 'REG_DWORD' type will be turned into a
-  string, 'REG_MULTI_SZ' into a list of strings, and for those with
-  'REG_EXPAND_SZ' type environment variables in it will be replaced with
-  their defined values. The data with 'REG_SZ' type and other unsupported
-  types will be put into a string without modification. If it can't receive
-  the value of the data, it just return an empty list. For example,</p>
-  <pre>
-    local PSDK-location =
-    [ PROFILE HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\Directories : "Install Dir" ] ;
-</pre>
-
-  <h4><a name="ISFILE_rule" id="ISFILE_rule">The <tt>ISFILE</tt>
-  Rule</a></h4>
-  <pre>
-rule ISFILE ( targets * )
-</pre>
-
-  <p><tt>ISFILE</tt> marks targets as required to be files. This changes the
-  way <b>jam</b> searches for the target such that it ignores mathes for file
-  system items that are not file, like directories. This makes it possible to
-  avoid <code>#include "exception"</code> matching if one happens to have a
-  directory named <i>exception</i> in the header search path.</p>
-
-  <h4><a name="SHELL_rule" id="SHELL_rule">The <tt>SHELL</tt>
-  Rule</a></h4>
-  <pre>
-rule SHELL ( command )
-</pre>
-
-  <p><tt>SHELL</tt> executes <i>command</i>, and then returns the standard
-  output of <i>command</i>.  SHELL only works on platforms with a popen() function 
-  in the C library.  On platforms without a working popen() function,
-  SHELL is implemented as a no-op.  SHELL works on Unix, MacOS X,
-  and most Windows compilers.  SHELL is a no-op on Metrowerks compilers
-  under Windows.</p>.  
-
-  <h2><a name="jam_fundamentals" id="jam_fundamentals">Jam
-  Fundamentals</a></h2>
-
-  <p>This section is derived from the official Jam documentation and from my
-  experience using it and reading the Jambase rules. I 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. I hope it will be useful to anyone wishing to
-  become familiar with Jam and the Boost build system.</p>
-
-  <p>&middot; Jam ``<b>rules</b>'' are actually simple procedural entities.
-  Think of them as functions. Arguments are separated by colons.</p>
-
-  <p>&middot; A Jam <b>target</b> is an abstract entity identified by an
-  arbitrary string. The build-in <tt>DEPENDS</tt> rule creates a link in the
-  dependency graph between the named targets.</p>
-
-  <p>&middot; Note that the documentation for the built-in <tt>INCLUDES</tt>
-  rule is incorrect: <tt>INCLUDES targets1 : targets2</tt> causes everything
-  that depends on a member of <i>targets1</i> to depend on all members of
-  <i>targets2</i>. It does this in an odd way, by tacking <i>targets2</i>
-  onto a special tail section in the dependency list of everything in
-  <i>targets1</i>. 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 <i>targets1</i> and <i>targets2</i>.</p>
-
-  <p>&middot; When a rule is invoked, if there are <b><tt>actions</tt></b>
-  declared with the same name as the rule, the <tt>actions</tt> 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.</p>
-
-  <p>&middot; <a name="binding" id="binding">Targets</a> (other than
-  <tt>NOTFILE</tt> targets) are associated with paths in the file system
-  through a process called <a href="./Jam.html#binding">binding</a>. Binding
-  is a process of searching for a file with the same name as the target (sans
-  grist), based on the settings of the <a href=
-  "#target_specific">target-specific</a> <tt>SEARCH</tt> and <tt>LOCATE</tt>
-  variables.</p>
-
-  <p>&middot; <a name="target_specific" id="target_specific">In addition
-  to</a> local and global variables, jam allows you to set a variable
-  <tt><b>on</b></tt> a target. Target-specific variable values can usually
-  not be read, and take effect <i>only</i> in the following contexts:</p>
-
-  <ul>
-    <li>In updating <tt>actions</tt>, variable values are first looked up
-    <tt><b>on</b></tt> the target named by the first argument (the target
-    being updated). Because Jam builds its entire dependency tree before
-    executing <tt>actions</tt>, Jam rules make target-specific variable
-    settings as a way of supplying parameters to the corresponding
-    <tt>actions</tt>.</li>
-
-    <li>Binding is controlled <i>entirely</i> by the target-specific setting
-    of the <tt>SEARCH</tt> and <tt>LOCATE</tt> variables, as described
-    <a href="./Jam.html#search">here</a>.</li>
-
-    <li>In the special rule used for <a href="./Jam.html#hdrscan">header file
-    scanning</a>, variable values are first looked up <tt><b>on</b></tt> the
-    target named by the rule's first argument (the source file being
-    scanned).</li>
-  </ul>
-
-  <p>&middot; The ``<b>bound value</b>'' of a variable is the path associated
-  with the target named by the variable. In build <tt>actions</tt>, the first
-  two arguments are automatically replaced with their bound values.
-  Target-specific variables can be selectively replaced by their bound values
-  using the <a href="./Jam.html#actionmods">bind</a> action modifier.</p>
-
-  <p>&middot; Note that the term ``binding'' as used in the Jam documentation
-  indicates a phase of processing that includes three sub-phases:
-  <i>binding</i> (yes!), update determination, and header file scanning. The
-  repetition of the term ``binding'' can lead to some confusion. In
-  particular, the <a href="./Jam.html#bindingmods">Modifying Binding</a>
-  section in the Jam documentation should probably be titled ``Modifying
-  Update Determination''.</p>
-
-  <p>&middot; ``Grist'' is just a string prefix of the form
-  <tt>&lt;</tt><i>characters</i><tt>&gt;</tt>. It is used in Jam to create
-  unique target names based on simpler names. For example, the file name
-  ``<tt>test.exe</tt>'' 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 ``<tt>test.exe</tt>'' 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:</p>
-
-  <ol>
-    <li>The location of targets cannot always be derived solely from what the
-    user puts in a Jamfile, but sometimes depends also on the <a href=
-    "#binding">binding</a> process. Some mechanism to distinctly identify
-    targets with the same name is still needed.</li>
-
-    <li>Grist allows us to use a uniform abstract identifier for each built
-    target, regardless of target file location (as allowed by setting
-    <tt>ALL_LOCATE_TARGET</tt>.</li>
-  </ol>
-
-  <p>When grist is extracted from a name with
-  <tt>$(</tt><i>var</i><tt>:G)</tt>, the result includes the leading and
-  trailing angle brackets. When grist is added to a name with
-  <tt>$(</tt><i>var</i><tt>:G=</tt><i>expr</i><tt>)</tt>, existing grist is
-  first stripped. Then, if <i>expr</i> is non-empty, leading <tt>&lt;</tt>s
-  and trailing <tt>&gt;</tt>s are added if necessary to form an expression of
-  the form <tt>&lt;</tt><i>expr2</i><tt>&gt;</tt>;
-  <tt>&lt;</tt><i>expr2</i><tt>&gt;</tt> is then prepended.</p>
-
-  <p>&middot; <a name="variable_splitting" id="variable_splitting">When
-  Jam</a> is invoked it imports all environment variable settings into
-  corresponding Jam variables, followed by all command-line (<tt>-s...</tt>)
-  variable settings. Variables whose name ends in <tt>PATH</tt>,
-  <tt>Path</tt>, or <tt>path</tt> are split into string lists on OS-specific
-  path-list separator boundaries (e.g. "<tt>:</tt>" for UNIX and "<tt>;</tt>"
-  for Windows). All other variables are split on space (" ") boundaries.
-  Boost Jam modifies that behavior by allowing variables to be <a href=
-  "#variable_quoting">quoted</a>.</p>
-
-  <p>&middot; A variable whose value is an empty list <i>or</i> which
-  consists entirely of empty strings has a negative logical value. Thus, for
-  example, code like the following allows a sensible non-empty default which
-  can easily be overridden by the user:</p>
-  <pre>
-MESSAGE ?= starting jam... ;
-if $(MESSAGE) { ECHO The message is: $(MESSAGE) ; }
-</pre>
-
-  <p>If the user wants a specific message, he invokes jam with
-  <tt>"-sMESSAGE=</tt><i>message text</i><tt>"</tt>. If he wants no message,
-  he invokes jam with <tt>-sMESSAGE=</tt> and nothing at all is printed.</p>
-
-  <p>&middot; The parsing of command line options in Jam can be rather
-  unintuitive, with regards to how other Unix programs accept options. There
-  are two variants accepted as valid for an option:</p>
-
-  <ol>
-    <li><tt>-xvalue</tt>, and</li>
-
-    <li><tt>-x value</tt>.</li>
-  </ol>
-
-  <p>Please also read <a href="./Jam.html">The Jam language reference</a> for
-  the additional details.</p>
-  <hr>
-
-  <p>Revised 
-  <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
-   18 November, 2004 
-  <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
-
-  <p>Copyright 2003-2004 Rene Rivera, David Abrahams, Vladimir Prus.</p>
-
-  <p>Distributed under the Boost Software License, Version 1.0. (See
-  accompanying file LICENSE_1_0.txt or <a href=
-  "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt)</a></p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.intro.features"></a><a href="index.html#jam.intro.features" title=" Features"> Features</a></h3></div></div></div>
+<p>
+        Jam is a make(1) replacement that makes building simple things simple and
+        building complicated things manageable.
+      </p>
+<p>
+        Jam's language is expressive, making Jamfiles (c.f. Makefiles) compact.
+      </p>
+<p>
+        Jam handles header file dependencies automatically and on-the-fly.
+      </p>
+<p>
+        Jam is very portable: it runs on UNIX, VMS, Mac, and NT. Most Jamfiles themselves
+        are portable.
+      </p>
+<p>
+        Jam is unintrusive: it is small, it has negligible CPU overhead, and it doesn't
+        create any of its own funny files (c.f. Odin, nmake, SunOS make).
+      </p>
+<p>
+        Jam can build large projects spread across many directories in one pass,
+        without recursing, tracking the relationships among all files. Jam can do
+        this with multiple, concurrent processes.
+      </p>
+<p>
+        Jam isn't under the blinkin GNU copyright, so you can incorporate it into
+        commercial products.
+      </p>
+</div>
+</div>
+</div>
+<table width="100%"><tr>
+<td align="left"><small><p>Last revised: June 06, 2006 at 20:55:19 GMT</p></small></td>
+<td align="right"><small></small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="jam/building.html"><img src="images/next.png" alt="Next"></a></div>
 </body>
 </html>

Added: boost-jam/branches/upstream/current/jam/building.html
===================================================================
--- boost-jam/branches/upstream/current/jam/building.html	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jam/building.html	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,331 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Building BJam</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="up" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="prev" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="next" href="usage.html" title=" Using BJam">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src=".././boost.png"></td></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="usage.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="jam.building"></a><a href="building.html" title=" Building BJam"> Building BJam</a></h2></div></div></div>
+<p>
+      Installing <code class="literal">BJam</code> after building it is simply a matter of
+      copying the generated executables someplace in your <code class="literal">PATH</code>.
+      For building the executables there are a set of <code class="literal">build</code> bootstrap
+      scripts to accomodate particular environments. The scripts take one optional
+      argument, the name of the toolset to build with. When the toolset is not given
+      an attempt is made to detect an available toolset and use that. The build scripts
+      accept these arguments:
+    </p>
+<pre class="programlisting"><span class="emphasis"><em>build</em></span> [<span class="emphasis"><em>toolset</em></span>]
+</pre>
+<p>
+      Running the scripts without arguments will give you the best chance of success.
+      On Windows platforms from a command console do:
+    </p>
+<pre class="programlisting">cd <span class="emphasis"><em>jam source location</em></span>
+.\build.bat
+</pre>
+<p>
+      On Unix type platforms do:
+    </p>
+<pre class="programlisting">cd <span class="emphasis"><em>jam source location</em></span>
+sh ./build.sh
+</pre>
+<p>
+      For the Boost.Jam source included with the Boost distribution the <span class="emphasis"><em>jam
+      source location</em></span> is <code class="literal">BOOST_ROOT/tools/jam/src</code>.
+    </p>
+<p>
+      If the scripts fail to detect an appropriate toolset to build with your particular
+      toolset may not be auto-detectable. In that case, you can specify the toolset
+      as the first argument, this assumes that the toolset is readily available in
+      the <code class="literal">PATH</code>.
+    </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+        The toolset used to build Boost.Jam is independent of the toolsets used for
+        Boost.Build. Only one version of Boost.Jam is needed to use Boost.Build.
+      </p></td></tr>
+</table></div>
+<p>
+      The supported toolsets, and wether they are auto-detected, are:
+    </p>
+<div class="informaltable">
+<h4>
+<a name="id2508292"></a>
+        <span class="table-title">Supported Toolsets</span>
+      </h4>
+<table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>Script</th>
+<th>Platform</th>
+<th>Toolset</th>
+<th>Detection</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><code class="literal">build.bat</code></td>
+<td>Windows NT, 2000, and
+            XP</td>
+<td> <a href="http://www.borland.com/bcppbuilder/freecompiler" target="_top"><code class="literal">borland</code></a><br>
+            <a href="http://www.borland.com/" target="_top">Borland</a> C++Builder (BCC
+            5.5)</td>
+<td> * Common install location: "<code class="literal">C:\Borland\BCC55</code>"<br>
+            * <code class="literal">BCC32.EXE</code> in <code class="literal">PATH</code> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.comeaucomputing.com/" target="_top"><code class="literal">como</code></a><br>
+            Comeau Computing C/C++</td>
+<td> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://gcc.gnu.org/" target="_top"><code class="literal">gcc</code></a><br>
+            GNU GCC</td>
+<td> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://gcc.gnu.org/" target="_top"><code class="literal">gcc-nocygwin</code></a><br>
+            GNU GCC</td>
+<td> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.intel.com/software/products/compilers/c60" target="_top"><code class="literal">intel-win32</code></a><br>
+            Intel C++ Compiler for Windows</td>
+<td> * <code class="literal">ICL.EXE</code>
+            in <code class="literal">PATH</code> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.metrowerks.com/" target="_top"><code class="literal">metrowerks</code></a><br>
+            MetroWerks CodeWarrior C/C++ 7.x, 8.x, 9.x</td>
+<td> * <code class="literal">CWFolder</code>
+            variable configured * <code class="literal">MWCC.EXE</code> in <code class="literal">PATH</code>
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.mingw.org/" target="_top"><code class="literal">mingw</code></a><br>
+            GNU <a href="http://gcc.gnu.org/" target="_top">GCC</a> as the <a href="http://www.mingw.org/" target="_top">MinGW</a>
+            configuration</td>
+<td> * Common install location: "<code class="literal">C:\MinGW</code>"
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://msdn.microsoft.com/visualc/" target="_top"><code class="literal">msvc</code></a><br>
+            Microsoft Visual C++ 6.x</td>
+<td> * <code class="literal">VCVARS32.BAT</code>
+            already configured<br> * <code class="literal">%MSVCDir%</code> is present in
+            environment<br> * Common install locations: "<code class="literal">%ProgramFiles%\Microsoft
+            Visual Studio</code>", "<code class="literal">%ProgramFiles%\Microsoft
+            Visual C++</code>"<br> * <code class="literal">CL.EXE</code> in <code class="literal">PATH</code><br>
+            * <code class="literal">VCVARS32.BAT</code> in <code class="literal">PATH</code> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://msdn.microsoft.com/visualc/" target="_top"><code class="literal">vc7</code></a><br>
+            Microsoft Visual C++ 7.x</td>
+<td> * <code class="literal">VCVARS32.BAT</code>
+            or <code class="literal">VSVARS32.BAT</code> already configured * <code class="literal">%VS71COMNTOOLS%</code>
+            is present in environment<br> * <code class="literal">%VCINSTALLDIR%</code> is
+            present in environment<br> * Common install locations: "<code class="literal">%ProgramFiles%\Microsoft
+            Visual Studio .NET</code>", "<code class="literal">%ProgramFiles%\Microsoft
+            Visual Studio .NET 2003</code>"<br> * <code class="literal">CL.EXE</code>
+            in <code class="literal">PATH</code><br> * <code class="literal">VCVARS32.BAT</code> in
+            <code class="literal">PATH</code> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://msdn.microsoft.com/visualc/" target="_top"><code class="literal">vc8</code></a><br>
+            Microsoft Visual C++ 8.x</td>
+<td> * <code class="literal">VCVARS32.BAT</code>
+            or <code class="literal">VSVARS32.BAT</code> already configured<br> * <code class="literal">%VS80COMNTOOLS%</code>
+            is present in environment<br> * Common install location: "<code class="literal">%ProgramFiles%\Microsoft
+            Visual Studio 8</code>"<br> * <code class="literal">CL.EXE</code> in
+            <code class="literal">PATH</code><br> * <code class="literal">VCVARS32.BAT</code> in <code class="literal">PATH</code>
+            </td>
+</tr>
+<tr>
+<td><code class="literal">build.sh</code></td>
+<td>Unix, Linux, Cygwin,
+            etc.</td>
+<td> <a href="http://www.hp.com/go/c++" target="_top"><code class="literal">acc</code></a><br>
+            HP-UX aCC</td>
+<td> * <code class="literal">aCC</code> in <code class="literal">PATH</code><br>
+            * <code class="literal">uname</code> is "HP-UX" </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.comeaucomputing.com/" target="_top"><code class="literal">como</code></a><br>
+            Comeau Computing C/C++</td>
+<td> * como in <code class="literal">PATH</code>
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://gcc.gnu.org/" target="_top"><code class="literal">gcc</code></a><br>
+            GNU GCC</td>
+<td> * gcc in <code class="literal">PATH</code> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.intel.com/software/products/compilers/c60l/" target="_top"><code class="literal">intel-linux</code></a><br>
+            Intel C++ for Linux</td>
+<td> * <code class="literal">icc</code> in <code class="literal">PATH</code><br>
+            * Common install locations: "<code class="literal">/opt/intel/cc/9.0</code>",
+            "<code class="literal">/opt/intel_cc_80</code>", "<code class="literal">/opt/intel/compiler70</code>",
+            "<code class="literal">/opt/intel/compiler60</code>", "<code class="literal">/opt/intel/compiler50</code>"
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <code class="literal">kcc</code><br>
+            Intel KAI C++</td>
+<td> * <code class="literal">KCC</code> in <code class="literal">PATH</code>
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.borland.com/bcppbuilder/freecompiler" target="_top"><code class="literal">kylix</code></a><br>
+            <a href="http://www.borland.com/" target="_top">Borland</a> C++Builder</td>
+<td>
+            * bc++ in PATH </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.sgi.com/developers/devtools/languages/mipspro.html" target="_top"><code class="literal">mipspro</code></a><br>
+            SGI MIPSpro C</td>
+<td> * <code class="literal">uname</code> is "<code class="literal">IRIX</code>"
+            or "<code class="literal">IRIX64</code>" </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <code class="literal">sunpro</code><br>
+            Sun Workshop 6 C++</td>
+<td> * Standard install location: "<code class="literal">/opt/SUNWspro</code>"
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <code class="literal">qcc</code><br>
+            <a href="http://www.qnx.com/" target="_top">QNX Neutrino</a>
+</td>
+<td>
+            * <code class="literal">uname</code> is "<code class="literal">QNX</code>" and
+            <code class="literal">qcc</code> in <code class="literal">PATH</code> </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www.tru64unix.compaq.com/cplus/" target="_top"><code class="literal">true64cxx</code></a><br>
+            Compaq C++ Compiler for True64 UNIX</td>
+<td> * <code class="literal">uname</code>
+            is "<code class="literal">OSF1</code>" </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td> <a href="http://www-3.ibm.com/software/ad/vacpp/" target="_top"><code class="literal">vacpp</code></a><br>
+            IBM VisualAge C++</td>
+<td> * <code class="literal">xlc</code> in <code class="literal">PATH</code>
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td>MacOS X</td>
+<td> <a href="http://developer.apple.com/tools/compilers.html" target="_top"><code class="literal">darwin</code></a><br>
+            Apple MacOS X GCC</td>
+<td> * <code class="literal">uname</code> is "<code class="literal">Darwin</code>"
+            </td>
+</tr>
+<tr>
+<td> </td>
+<td>Windows NT, 2000, and XP</td>
+<td> <a href="http://www.mingw.org/" target="_top"><code class="literal">mingw</code></a><br> GNU
+            <a href="http://gcc.gnu.org/" target="_top">GCC</a> as the <a href="http://www.mingw.org/" target="_top">MinGW</a>
+            configuration with the MSYS shell</td>
+<td> * Common install location:
+            "<code class="literal">/mingw</code>" </td>
+</tr>
+</tbody>
+</table>
+</div>
+<p>
+      The built executables are placed in a subdirectory specific to your platform.
+      For example, in Linux running on an Intel x86 compatible chip, the executables
+      are placed in: "<code class="literal">bin.linuxx86</code>". The <code class="literal">bjam[.exe]</code>
+      executable can be used to invoke Boost.Build.
+    </p>
+<p>
+      The build scripts support additional invocation arguments for use by developers
+      of Boost.Jam. The extra arguments come after the toolset, and can take the
+      form of "<code class="literal">--option</code>" or targets for the <code class="literal">build.jam</code>
+      script:
+    </p>
+<pre class="programlisting"><span class="emphasis"><em>build</em></span> [<span class="emphasis"><em>toolset</em></span>] [--<span class="emphasis"><em>option</em></span>+ <span class="emphasis"><em>target</em></span>*]
+</pre>
+<p>
+      There is currently only one available option, "<code class="literal">--debug</code>",
+      which builds debugging versions of the executable. When built they are placed
+      in their own directory "<code class="literal">bin./platform/.debug</code>".
+      To specify targets without options, one can suply a special ignore option "<code class="literal">---</code>".
+    </p>
+<p>
+      Currently there are two targets supported: <code class="literal">dist</code>, and <code class="literal">clean</code>.
+      Respectively they: generate packages (compressed archives) as appropriate for
+      distribution in the platform, or remove all the built executables and objects.
+    </p>
+</div>
+<table width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2003-2006 Rene
+      Rivera, David Abrahams, Vladimir Prus</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="usage.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: boost-jam/branches/upstream/current/jam/language.html
===================================================================
--- boost-jam/branches/upstream/current/jam/language.html	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jam/language.html	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,1597 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Language</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="up" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="prev" href="usage.html" title=" Using BJam">
+<link rel="next" href="miscellaneous.html" title="Miscellaneous">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src=".././boost.png"></td></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="usage.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="miscellaneous.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="jam.language"></a><a href="language.html" title=" Language"> Language</a></h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="language.html#jam.language.lexical"> Lexical Features</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.target"> Targets</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.rules"> Rules</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.flow_of_control">Flow-of-Control</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables">Variables</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules">Modules</a></span></dt>
+</dl></div>
+<p>
+      <code class="literal">BJam</code> has an interpreted, procedural language. Statements
+      in <code class="literal">bjam</code> are rule (procedure) definitions, rule invocations,
+      flow-of-control structures, variable assignments, and sundry language support.
+    </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.language.lexical"></a><a href="language.html#jam.language.lexical" title=" Lexical Features"> Lexical Features</a></h3></div></div></div>
+<p>
+        <code class="literal">BJam</code> 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 as a single string. A backslash
+        (\) can escape a double quote, or any single whitespace character.
+      </p>
+<p>
+        <code class="literal">BJam</code> requires whitespace (blanks, tabs, or newlines) to
+        surround all tokens, including the colon (:) and semicolon (;) tokens.
+      </p>
+<p>
+        <code class="literal">BJam</code> keywords (an 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.
+      </p>
+<p>
+        Comments start with the <code class="literal">#</code> character and extend until the
+        end of line.
+      </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.language.target"></a><a href="language.html#jam.language.target" title=" Targets"> Targets</a></h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="language.html#jam.language.target.binding_detection">Binding Detection</a></span></dt></dl></div>
+<p>
+        The essential <code class="literal">bjam</code> data entity is a target. Build 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.
+      </p>
+<p>
+        A file target's identifier is generally the file's name, which can be absolutely
+        rooted, relative to the directory of <code class="literal">bjam</code>'s invocation,
+        or simply local (no directory). Most often it is the last case, and the actual
+        file path is bound using the <code class="literal">$(SEARCH)</code> and <code class="literal">$(LOCATE)</code>
+        special variables. See <a href="language.html#jam.language.variables.builtins.search" title=" SEARCH and
+          LOCATE">SEARCH
+        and LOCATE Variables</a> 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 <span class="emphasis"><em>file(member)</em></span> is a library
+        member (usually an <code class="literal">ar</code>(1) archive on Unix).
+      </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.target.binding_detection"></a><a href="language.html#jam.language.target.binding_detection" title="Binding Detection">Binding Detection</a></h4></div></div></div>
+<p>
+          Whenever a target is bound to a location in the filesystem, Boost Jam will
+          look for a variable called <code class="literal">BINDRULE</code> (first "on"
+          the target being bound, then in the global module). If non-empty, <code class="literal">$(BINDRULE[1])</code>
+          names a rule which is called with the name of the target and the path it
+          is being bound to. The signature of the rule named by <code class="literal">$(BINDRULE[1])</code>
+          should match the following:
+        </p>
+<pre class="programlisting">rule <span class="emphasis"><em>bind-rule</em></span> ( <span class="emphasis"><em>target</em></span> : <span class="emphasis"><em>path</em></span> )
+</pre>
+<p>
+          This facility is useful for correct header file scanning, since many compilers
+          will search for <code class="computeroutput"><span class="preprocessor">#include</span></code>
+          files first in the directory containing the file doing the <code class="computeroutput"><span class="preprocessor">#include</span></code> directive. <code class="literal">$(BINDRULE)</code>
+          can be used to make a record of that directory.
+        </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.language.rules"></a><a href="language.html#jam.language.rules" title=" Rules"> Rules</a></h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="language.html#jam.language.rules.action_modifiers">Action Modifiers</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.rules.argument_lists">Argument lists</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.rules.builtins"> Built-in Rules</a></span></dt>
+</dl></div>
+<p>
+        The basic <code class="literal">bjam</code> 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.
+      </p>
+<p>
+        Rules can return values, which can be expanded into a list with "[
+        <span class="emphasis"><em>rule</em></span> <span class="emphasis"><em>args</em></span> ... ]". 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.
+      </p>
+<p>
+        The <code class="literal">bjam</code> statements for defining and invoking rules are
+        as follows:
+      </p>
+<p>
+        Define a rule's procedure, replacing any previous definition.
+      </p>
+<pre class="programlisting">rule <span class="emphasis"><em>rulename</em></span> { <span class="emphasis"><em>statements</em></span> }
+</pre>
+<p>
+        Define a rule's updating actions, replacing any previous definition.
+      </p>
+<pre class="programlisting">actions [ <span class="emphasis"><em>modifiers</em></span> ] <span class="emphasis"><em>rulename</em></span> { <span class="emphasis"><em>commands</em></span> }
+</pre>
+<p>
+        Invoke a rule.
+      </p>
+<pre class="programlisting"><span class="emphasis"><em>rulename</em></span> <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ;
+</pre>
+<p>
+        Invoke a rule under the influence of target's specific variables..
+      </p>
+<pre class="programlisting">on <span class="emphasis"><em>target</em></span> <span class="emphasis"><em>rulename</em></span> <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ;
+</pre>
+<p>
+        Used as an argument, expands to the return value of the rule invoked.
+      </p>
+<pre class="programlisting">[ <span class="emphasis"><em>rulename</em></span> <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ]
+[ on <span class="emphasis"><em>target</em></span> <span class="emphasis"><em>rulename</em></span> <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ]
+</pre>
+<p>
+        A rule is invoked with values in <span class="emphasis"><em>field1</em></span> through <span class="emphasis"><em>fieldN</em></span>.
+        They may be referenced in the procedure's statements as <code class="literal">$(1)</code>
+        through <code class="literal">$(<span class="emphasis"><em>N</em></span>)</code> (9 max), and the first
+        two only may be referenced in the action's <span class="emphasis"><em>commands</em></span>
+        as <code class="literal">$(1)</code> and <code class="literal">$(2)</code>. <code class="literal">$(&lt;)</code>
+        and <code class="literal">$(&gt;)</code> are synonymous with <code class="literal">$(1)</code>
+        and <code class="literal">$(2)</code>.
+      </p>
+<p>
+        Rules fall into two categories: updating rules (with actions), and pure procedure
+        rules (without actions). Updating rules treat arguments <code class="literal">$(1)</code>
+        and <code class="literal">$(2)</code> as built targets and sources, respectively, while
+        pure procedure rules can take arbitrary arguments.
+      </p>
+<p>
+        When an updating rule is invoked, its updating actions are added to those
+        associated with its built targets (<code class="literal">$(1)</code>) before the rule's
+        procedure is run. Later, to build the targets in the updating phase, <span class="emphasis"><em>commands</em></span>
+        are passed to the OS command shell, with <code class="literal">$(1)</code> and <code class="literal">$(2)</code>
+        replaced by bound versions of the target names. See Binding above.
+      </p>
+<p>
+        Rule invocation may be indirected through a variable:
+      </p>
+<pre class="programlisting">$(<span class="emphasis"><em>var</em></span>) <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ;
+
+on <span class="emphasis"><em>target</em></span> $(<span class="emphasis"><em>var</em></span>) <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ;
+
+[ $(<span class="emphasis"><em>var</em></span>) <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ]
+[ on <span class="emphasis"><em>target</em></span> $(<span class="emphasis"><em>var</em></span>) <span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span> : <span class="emphasis"><em>...</em></span> : <span class="emphasis"><em>fieldN</em></span> ]
+</pre>
+<p>
+        The variable's value names the rule (or rules) to be invoked. A rule is invoked
+        for each element in the list of <code class="literal">$(<span class="emphasis"><em>var</em></span>)</code>'s
+        values. The fields <code class="literal"><span class="emphasis"><em>field1</em></span> : <span class="emphasis"><em>field2</em></span>
+        : <span class="emphasis"><em>...</em></span></code> are passed as arguments for each invokation.
+        For the [ ... ] forms, the return value is the concatenation of the return
+        values for all of the invocations.
+      </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.rules.action_modifiers"></a><a href="language.html#jam.language.rules.action_modifiers" title="Action Modifiers">Action Modifiers</a></h4></div></div></div>
+<p>
+          The following action modifiers are understood:
+        </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">actions bind <span class="emphasis"><em>vars</em></span></code></span></dt>
+<dd>
+<code class="literal">$(<span class="emphasis"><em>vars</em></span>)</code> will be replaced with
+            bound values.
+          </dd>
+<dt><span class="term"><code class="literal">actions existing</code></span></dt>
+<dd>
+<code class="literal">$(&gt;)</code> includes only source targets currently existing.
+          </dd>
+<dt><span class="term"><code class="literal">actions ignore</code></span></dt>
+<dd>
+            The return status of the commands is ignored.
+          </dd>
+<dt><span class="term"><code class="literal">actions piecemeal</code></span></dt>
+<dd>
+            commands are repeatedly invoked with a subset of <code class="literal">$(&gt;)</code>
+            small enough to fit in the command buffer on this OS.
+          </dd>
+<dt><span class="term"><code class="literal">actions quietly</code></span></dt>
+<dd>
+            The action is not echoed to the standard output.
+          </dd>
+<dt><span class="term"><code class="literal">actions together</code></span></dt>
+<dd>
+            The <code class="literal">$(&gt;)</code> from multiple invocations of the same
+            action on the same built target are glommed together.
+          </dd>
+<dt><span class="term"><code class="literal">actions updated</code></span></dt>
+<dd>
+<code class="literal">$(&gt;)</code> includes only source targets themselves marked
+            for updating.
+          </dd>
+</dl>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.rules.argument_lists"></a><a href="language.html#jam.language.rules.argument_lists" title="Argument lists">Argument lists</a></h4></div></div></div>
+<p>
+          You can describe the arguments accepted by a rule, and refer to them by
+          name within the rule. For example, the following prints "I'm sorry,
+          Dave" to the console:
+        </p>
+<pre class="programlisting">rule report ( pronoun index ? : state : names + )
+{
+    local he.suffix she.suffix it.suffix = s ;
+    local I.suffix = m ;
+    local they.suffix you.suffix = re ;
+    ECHO $(pronoun)'$($(pronoun).suffix) $(state), $(names[$(index)]) ;
+}
+report I 2 : sorry : Joe Dave Pete ;
+</pre>
+<p>
+          Each name in a list of formal arguments (separated by "<code class="literal">:</code>"
+          in the rule declaration) is bound to a single element of the corresponding
+          actual argument unless followed by one of these modifiers:
+        </p>
+<div class="informaltable">
+<h4>
+<a name="id2558760"></a>
+          </h4>
+<table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>Symbol</th>
+<th>Semantics of preceding symbol</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><code class="literal">?</code></td>
+<td>optional</td>
+</tr>
+<tr>
+<td><code class="literal">*</code></td>
+<td>Bind to zero or more unbound
+                elements of the actual argument. When <code class="literal">*</code> appears
+                where an argument name is expected, any number of additional arguments
+                are accepted. This feature can be used to implement "varargs"
+                rules.</td>
+</tr>
+<tr>
+<td><code class="literal">+</code></td>
+<td>Bind to one or more unbound
+                elements of the actual argument.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<p>
+          The actual and formal arguments are checked for inconsistencies, which
+          cause Jam to exit with an error code:
+        </p>
+<pre class="programlisting">### argument error
+# rule report ( pronoun index ?  : state  : names + )
+# called with: ( I 2 foo  : sorry  : Joe Dave Pete )
+# extra argument foo
+### argument error
+# rule report ( pronoun index ?  : state  : names + )
+# called with: ( I 2  : sorry )
+# missing argument names
+</pre>
+<p>
+          If you omit the list of formal arguments, all checking is bypassed as in
+          "classic" Jam. Argument lists drastically improve the reliability
+          and readability of your rules, however, and are <span class="bold"><strong>strongly
+          recommended</strong></span> for any new Jam code you write.
+        </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.rules.builtins"></a><a href="language.html#jam.language.rules.builtins" title=" Built-in Rules"> Built-in Rules</a></h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="language.html#jam.language.rules.builtins.dependency_building">Dependency
+          Building</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.rules.builtins.modifying_binding">Modifying
+          Binding</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.rules.builtins.utility">Utility</a></span></dt>
+</dl></div>
+<p>
+          <code class="literal">BJam</code> has a growing set of 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.
+        </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.rules.builtins.dependency_building"></a><a href="language.html#jam.language.rules.builtins.dependency_building" title="Dependency
+          Building">Dependency
+          Building</a></h5></div></div></div>
+<pre class="programlisting">DEPENDS <span class="emphasis"><em>targets1</em></span> : <span class="emphasis"><em>targets2</em></span> ;
+</pre>
+<p>
+            Builds a direct dependency: makes each of <span class="emphasis"><em>targets1</em></span>
+            depend on each of <span class="emphasis"><em>targets2</em></span>. Generally, <span class="emphasis"><em>targets1</em></span>
+            will be rebuilt if <span class="emphasis"><em>targets2</em></span> are themselves rebuilt
+            are or are newer than <span class="emphasis"><em>targets1</em></span>.
+          </p>
+<pre class="programlisting">INCLUDES <span class="emphasis"><em>targets1</em></span> : <span class="emphasis"><em>targets2</em></span> ;
+</pre>
+<p>
+            Builds a sibling dependency: makes any target that depends on any of
+            <span class="emphasis"><em>targets1</em></span> also depend on each of <span class="emphasis"><em>targets2</em></span>.
+            This reflects the dependencies that arise when one source file includes
+            another: the object built from the source file depends both on the original
+            and included source file, but the two sources files don't depend on each
+            other. For example:
+          </p>
+<pre class="programlisting">DEPENDS foo.o : foo.c ;
+INCLUDES foo.c : foo.h ;
+</pre>
+<p>
+            "<code class="literal">foo.o</code>" depends on "<code class="literal">foo.c</code>"
+            and "<code class="literal">foo.h</code>" in this example.
+          </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.rules.builtins.modifying_binding"></a><a href="language.html#jam.language.rules.builtins.modifying_binding" title="Modifying
+          Binding">Modifying
+          Binding</a></h5></div></div></div>
+<p>
+            The six rules <code class="literal">ALWAYS</code>, <code class="literal">LEAVES</code>,
+            <code class="literal">NOCARE</code>, <code class="literal">NOTFILE</code>, <code class="literal">NOUPDATE</code>,
+            and <code class="literal">TEMPORARY</code> modify the dependency graph so that
+            <code class="literal">bjam</code> treats the targets differently during its target
+            binding phase. See Binding above. Normally, <code class="literal">bjam</code> updates
+            a target if it is missing, if its filesystem modification time is older
+            than any of its dependencies (recursively), or if any of its dependencies
+            are being updated. This basic behavior can be changed by invoking the
+            following rules:
+          </p>
+<pre class="programlisting">ALWAYS <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            Causes <span class="emphasis"><em>targets</em></span> to be rebuilt regardless of whether
+            they are up-to-date (they must still be in the dependency graph). This
+            is used for the clean and uninstall targets, as they have no dependencies
+            and would otherwise appear never to need building. It is best applied
+            to targets that are also <code class="literal">NOTFILE</code> targets, but it can
+            also be used to force a real file to be updated as well.
+          </p>
+<pre class="programlisting">LEAVES <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            Makes each of <span class="emphasis"><em>targets</em></span> depend only on its leaf sources,
+            and not on any intermediate targets. This makes it immune to its dependencies
+            being updated, as the "leaf" dependencies are those without
+            their own dependencies and without updating actions. This allows a target
+            to be updated only if original source files change.
+          </p>
+<pre class="programlisting">NOCARE <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            Causes <code class="literal">bjam</code> to ignore <span class="emphasis"><em>targets</em></span>
+            that neither can be found nor have updating actions to build them. Normally
+            for such targets <code class="literal">bjam</code> issues a warning and then skips
+            other targets that depend on these missing targets. The <code class="literal">HdrRule</code>
+            in <code class="literal">Jambase</code> uses <code class="literal">NOCARE</code> on the header
+            file names found during header file scanning, to let <code class="literal">bjam</code>
+            know that the included files may not exist. For example, if an <code class="computeroutput"><span class="preprocessor">#include</span></code> is within an <code class="computeroutput"><span class="preprocessor">#ifdef</span></code>, the included file may not
+            actually be around.
+          </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+              For targets with build actions: if their build actions exit with a
+              nonzero return code, dependent targets will still be built.
+            </p></td></tr>
+</table></div>
+<pre class="programlisting">NOTFILE <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            Marks <span class="emphasis"><em>targets</em></span> as pseudotargets and not real files.
+            No timestamp is checked, and so the actions on such a target are only
+            executed if the target's dependencies are updated, or if the target is
+            also marked with <code class="literal">ALWAYS</code>. The default <code class="literal">bjam</code>
+            target "<code class="literal">all</code>" is a pseudotarget. In <code class="literal">Jambase</code>,
+            <code class="literal">NOTFILE</code> is used to define several addition convenient
+            pseudotargets.
+          </p>
+<pre class="programlisting">NOUPDATE <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            Causes the timestamps on <span class="emphasis"><em>targets</em></span> to be ignored.
+            This has two effects: first, once the target has been created it will
+            never be updated; second, manually updating target will not cause other
+            targets to be updated. In <code class="literal">Jambase</code>, for example, this
+            rule is applied to directories by the <code class="literal">MkDir</code> rule,
+            because <code class="literal">MkDir</code> only cares that the target directory
+            exists, not when it has last been updated.
+          </p>
+<pre class="programlisting">TEMPORARY <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            Marks <span class="emphasis"><em>targets</em></span> as temporary, allowing them to be
+            removed after other targets that depend upon them have been updated.
+            If a <code class="literal">TEMPORARY</code> target is missing, <code class="literal">bjam</code>
+            uses the timestamp of the target's parent. <code class="literal">Jambase</code>
+            uses <code class="literal">TEMPORARY</code> to mark object files that are archived
+            in a library after they are built, so that they can be deleted after
+            they are archived.
+          </p>
+<pre class="programlisting">FAIL_EXPECTED <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            For handling targets whose build actions are expected to fail (e.g. when
+            testing that assertions or compile-time type checkin work properly),
+            Boost Jam supplies the <code class="literal">FAIL_EXPECTED</code> rule in the same
+            style as <code class="literal">NOCARE</code>, et. al. During target updating, the
+            return code of the build actions for arguments to <code class="literal">FAIL_EXPECTED</code>
+            is inverted: if it fails, building of dependent targets continues as
+            though it succeeded. If it succeeds, dependent targets are skipped.
+          </p>
+<pre class="programlisting">RMOLD <span class="emphasis"><em>targets</em></span> ;
+</pre>
+<p>
+            <code class="literal">BJam</code> removes any target files that may exist on disk
+            when the rule used to build those targets fails. However, targets whose
+            dependencies fail to build are not removed by default. The <code class="literal">RMOLD</code>
+            rule causes its arguments to be removed if any of their dependencies
+            fail to build.
+          </p>
+<pre class="programlisting">rule ISFILE ( <span class="emphasis"><em>targets</em></span> * )
+</pre>
+<p>
+            <code class="literal">ISFILE</code> marks targets as required to be files. This
+            changes the way <code class="literal">bjam</code> searches for the target such
+            that it ignores mathes for file system items that are not file, like
+            directories. This makes it possible to avoid <code class="computeroutput"><span class="preprocessor">#include</span> <span class="string">"exception"</span></code> matching if one happens
+            to have a directory named exception in the header search path.
+          </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+              This is currently not fully implemented.
+            </p></td></tr>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.rules.builtins.utility"></a><a href="language.html#jam.language.rules.builtins.utility" title="Utility">Utility</a></h5></div></div></div>
+<p>
+            The two rules <code class="literal">ECHO</code> and <code class="literal">EXIT</code> are
+            utility rules, used only in <code class="literal">bjam</code>'s parsing phase.
+          </p>
+<pre class="programlisting">ECHO <span class="emphasis"><em>args</em></span> ;
+</pre>
+<p>
+            Blurts out the message <span class="emphasis"><em>args</em></span> to stdout.
+          </p>
+<pre class="programlisting">rule EXIT ( <span class="emphasis"><em>message</em></span> * : <span class="emphasis"><em>result-value</em></span> ? )
+</pre>
+<p>
+            Blurts out the <span class="emphasis"><em>message</em></span> to stdout and then exits
+            with a failure status if no <span class="emphasis"><em>result-value</em></span> is given,
+            otherwise it exits with the given <span class="emphasis"><em>result-value</em></span>.
+          </p>
+<p>
+            "<code class="literal">Echo</code>", "<code class="literal">echo</code>",
+            "<code class="literal">Exit</code>", and "<code class="literal">exit</code>"
+            are accepted as aliases for <code class="literal">ECHO</code> and <code class="literal">EXIT</code>,
+            since it is hard to tell that these are built-in rules and not part of
+            the language, like "<code class="literal">include</code>".
+          </p>
+<p>
+            The <code class="literal">GLOB</code> rule does filename globbing.
+          </p>
+<pre class="programlisting">GLOB <span class="emphasis"><em>directories</em></span> : <span class="emphasis"><em>patterns</em></span> : <span class="emphasis"><em>downcase-opt</em></span>
+</pre>
+<p>
+            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 "<code class="literal">[ ]</code>". For example: "<code class="literal">FILES
+            = [ GLOB dir1 dir2 : *.c *.h ]</code>" sets <code class="literal">FILES</code>
+            to the list of C source and header files in <code class="literal">dir1</code> and
+            <code class="literal">dir2</code>. The resulting filenames are the full pathnames,
+            including the directory, but the pattern is applied only to the file
+            name without the directory.
+          </p>
+<p>
+            If <span class="emphasis"><em>downcase-opt</em></span> is supplied, filenames are converted
+            to all-lowercase before matching against the pattern; you can use this
+            to do case-insensitive matching using lowercase patterns. The paths returned
+            will still have mixed case if the OS supplies them. On Windows NT and
+            Cygwin, filenames are always downcased before matching.
+          </p>
+<p>
+            The <code class="literal">MATCH</code> rule does pattern matching.
+          </p>
+<pre class="programlisting">MATCH <span class="emphasis"><em>regexps</em></span> : <span class="emphasis"><em>list</em></span>
+</pre>
+<p>
+            Matches the <code class="literal">egrep</code>(1) style regular expressions <span class="emphasis"><em>regexps</em></span>
+            against the strings in <span class="emphasis"><em>list</em></span>. The result is the concatenation
+            of matching <code class="literal">()</code> subexpressions for each string in
+            <span class="emphasis"><em>list</em></span>, and for each regular expression in <span class="emphasis"><em>regexps</em></span>.
+            Only useful within the "<code class="literal">[ ]</code>" construct,
+            to change the result into a list.
+          </p>
+<pre class="programlisting">rule BACKTRACE ( )
+</pre>
+<p>
+            Returns a list of quadruples: <span class="emphasis"><em>filename</em></span> <span class="emphasis"><em>line</em></span> <span class="emphasis"><em>module</em></span> <span class="emphasis"><em>rulename</em></span>...,
+            describing each shallower level of the call stack. This rule can be used
+            to generate useful diagnostic messages from Jam rules.
+          </p>
+<pre class="programlisting">rule UPDATE ( <span class="emphasis"><em>targets</em></span> * )
+</pre>
+<p>
+            Classic jam treats any non-option element of command line as a name of
+            target to be updated. This prevented more sophisticated handling of command
+            line. This is now enabled again but with additional changes to the <code class="literal">UPDATE</code>
+            rule to allow for the flexibility of changing the list of targets to
+            update. The UPDATE rule has two effects:
+          </p>
+<div class="orderedlist"><ol type="1">
+<li>
+              It clears the list of targets to update, and
+            </li>
+<li>
+              Causes the specified targets to be updated.
+            </li>
+</ol></div>
+<p>
+            If no target was specified with the <code class="literal">UPDATE</code> rule, no
+            targets will be updated. To support changing of the update list in more
+            usefull ways, the rule also returns the targets previously in the update
+            list. This makes it possible to add targets as such:
+          </p>
+<pre class="programlisting">local previous-updates = [ UPDATE ] ;
+UPDATE $(previous-updates) a-new-target ;
+</pre>
+<pre class="programlisting">rule W32_GETREG ( <span class="emphasis"><em>path</em></span> : <span class="emphasis"><em>data</em></span> ? )
+</pre>
+<p>
+            Defined only for win32 platform. It reads the registry of Windows. '<span class="emphasis"><em>path</em></span>'
+            is the location of the information, and '<span class="emphasis"><em>data</em></span>' is
+            the name of the value which we want to get. If '<span class="emphasis"><em>data</em></span>'
+            is omitted, the default value of '<span class="emphasis"><em>path</em></span>' will be
+            returned. The '<span class="emphasis"><em>path</em></span>' value must conform to MS key
+            path format and must be prefixed with one of the predefined root keys.
+            As usual,
+          </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+              '<code class="literal">HKLM</code>' is equivalent to '<code class="literal">HKEY_LOCAL_MACHINE</code>'.
+            </li>
+<li>
+              '<code class="literal">HKCU</code>' is equivalent to '<code class="literal">HKEY_CURRENT_USER</code>'.
+            </li>
+<li>
+              '<code class="literal">HKCR</code>' is equivalent to '<code class="literal">HKEY_CLASSES_ROOT</code>'.
+            </li>
+</ul></div>
+<p>
+            Other predefined root keys are not supported.
+          </p>
+<p>
+            Currently supported data types : '<code class="literal">REG_DWORD</code>', '<code class="literal">REG_SZ</code>',
+            '<code class="literal">REG_EXPAND_SZ</code>', '<code class="literal">REG_MULTI_SZ</code>'.
+            The data with '<code class="literal">REG_DWORD</code>' type will be turned into
+            a string, '<code class="literal">REG_MULTI_SZ</code>' into a list of strings, and
+            for those with '<code class="literal">REG_EXPAND_SZ</code>' type environment variables
+            in it will be replaced with their defined values. The data with '<code class="literal">REG_SZ</code>'
+            type and other unsupported types will be put into a string without modification.
+            If it can't receive the value of the data, it just return an empty list.
+            For example,
+          </p>
+<pre class="programlisting">local PSDK-location =
+  [ W32_GETREG HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\Directories : "Install Dir" ] ;
+</pre>
+<pre class="programlisting">rule SHELL ( <span class="emphasis"><em>command</em></span> : * )
+</pre>
+<p>
+            <code class="literal">SHELL</code> executes <span class="emphasis"><em>command</em></span>, and then
+            returns the standard output of <span class="emphasis"><em>command</em></span>. <code class="literal">SHELL</code>
+            only works on platforms with a <code class="literal">popen()</code> function in
+            the C library. On platforms without a working <code class="literal">popen()</code>
+            function, <code class="literal">SHELL</code> is implemented as a no-op. <code class="literal">SHELL</code>
+            works on Unix, MacOS X, and most Windows compilers. <code class="literal">SHELL</code>
+            is a no-op on Metrowerks compilers under Windows. There is a variable
+            set of allowed options as additional arguments:
+          </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">exit-status</code></span></dt>
+<dd>
+              In addition to the output the result status of the executed command
+              is returned as a second element of the result.
+            </dd>
+<dt><span class="term"><code class="literal">no-output</code></span></dt>
+<dd>
+              Don't capture the output of the command. Instead an empty ("")
+              string value is returned in place of the output.
+            </dd>
+</dl>
+</div>
+<p>
+            Because the Perforce/Jambase defines a <code class="literal">SHELL</code> rule
+            which hides the builtin rule, <code class="literal">COMMAND</code> can be used
+            as an alias for <code class="literal">SHELL</code> in such a case.
+          </p>
+</div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.language.flow_of_control"></a><a href="language.html#jam.language.flow_of_control" title="Flow-of-Control">Flow-of-Control</a></h3></div></div></div>
+<p>
+        <code class="literal">BJam</code> has several simple flow-of-control statements:
+      </p>
+<pre class="programlisting">for <span class="emphasis"><em>var</em></span> in <span class="emphasis"><em>list</em></span> { <span class="emphasis"><em>statements</em></span> }
+</pre>
+<p>
+        Executes <span class="emphasis"><em>statements</em></span> for each element in <span class="emphasis"><em>list</em></span>,
+        setting the variable <span class="emphasis"><em>var</em></span> to the element value.
+      </p>
+<pre class="programlisting">if <span class="emphasis"><em>cond</em></span> { <span class="emphasis"><em>statements</em></span> }
+[ else { <span class="emphasis"><em>statements</em></span> } ]
+</pre>
+<p>
+        Does the obvious; the <code class="literal">else</code> clause is optional. <span class="emphasis"><em>cond</em></span>
+        is built of:
+      </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span></code></span></dt>
+<dd>
+          true if any <span class="emphasis"><em>a</em></span> element is a non-zero-length string
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> = <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+          list <span class="emphasis"><em>a</em></span> matches list <span class="emphasis"><em>b</em></span> string-for-string
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> != <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+          list <span class="emphasis"><em>a</em></span> does not match list <span class="emphasis"><em>b</em></span>
+</dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> &lt;
+        <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+<span class="emphasis"><em>a[i]</em></span> string is less than <span class="emphasis"><em>b[i]</em></span>
+          string, where <span class="emphasis"><em>i</em></span> is first mismatched element in lists
+          <span class="emphasis"><em>a</em></span> and <span class="emphasis"><em>b</em></span>
+</dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> &lt;=
+        <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+          every <span class="emphasis"><em>a</em></span> string is less than or equal to its <span class="emphasis"><em>b</em></span>
+          counterpart
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> &gt;
+        <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+<span class="emphasis"><em>a[i]</em></span> string is greater than <span class="emphasis"><em>b[i]</em></span>
+          string, where <span class="emphasis"><em>i</em></span> is first mismatched element
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> &gt;=
+        <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+          every <span class="emphasis"><em>a</em></span> string is greater than or equal to its <span class="emphasis"><em>b</em></span>
+          counterpart
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>a</em></span> in <span class="emphasis"><em>b</em></span></code></span></dt>
+<dd>
+          true if all elements of <span class="emphasis"><em>a</em></span> can be found in <span class="emphasis"><em>b</em></span>,
+          or if <span class="emphasis"><em>a</em></span> has no elements
+        </dd>
+<dt><span class="term"><code class="literal">! <span class="emphasis"><em>cond</em></span></code></span></dt>
+<dd>
+          condition not true
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>cond</em></span> &amp;&amp;
+        <span class="emphasis"><em>cond</em></span></code></span></dt>
+<dd>
+          conjunction
+        </dd>
+<dt><span class="term"><code class="literal"><span class="emphasis"><em>cond</em></span> ||
+        <span class="emphasis"><em>cond</em></span></code></span></dt>
+<dd>
+          disjunction
+        </dd>
+<dt><span class="term"><code class="literal">( <span class="emphasis"><em>cond</em></span>
+        )</code></span></dt>
+<dd>
+          precedence grouping
+        </dd>
+</dl>
+</div>
+<pre class="programlisting">include <span class="emphasis"><em>file</em></span> ;
+</pre>
+<p>
+        Causes <code class="literal">bjam</code> to read the named <span class="emphasis"><em>file</em></span>.
+        The <span class="emphasis"><em>file</em></span> is bound like a regular target (see Binding
+        above) but unlike a regular target the include <span class="emphasis"><em>file</em></span>
+        cannot be built.
+      </p>
+<p>
+        The include <span class="emphasis"><em>file</em></span> 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.
+      </p>
+<pre class="programlisting">local <span class="emphasis"><em>vars</em></span> [ = <span class="emphasis"><em>values</em></span> ] ;
+</pre>
+<p>
+        Creates new <span class="emphasis"><em>vars</em></span> inside to the enclosing <code class="literal">{}</code>
+        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 <span class="emphasis"><em>vars</em></span> are initialized to <span class="emphasis"><em>values</em></span>
+        if present, or left uninitialized otherwise.
+      </p>
+<pre class="programlisting">return <span class="emphasis"><em>values</em></span> ;
+</pre>
+<p>
+        Within a rule body, the return statement sets the return value for an invocation
+        of the rule. It does <span class="bold"><strong>not</strong></span> 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.
+      </p>
+<pre class="programlisting">switch <span class="emphasis"><em>value</em></span>
+{
+    case <span class="emphasis"><em>pattern1</em></span> : <span class="emphasis"><em>statements</em></span> ;
+    case <span class="emphasis"><em>pattern2</em></span> : <span class="emphasis"><em>statements</em></span> ;
+    ...
+}
+</pre>
+<p>
+        The switch statement executes zero or one of the enclosed <span class="emphasis"><em>statements</em></span>,
+        depending on which, if any, is the first case whose <span class="emphasis"><em>pattern</em></span>
+        matches <span class="emphasis"><em>value</em></span>. The <span class="emphasis"><em>pattern</em></span> values
+        are not variable-expanded. The pattern values may include the following wildcards:
+      </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">?</code></span></dt>
+<dd>
+          match any single character
+        </dd>
+<dt><span class="term"><code class="literal">*</code></span></dt>
+<dd>
+          match zero or more characters
+        </dd>
+<dt><span class="term"><code class="literal">[<span class="emphasis"><em>chars</em></span>]</code></span></dt>
+<dd>
+          match any single character in <span class="emphasis"><em>chars</em></span>
+</dd>
+<dt><span class="term"><code class="literal">[^<span class="emphasis"><em>chars</em></span>]</code></span></dt>
+<dd>
+          match any single character not in <span class="emphasis"><em>chars</em></span>
+</dd>
+<dt><span class="term"><code class="literal">\<span class="emphasis"><em>x</em></span></code></span></dt>
+<dd>
+          match <span class="emphasis"><em>x</em></span> (escapes the other wildcards)
+        </dd>
+</dl>
+</div>
+<pre class="programlisting">while <span class="emphasis"><em>cond</em></span> { <span class="emphasis"><em>statements</em></span> }
+</pre>
+<p>
+        Repeatedly execute <span class="emphasis"><em>statements</em></span> while <span class="emphasis"><em>cond</em></span>
+        remains true upon entry. (See the description of <span class="emphasis"><em>cond</em></span>
+        expression syntax under if, above).
+      </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.language.variables"></a><a href="language.html#jam.language.variables" title="Variables">Variables</a></h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="language.html#jam.language.variables.expansion"> Variable Expansion</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.local_for_loop_variables">Local
+        For Loop Variables</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins"> Built-in Variables</a></span></dt>
+</dl></div>
+<p>
+        <code class="literal">BJam</code> 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
+        <code class="literal">$(<span class="emphasis"><em>variable</em></span>)</code>.
+      </p>
+<p>
+        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.
+      </p>
+<p>
+        A variable is defined with:
+      </p>
+<pre class="programlisting"><span class="emphasis"><em>variable</em></span> = <span class="emphasis"><em>elements</em></span> ;
+<span class="emphasis"><em>variable</em></span> += <span class="emphasis"><em>elements</em></span> ;
+<span class="emphasis"><em>variable</em></span> on <span class="emphasis"><em>targets</em></span> = <span class="emphasis"><em>elements</em></span> ;
+<span class="emphasis"><em>variable</em></span> on <span class="emphasis"><em>targets</em></span> += <span class="emphasis"><em>elements</em></span> ;
+<span class="emphasis"><em>variable</em></span> default = <span class="emphasis"><em>elements</em></span> ;
+<span class="emphasis"><em>variable</em></span> ?= <span class="emphasis"><em>elements</em></span> ;
+</pre>
+<p>
+        The first two forms set <span class="emphasis"><em>variable</em></span> globally. The third
+        and forth forms set a target-specific variable. The <code class="literal">=</code>
+        operator replaces any previous elements of <span class="emphasis"><em>variable</em></span>
+        with <span class="emphasis"><em>elements</em></span>; the <code class="literal">+=</code> operation adds
+        <span class="emphasis"><em>elements</em></span> to <span class="emphasis"><em>variable</em></span>'s list of
+        elements. The final two forms are synonymous: they set <span class="emphasis"><em>variable</em></span>
+        globally, but only if it was previously unset.
+      </p>
+<p>
+        Variables referenced in updating commands will be replaced with their values;
+        target-specific values take precedence over global values. Variables passed
+        as arguments (<code class="literal">$(1)</code> and <code class="literal">$(2)</code>) to actions
+        are replaced with their bound values; the "<code class="literal">bind</code>"
+        modifier can be used on actions to cause other variables to be replaced with
+        bound values. See Action Modifiers above.
+      </p>
+<p>
+        <code class="literal">BJam</code> variables are not re-exported to the environment
+        of the shell that executes the updating actions, but the updating actions
+        can reference <code class="literal">bjam</code> variables with <code class="literal">$(<span class="emphasis"><em>variable</em></span>)</code>.
+      </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.variables.expansion"></a><a href="language.html#jam.language.variables.expansion" title=" Variable Expansion"> Variable Expansion</a></h4></div></div></div>
+<p>
+          During parsing, <code class="literal">bjam</code> 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 <code class="literal">$(<span class="emphasis"><em>v</em></span>)</code> or <code class="literal">$(<span class="emphasis"><em>vm</em></span>)</code>,
+          where <span class="emphasis"><em>v</em></span> is the variable name, and <span class="emphasis"><em>m</em></span>
+          are optional modifiers.
+        </p>
+<p>
+          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.
+        </p>
+<p>
+          The result of a token after variable expansion is the <span class="emphasis"><em>product</em></span>
+          of the components of the token, where each component is a literal substring
+          or a list substituting a variable reference. For example:
+        </p>
+<pre class="programlisting">$(X) -&gt; a b c
+t$(X) -&gt; ta tb tc
+$(X)z -&gt; az bz cz
+$(X)-$(X) -&gt; a-a a-b a-c b-a b-b b-c c-a c-b c-c
+</pre>
+<p>
+          The variable name and modifiers can themselves contain a variable reference,
+          and this partakes of the product as well:
+        </p>
+<pre class="programlisting">$(X) -&gt; a b c
+$(Y) -&gt; 1 2
+$(Z) -&gt; X Y
+$($(Z)) -&gt; a b c 1 2
+</pre>
+<p>
+          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:
+        </p>
+<pre class="programlisting">$(X) -&gt; a ""
+$(Y) -&gt; "" 1
+$(Z) -&gt;
+-$(X)$(Y)- -&gt; -a- -a1- -- -1-
+-$(X)$(Z)- -&gt;
+</pre>
+<p>
+          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:
+        </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">[<span class="emphasis"><em>n</em></span>]</code></span></dt>
+<dd>
+            Select element number <span class="emphasis"><em>n</em></span> (starting at 1). If the
+            variable contains fewer than <span class="emphasis"><em>n</em></span> elements, the result
+            is a zero-element list. <span class="emphasis"><em>n</em></span> can be negative in which
+            case the element number <span class="emphasis"><em>n</em></span> from the last leftward
+            is returned.
+          </dd>
+<dt><span class="term"><code class="literal">[<span class="emphasis"><em>n</em></span>-<span class="emphasis"><em>m</em></span>]</code></span></dt>
+<dd>
+            Select elements number <span class="emphasis"><em>n</em></span> through <span class="emphasis"><em>m</em></span>.
+            <span class="emphasis"><em>n</em></span> and <span class="emphasis"><em>m</em></span> can be negative in
+            which case they refer to elements counting from the last leftward.
+          </dd>
+<dt><span class="term"><code class="literal">[<span class="emphasis"><em>n</em></span>-]</code></span></dt>
+<dd>
+            Select elements number <span class="emphasis"><em>n</em></span> through the last. <span class="emphasis"><em>n</em></span>
+            can be negative in which case it refers to the element counting from
+            the last leftward.
+          </dd>
+<dt><span class="term"><code class="literal">:B</code></span></dt>
+<dd>
+            Select filename base.
+          </dd>
+<dt><span class="term"><code class="literal">:S</code></span></dt>
+<dd>
+            Select (last) filename suffix.
+          </dd>
+<dt><span class="term"><code class="literal">:M</code></span></dt>
+<dd>
+            Select archive member name.
+          </dd>
+<dt><span class="term"><code class="literal">:D</code></span></dt>
+<dd>
+            Select directory path.
+          </dd>
+<dt><span class="term"><code class="literal">:P</code></span></dt>
+<dd>
+            Select parent directory.
+          </dd>
+<dt><span class="term"><code class="literal">:G</code></span></dt>
+<dd>
+            Select grist.
+          </dd>
+<dt><span class="term"><code class="literal">:U</code></span></dt>
+<dd>
+            Replace lowercase characters with uppercase.
+          </dd>
+<dt><span class="term"><code class="literal">:L</code></span></dt>
+<dd>
+            Replace uppercase characters with lowercase.
+          </dd>
+<dt><span class="term"><code class="literal">:W</code></span></dt>
+<dd>
+            When invoking Windows-based tools from <a href="http://www.cygwin.com/" target="_top">Cygwin</a>
+            it can be important to pass them true windows-style paths. The <code class="literal">:W</code>
+            modifier, <span class="bold"><strong>under Cygwin only</strong></span>, turns a
+            cygwin path into a Win32 path using the <a href="http://www.cygwin.com/cygwin-api/func-cygwin-conv-to-win32-path.html" target="_top"><code class="literal">cygwin_conv_to_win32_path</code></a>
+            function. On other platforms, the string is unchanged. For example 
+<pre class="programlisting">
+
+<span class="identifier">x</span> <span class="special">=</span> <span class="string">"/cygdrive/c/Program Files/Borland"</span> <span class="special">;</span> <span class="identifier">ECHO</span> #<span class="special">(</span><span class="identifier">x</span><span class="special">:</span><span class="identifier">W</span><span class="special">)</span> <span class="special">;</span>
+</pre>
+            prints <code class="literal">"C:\Program Files\Borland"</code> on Cygwin
+          </dd>
+<dt><span class="term"><code class="literal">:<span class="emphasis"><em>chars</em></span></code></span></dt>
+<dd>
+            Select the components listed in <span class="emphasis"><em>chars</em></span>.
+          </dd>
+<dt><span class="term"><code class="literal">:G=<span class="emphasis"><em>grist</em></span></code></span></dt>
+<dd>
+            Replace grist with <span class="emphasis"><em>grist</em></span>.
+          </dd>
+<dt><span class="term"><code class="literal">:D=<span class="emphasis"><em>path</em></span></code></span></dt>
+<dd>
+            Replace directory with <span class="emphasis"><em>path</em></span>.
+          </dd>
+<dt><span class="term"><code class="literal">:B=<span class="emphasis"><em>base</em></span></code></span></dt>
+<dd>
+            Replace the base part of file name with <span class="emphasis"><em>base</em></span>.
+          </dd>
+<dt><span class="term"><code class="literal">:S=<span class="emphasis"><em>suf</em></span></code></span></dt>
+<dd>
+            Replace the suffix of file name with <span class="emphasis"><em>suf</em></span>.
+          </dd>
+<dt><span class="term"><code class="literal">:M=<span class="emphasis"><em>mem</em></span></code></span></dt>
+<dd>
+            Replace the archive member name with <span class="emphasis"><em>mem</em></span>.
+          </dd>
+<dt><span class="term"><code class="literal">:R=<span class="emphasis"><em>root</em></span></code></span></dt>
+<dd>
+            Prepend <span class="emphasis"><em>root</em></span> to the whole file name, if not already
+            rooted.
+          </dd>
+<dt><span class="term"><code class="literal">:E=<span class="emphasis"><em>value</em></span></code></span></dt>
+<dd>
+            Assign <span class="emphasis"><em>value</em></span> to the variable if it is unset.
+          </dd>
+<dt><span class="term"><code class="literal">:J=<span class="emphasis"><em>joinval</em></span></code></span></dt>
+<dd>
+            Concatentate list elements into single element, separated by <span class="emphasis"><em>joinval</em></span>'.
+          </dd>
+</dl>
+</div>
+<p>
+          On VMS, <code class="literal">$(var:P)</code> is the parent directory of <code class="literal">$(var:D)</code>.
+        </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.variables.local_for_loop_variables"></a><a href="language.html#jam.language.variables.local_for_loop_variables" title="Local
+        For Loop Variables">Local
+        For Loop Variables</a></h4></div></div></div>
+<p>
+          Boost Jam allows you to declare a local for loop control variable right
+          in the loop:
+        </p>
+<pre class="programlisting">x = 1 2 3 ;
+y = 4 5 6 ;
+for <span class="bold"><strong>local</strong></span> y in $(x)
+{
+    ECHO $(y) ; # prints "1", "2", or "3"
+}
+ECHO $(y) ;     # prints "4 5 6"
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.variables.builtins"></a><a href="language.html#jam.language.variables.builtins" title=" Built-in Variables"> Built-in Variables</a></h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins.search"> SEARCH and
+          LOCATE</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins.hdrscan"> HDRSCAN
+          and HDRRULE</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins.semaphores">Semaphores</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins.platform_identifier">Platform
+          Identifier</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins.jam_version">Jam
+          Version</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.variables.builtins.jamshell">JAMSHELL</a></span></dt>
+</dl></div>
+<p>
+          This section discusses variables that have special meaning to <code class="literal">bjam</code>.
+        </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.variables.builtins.search"></a><a href="language.html#jam.language.variables.builtins.search" title=" SEARCH and
+          LOCATE"> SEARCH and
+          LOCATE</a></h5></div></div></div>
+<p>
+            These two variables control the binding of file target names to locations
+            in the file system. Generally, <code class="literal">$(SEARCH)</code> is used to
+            find existing sources while <code class="literal">$(LOCATE)</code> is used to fix
+            the location for built targets.
+          </p>
+<p>
+            Rooted (absolute path) file targets are bound as is. Unrooted file target
+            names are also normally bound as is, and thus relative to the current
+            directory, but the settings of <code class="literal">$(LOCATE)</code> and <code class="literal">$(SEARCH)</code>
+            alter this:
+          </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+              If <code class="literal">$(LOCATE)</code> is set then the target is bound relative
+              to the first directory in <code class="literal">$(LOCATE)</code>. Only the first
+              element is used for binding.
+            </li>
+<li>
+              If <code class="literal">$(SEARCH)</code> is set then the target is bound to
+              the first directory in <code class="literal">$(SEARCH)</code> where the target
+              file already exists.
+            </li>
+<li>
+              If the <code class="literal">$(SEARCH)</code> search fails, the target is bound
+              relative to the current directory anyhow.
+            </li>
+</ul></div>
+<p>
+            Both <code class="literal">$(SEARCH)</code> and <code class="literal">$(LOCATE)</code> should
+            be set target-specific and not globally. If they were set globally,
+            <code class="literal">bjam</code> would use the same paths for all file binding,
+            which is not likely to produce sane results. When writing your own rules,
+            especially ones not built upon those in Jambase, you may need to set
+            <code class="literal">$(SEARCH)</code> or <code class="literal">$(LOCATE)</code> directly.
+            Almost all of the rules defined in Jambase set <code class="literal">$(SEARCH)</code>
+            and <code class="literal">$(LOCATE)</code> to sensible values for sources they
+            are looking for and targets they create, respectively.
+          </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.variables.builtins.hdrscan"></a><a href="language.html#jam.language.variables.builtins.hdrscan" title=" HDRSCAN
+          and HDRRULE"> HDRSCAN
+          and HDRRULE</a></h5></div></div></div>
+<p>
+            These two variables control header file scanning. <code class="literal">$(HDRSCAN)</code>
+            is an <code class="literal">egrep(1)</code> pattern, with ()'s surrounding the
+            file name, used to find file inclusion statements in source files. <code class="literal">Jambase</code>
+            uses <code class="literal">$(HDRPATTERN)</code> as the pattern for <code class="literal">$(HDRSCAN)</code>.
+            <code class="literal">$(HDRRULE)</code> 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 <code class="literal">bjam</code>
+            invokes a rule through a variable setting.
+          </p>
+<p>
+            Both <code class="literal">$(HDRSCAN)</code> and <code class="literal">$(HDRRULE)</code>
+            must be set for header file scanning to take place, and they should be
+            set target-specific and not globally. If they were set globally, all
+            files, including executables and libraries, would be scanned for header
+            file include statements.
+          </p>
+<p>
+            The scanning for header file inclusions is not exact, but it is at least
+            dynamic, so there is no need to run something like <code class="literal">makedepend(GNU)</code>
+            to create a static dependency file. The scanning mechanism errs on the
+            side of inclusion (i.e., it is more likely to return filenames that are
+            not actually used by the compiler than to miss include files) because
+            it can't tell if <code class="computeroutput"><span class="preprocessor">#include</span></code>
+            lines are inside <code class="computeroutput"><span class="preprocessor">#ifdefs</span></code>
+            or other conditional logic. In <code class="literal">Jambase</code>, <code class="literal">HdrRule</code>
+            applies the <code class="literal">NOCARE</code> rule to each header file found
+            during scanning so that if the file isn't present yet doesn't cause the
+            compilation to fail, <code class="literal">bjam</code> won't care.
+          </p>
+<p>
+            Also, scanning for regular expressions only works where the included
+            file name is literally in the source file. It can't handle languages
+            that allow including files using variable names (as the <code class="literal">Jam</code>
+            language itself does).
+          </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.variables.builtins.semaphores"></a><a href="language.html#jam.language.variables.builtins.semaphores" title="Semaphores">Semaphores</a></h5></div></div></div>
+<p>
+            It is sometimes desirable to disallow parallel execution of some actions.
+            For example:
+          </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+              Old versions of yacc use files with fixed names. So, running two yacc
+              actions is dangerous.
+            </li>
+<li>
+              One might want to perform parallel compiling, but not do parallel linking,
+              because linking is i/o bound and only gets slower.
+            </li>
+</ul></div>
+<p>
+            Craig McPeeters has extended Perforce Jam to solve such problems, and
+            that extension was integrated in Boost.Jam.
+          </p>
+<p>
+            Any target can be assigned a <span class="emphasis"><em>semaphore</em></span>, by setting
+            a variable called <code class="literal">SEMAPHORE</code> on that target. The value
+            of the variable is the semaphore name. It must be different from names
+            of any declared target, but is arbitrary otherwise.
+          </p>
+<p>
+            The semantic of semaphores is that in a group of targets which have the
+            same semaphore, only one can be updated at the moment, regardless of
+            "<code class="literal">-j</code>" option.
+          </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.variables.builtins.platform_identifier"></a><a href="language.html#jam.language.variables.builtins.platform_identifier" title="Platform
+          Identifier">Platform
+          Identifier</a></h5></div></div></div>
+<p>
+            A number of Jam built-in variables can be used to identify runtime platform:
+          </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">OS</code></span></dt>
+<dd>
+              OS identifier string
+            </dd>
+<dt><span class="term"><code class="literal">OSPLAT</code></span></dt>
+<dd>
+              Underlying architecture, when applicable
+            </dd>
+<dt><span class="term"><code class="literal">MAC</code></span></dt>
+<dd>
+              true on MAC platform
+            </dd>
+<dt><span class="term"><code class="literal">NT</code></span></dt>
+<dd>
+              true on NT platform
+            </dd>
+<dt><span class="term"><code class="literal">OS2</code></span></dt>
+<dd>
+              true on OS2 platform
+            </dd>
+<dt><span class="term"><code class="literal">UNIX</code></span></dt>
+<dd>
+              true on Unix platforms
+            </dd>
+<dt><span class="term"><code class="literal">VMS</code></span></dt>
+<dd>
+              true on VMS platform
+            </dd>
+</dl>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.variables.builtins.jam_version"></a><a href="language.html#jam.language.variables.builtins.jam_version" title="Jam
+          Version">Jam
+          Version</a></h5></div></div></div>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">JAMDATE</code></span></dt>
+<dd>
+              Time and date at <code class="literal">bjam</code> start-up.
+            </dd>
+<dt><span class="term"><code class="literal">JAMUNAME</code></span></dt>
+<dd>
+              Ouput of uname(1) command (Unix only)
+            </dd>
+<dt><span class="term"><code class="literal">JAMVERSION</code></span></dt>
+<dd>
+<code class="literal">bjam</code> version, currently "3.1.13"
+            </dd>
+<dt><span class="term"><code class="literal">JAM_VERSION</code></span></dt>
+<dd>
+              A predefined global variable with two elements indicates the version
+              number of Boost Jam. Boost Jam versions start at "<code class="literal">03</code>"
+              "<code class="literal">00</code>". Earlier versions of <code class="literal">Jam</code>
+              do not automatically define <code class="literal">JAM_VERSION</code>.
+            </dd>
+</dl>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.language.variables.builtins.jamshell"></a><a href="language.html#jam.language.variables.builtins.jamshell" title="JAMSHELL">JAMSHELL</a></h5></div></div></div>
+<p>
+            When <code class="literal">bjam</code> executes a rule's action block, it forks
+            and execs a shell, passing the action block as an argument to the shell.
+            The invocation of the shell can be controlled by <code class="literal">$(JAMSHELL)</code>.
+            The default on Unix is, for example:
+          </p>
+<pre class="programlisting">JAMSHELL = /bin/sh -c % ;
+</pre>
+<p>
+            The <code class="literal">%</code> is replaced with the text of the action block.
+          </p>
+<p>
+            <code class="literal">BJam</code> does not directly support building in parallel
+            across multiple hosts, since that is heavily dependent on the local environment.
+            To build in parallel across multiple hosts, you need to write your own
+            shell that provides access to the multiple hosts. You then reset <code class="literal">$(JAMSHELL)</code>
+            to reference it.
+          </p>
+<p>
+            Just as <code class="literal">bjam</code> expands a <code class="literal">%</code> to be
+            the text of the rule's action block, it expands a <code class="literal">!</code>
+            to be the multi-process slot number. The slot number varies between 1
+            and the number of concurrent jobs permitted by the <code class="literal">-j</code>
+            flag given on the command line. Armed with this, it is possible to write
+            a multiple host shell. For example:
+          </p>
+<pre class="programlisting">#!/bin/sh
+
+# This sample JAMSHELL uses the SunOS on(1) command to execute a
+# command string with an identical environment on another host.
+
+# Set JAMSHELL = jamshell ! %
+#
+# where jamshell is the name of this shell file.
+#
+# This version handles up to -j6; after that they get executed
+# locally.
+
+case $1 in
+1|4) on winken sh -c "$2";;
+2|5) on blinken sh -c "$2";;
+3|6) on nod sh -c "$2";;
+*) eval "$2";;
+esac
+</pre>
+</div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.language.modules"></a><a href="language.html#jam.language.modules" title="Modules">Modules</a></h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="language.html#jam.language.modules.declaration">Declaration</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.variable_scope">Variable Scope</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.local_rules">Local Rules</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.the__rulenames__rule">The <code class="literal">RULENAMES</code>
+        Rule</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.the__varnames__rule">The <code class="literal">VARNAMES</code>
+        Rule</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.the__import__rule">The <code class="literal">IMPORT</code>
+        Rule</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.the__export__rule">The <code class="literal">EXPORT</code>
+        Rule</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.the__caller_module__rule">The
+        <code class="literal">CALLER_MODULE</code> Rule</a></span></dt>
+<dt><span class="section"><a href="language.html#jam.language.modules.the__delete_module__rule">The
+        <code class="literal">DELETE_MODULE</code> Rule</a></span></dt>
+</dl></div>
+<p>
+        Boost Jam introduces support for modules, which provide some rudimentary
+        namespace protection for rules and variables. A new keyword, "<code class="literal">module</code>"
+        was also introduced. The features described in this section are primitives,
+        meaning that they are meant to provide the operations needed to write Jam
+        rules which provide a more elegant module interface.
+      </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.declaration"></a><a href="language.html#jam.language.modules.declaration" title="Declaration">Declaration</a></h4></div></div></div>
+<pre class="programlisting">module <span class="emphasis"><em>expression</em></span> { ... }
+</pre>
+<p>
+          Code within the <code class="literal">{ ... }</code> executes within the module named
+          by evaluating expression. Rule definitions can be found in the module's
+          own namespace, and in the namespace of the global module as <span class="emphasis"><em>module-name</em></span>.<span class="emphasis"><em>rule-name</em></span>,
+          so within a module, other rules in that module may always be invoked without
+          qualification:
+        </p>
+<pre class="programlisting"><span class="bold"><strong>module my_module</strong></span>
+<span class="bold"><strong>{</strong></span>
+    rule salute ( x ) { ECHO $(x), world ; }
+    rule greet ( ) { salute hello ; }
+    greet ;
+<span class="bold"><strong>}</strong></span>
+<span class="bold"><strong>my_module.salute</strong></span> goodbye ;
+</pre>
+<p>
+          When an invoked rule is not found in the current module's namespace, it
+          is looked up in the namespace of the global module, so qualified calls
+          work across modules:
+        </p>
+<pre class="programlisting">module your_module
+{
+    rule bedtime ( ) { <span class="bold"><strong>my_module.salute</strong></span> goodnight ; }
+}
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.variable_scope"></a><a href="language.html#jam.language.modules.variable_scope" title="Variable Scope">Variable Scope</a></h4></div></div></div>
+<p>
+          Each module has its own set of dynamically nested variable scopes. When
+          execution passes from module A to module B, all the variable bindings from
+          A become unavailable, and are replaced by the bindings that belong to B.
+          This applies equally to local and global variables:
+        </p>
+<pre class="programlisting">module A
+{
+    x = 1 ;
+    rule f ( )
+    {
+        local y = 999 ; # becomes visible again when B.f calls A.g
+        B.f ;
+    }
+    rule g ( )
+    {
+        ECHO $(y) ;     # prints "999"
+    }
+}
+module B
+{
+    y = 2 ;
+    rule f ( )
+    {
+        ECHO $(y) ; # always prints "2"
+        A.g ;
+    }
+}
+</pre>
+<p>
+          The only way to access another module's variables is by entering that module:
+        </p>
+<pre class="programlisting">rule peek ( module-name ? : variables + )
+{
+    module $(module-name)
+    {
+        return $($(&gt;)) ;
+    }
+}
+</pre>
+<p>
+          Note that because existing variable bindings change whenever a new module
+          scope is entered, argument bindings become unavailable. That explains the
+          use of "<code class="literal">$(&gt;)</code>" in the peek rule above.
+        </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.local_rules"></a><a href="language.html#jam.language.modules.local_rules" title="Local Rules">Local Rules</a></h4></div></div></div>
+<pre class="programlisting">local rule <span class="emphasis"><em>rulename</em></span>...
+</pre>
+<p>
+          The rule is declared locally to the current module. It is not entered in
+          the global module with qualification, and its name will not appear in the
+          result of:
+        </p>
+<pre class="programlisting">[ RULENAMES <span class="emphasis"><em>module-name</em></span> ]
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.the__rulenames__rule"></a><a href="language.html#jam.language.modules.the__rulenames__rule" title="The RULENAMES
+        Rule">The <code class="literal">RULENAMES</code>
+        Rule</a></h4></div></div></div>
+<pre class="programlisting">rule RULENAMES ( <span class="emphasis"><em>module</em></span> ? )
+</pre>
+<p>
+          Returns a list of the names of all non-local rules in the given module.
+          If <span class="emphasis"><em>module</em></span> is omitted, the names of all non-local rules
+          in the global module are returned.
+        </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.the__varnames__rule"></a><a href="language.html#jam.language.modules.the__varnames__rule" title="The VARNAMES
+        Rule">The <code class="literal">VARNAMES</code>
+        Rule</a></h4></div></div></div>
+<pre class="programlisting">rule VARNAMES ( <span class="emphasis"><em>module</em></span> ? )
+</pre>
+<p>
+          Returns a list of the names of all variable bindings in the given module.
+          If <span class="emphasis"><em>module</em></span> is omitted, the names of all variable bindings
+          in the global module are returned.
+        </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+            This includes any local variables in rules from the call stack which
+            have not returned at the time of the <code class="literal">VARNAMES</code> invocation.
+          </p></td></tr>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.the__import__rule"></a><a href="language.html#jam.language.modules.the__import__rule" title="The IMPORT
+        Rule">The <code class="literal">IMPORT</code>
+        Rule</a></h4></div></div></div>
+<p>
+          <code class="literal">IMPORT</code> allows rule name aliasing across modules:
+        </p>
+<pre class="programlisting">rule IMPORT ( <span class="emphasis"><em>source_module</em></span> ? : <span class="emphasis"><em>source_rules</em></span> *
+            : <span class="emphasis"><em>target_module</em></span> ? : <span class="emphasis"><em>target_rules</em></span> * )
+</pre>
+<p>
+          The <code class="literal">IMPORT</code> rule copies rules from the <span class="emphasis"><em>source_module</em></span>
+          into the <span class="emphasis"><em>target_module</em></span> as local rules. If either
+          <span class="emphasis"><em>source_module</em></span> or <span class="emphasis"><em>target_module</em></span>
+          is not supplied, it refers to the global module. <span class="emphasis"><em>source_rules</em></span>
+          specifies which rules from the <span class="emphasis"><em>source_module</em></span> to import;
+          <span class="emphasis"><em>target_rules</em></span> specifies the names to give those rules
+          in <span class="emphasis"><em>target_module</em></span>. If <span class="emphasis"><em>source_rules</em></span>
+          contains a name which doesn't correspond to a rule in <span class="emphasis"><em>source_module</em></span>,
+          or if it contains a different number of items than <span class="emphasis"><em>target_rules</em></span>,
+          an error is issued. For example,
+        </p>
+<pre class="programlisting"># import m1.rule1 into m2 as local rule m1-rule1.
+IMPORT m1 : rule1 : m2 : m1-rule1 ;
+# import all non-local rules from m1 into m2
+IMPORT m1 : [ RULENAMES m1 ] : m2 : [ RULENAMES m1 ] ;
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.the__export__rule"></a><a href="language.html#jam.language.modules.the__export__rule" title="The EXPORT
+        Rule">The <code class="literal">EXPORT</code>
+        Rule</a></h4></div></div></div>
+<p>
+          <code class="literal">EXPORT</code> allows rule name aliasing across modules:
+        </p>
+<pre class="programlisting">rule EXPORT ( <span class="emphasis"><em>module</em></span> ? : <span class="emphasis"><em>rules</em></span> * )
+</pre>
+<p>
+          The <code class="literal">EXPORT</code> rule marks <span class="emphasis"><em>rules</em></span> from
+          the <code class="literal">source_module</code> as non-local (and thus exportable).
+          If an element of <span class="emphasis"><em>rules</em></span> does not name a rule in <span class="emphasis"><em>module</em></span>,
+          an error is issued. For example,
+        </p>
+<pre class="programlisting">module X {
+  local rule r { ECHO X.r ; }
+}
+IMPORT X : r : : r ; # error - r is local in X
+EXPORT X : r ;
+IMPORT X : r : : r ; # OK.
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.the__caller_module__rule"></a><a href="language.html#jam.language.modules.the__caller_module__rule" title="The
+        CALLER_MODULE Rule">The
+        <code class="literal">CALLER_MODULE</code> Rule</a></h4></div></div></div>
+<pre class="programlisting">rule CALLER_MODULE ( <span class="emphasis"><em>levels</em></span> ? )
+</pre>
+<p>
+          <code class="literal">CALLER_MODULE</code> returns the name of the module scope enclosing
+          the call to its caller (if levels is supplied, it is interpreted as an
+          integer number of additional levels of call stack to traverse to locate
+          the module). If the scope belongs to the global module, or if no such module
+          exists, returns the empty list. For example, the following prints "{Y}
+          {X}":
+        </p>
+<pre class="programlisting">module X {
+    rule get-caller { return [ CALLER_MODULE ] ; }
+    rule get-caller's-caller { return [ CALLER_MODULE 1 ] ; }
+    rule call-Y { return Y.call-X2 ; }
+}
+module Y {
+    rule call-X { return X.get-caller ; }
+    rule call-X2 { return X.get-caller's-caller ; }
+}
+callers = [ X.get-caller ] [ Y.call-X ] [ X.call-Y ] ;
+ECHO {$(callers)} ;
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.language.modules.the__delete_module__rule"></a><a href="language.html#jam.language.modules.the__delete_module__rule" title="The
+        DELETE_MODULE Rule">The
+        <code class="literal">DELETE_MODULE</code> Rule</a></h4></div></div></div>
+<pre class="programlisting">rule DELETE_MODULE ( <span class="emphasis"><em>module</em></span> ? )
+</pre>
+<p>
+          <code class="literal">DELETE_MODULE</code> removes all of the variable bindings and
+          otherwise-unreferenced rules from the given module (or the global module,
+          if no module is supplied), and returns their memory to the system.
+        </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+            Though it won't affect rules that are currently executing until they
+            complete, <code class="literal">DELETE_MODULE</code> should be used with extreme
+            care because it will wipe out any others and all variable (including
+            locals in that module) immediately. Because of the way dynamic binding
+            works, variables which are shadowed by locals will not be destroyed,
+            so the results can be really unpredictable.
+          </p></td></tr>
+</table></div>
+</div>
+</div>
+</div>
+<table width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2003-2006 Rene
+      Rivera, David Abrahams, Vladimir Prus</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="usage.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="miscellaneous.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: boost-jam/branches/upstream/current/jam/miscellaneous.html
===================================================================
--- boost-jam/branches/upstream/current/jam/miscellaneous.html	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jam/miscellaneous.html	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,263 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Miscellaneous</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="up" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="prev" href="language.html" title=" Language">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src=".././boost.png"></td></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="language.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="jam.miscellaneous"></a><a href="miscellaneous.html" title="Miscellaneous">Miscellaneous</a></h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="miscellaneous.html#jam.miscellaneous.diagnostics">Diagnostics</a></span></dt>
+<dt><span class="section"><a href="miscellaneous.html#jam.miscellaneous.bugs__limitations">Bugs, Limitations</a></span></dt>
+<dt><span class="section"><a href="miscellaneous.html#jam.miscellaneous.fundamentals">Fundamentals</a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.miscellaneous.diagnostics"></a><a href="miscellaneous.html#jam.miscellaneous.diagnostics" title="Diagnostics">Diagnostics</a></h3></div></div></div>
+<p>
+        In addition to generic error messages, <code class="literal">bjam</code> may emit one
+        of the following:
+      </p>
+<pre class="programlisting">warning: unknown rule X</pre>
+<p>
+        A rule was invoked that has not been defined with an "<code class="literal">actions</code>"
+        or "<code class="literal">rule</code>" statement.
+      </p>
+<pre class="programlisting">using N temp target(s)</pre>
+<p>
+        Targets marked as being temporary (but nonetheless present) have been found.
+      </p>
+<pre class="programlisting">updating N target(s)</pre>
+<p>
+        Targets are out-of-date and will be updated.
+      </p>
+<pre class="programlisting">can't find N target(s)</pre>
+<p>
+        Source files can't be found and there are no actions to create them.
+      </p>
+<pre class="programlisting">can't make N target(s)</pre>
+<p>
+        Due to sources not being found, other targets cannot be made.
+      </p>
+<pre class="programlisting">warning: X depends on itself</pre>
+<p>
+        A target depends on itself either directly or through its sources.
+      </p>
+<pre class="programlisting">don't know how to make X</pre>
+<p>
+        A target is not present and no actions have been defined to create it.
+      </p>
+<pre class="programlisting">X skipped for lack of Y</pre>
+<p>
+        A source failed to build, and thus a target cannot be built.
+      </p>
+<pre class="programlisting">warning: using independent target X</pre>
+<p>
+        A target that is not a dependency of any other target is being referenced
+        with <code class="literal">$(&lt;)</code> or <code class="literal">$(&gt;)</code>.
+      </p>
+<pre class="programlisting">X removed</pre>
+<p>
+        <code class="literal">BJam</code> removed a partially built target after being interrupted.
+      </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.miscellaneous.bugs__limitations"></a><a href="miscellaneous.html#jam.miscellaneous.bugs__limitations" title="Bugs, Limitations">Bugs, Limitations</a></h3></div></div></div>
+<p>
+        The <code class="literal">-j</code> flag can cause <code class="literal">bjam</code> to get confused
+        when single actions update more than one target at a time. <code class="literal">bjam</code>
+        may proceed as if the targets were built even though they are still under
+        construction.
+      </p>
+<p>
+        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 <code class="literal">yacc(1)</code> does.
+      </p>
+<p>
+        With the <code class="literal">-j</code> flag, errors from failed commands can get
+        staggeringly mixed up.
+      </p>
+<p>
+        A poorly set <code class="literal">$(JAMSHELL)</code> is likely to result in silent
+        failure.
+      </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.miscellaneous.fundamentals"></a><a href="miscellaneous.html#jam.miscellaneous.fundamentals" title="Fundamentals">Fundamentals</a></h3></div></div></div>
+<p>
+        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.
+      </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+          Jam "<code class="literal">rules</code>" are actually simple procedural
+          entities. Think of them as functions. Arguments are separated by colons.
+        </li>
+<li>
+          A Jam <span class="bold"><strong>target</strong></span> is an abstract entity identified
+          by an arbitrary string. The build-in <code class="literal">DEPENDS</code> rule creates
+          a link in the dependency graph between the named targets.
+        </li>
+<li>
+          Note that the original Jam documentation for the built-in <code class="literal">INCLUDES</code>
+          rule is incorrect: <code class="literal">INCLUDES <span class="emphasis"><em>targets1</em></span> : <span class="emphasis"><em>targets2</em></span></code>
+          causes everything that depends on a member of <span class="emphasis"><em>targets1</em></span>
+          to depend on all members of <span class="emphasis"><em>targets2</em></span>. It does this
+          in an odd way, by tacking <span class="emphasis"><em>targets2</em></span> onto a special
+          tail section in the dependency list of everything in <span class="emphasis"><em>targets1</em></span>.
+          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 <span class="emphasis"><em>targets1</em></span> and <span class="emphasis"><em>targets2</em></span>.
+        </li>
+<li>
+          When a rule is invoked, if there are <code class="literal">actions</code> 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.
+        </li>
+<li>
+          Targets (other than <code class="literal">NOTFILE</code> 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 <code class="literal">SEARCH</code>
+          and <code class="literal">LOCATE</code> variables.
+        </li>
+<li>
+          In addition to local and global variables, jam allows you to set a variable
+          <code class="literal">on</code> a target. Target-specific variable values can usually
+          not be read, and take effect only in the following contexts:
+          <div class="itemizedlist"><ul type="circle">
+<li>
+              In updating actions, variable values are first looked up <code class="literal">on</code>
+              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.
+            </li>
+<li>
+              Binding is controlled <span class="emphasis"><em>entirely</em></span> by the target-specific
+              setting of the <code class="literal">SEARCH</code> and <code class="literal">LOCATE</code>
+              variables, as described here.
+            </li>
+<li>
+              In the special rule used for header file scanning, variable values
+              are first looked up <code class="literal">on</code> the target named by the rule's
+              first argument (the source file being scanned).
+            </li>
+</ul></div>
+</li>
+<li>
+          The "bound value" of a variable is the path associated with the
+          target named by the variable. In build actions, the first two arguments
+          are automatically replaced with their bound values. Target-specific variables
+          can be selectively replaced by their bound values using the <code class="literal">bind</code>
+          action modifier.
+        </li>
+<li>
+          Note that the term "binding" as used in the Jam documentation
+          indicates a phase of processing that includes three sub-phases: <span class="emphasis"><em>binding</em></span>
+          (yes!), update determination, and header file scanning. The repetition
+          of the term "binding" can lead to some confusion. In particular,
+          the Modifying Binding section in the Jam documentation should probably
+          be titled "Modifying Update Determination".
+        </li>
+<li>
+          "Grist" is just a string prefix of the form &lt;<span class="emphasis"><em>characters</em></span>&gt;.
+          It is used in Jam to create unique target names based on simpler names.
+          For example, the file name "<code class="literal">test.exe</code>" 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:
+          <div class="orderedlist"><ol type="1">
+<li>
+              The location of targets cannot always be derived solely from what the
+              user puts in a Jamfile, but sometimes depends also on the binding process.
+              Some mechanism to distinctly identify targets with the same name is
+              still needed.
+            </li>
+<li>
+              Grist allows us to use a uniform abstract identifier for each built
+              target, regardless of target file location (as allowed by setting ALL_LOCATE_TARGET.
+            </li>
+</ol></div>
+</li>
+<li>
+          When grist is extracted from a name with $(var:G), the result includes
+          the leading and trailing angle brackets. When grist is added to a name
+          with $(var:G=expr), existing grist is first stripped. Then, if expr is
+          non-empty, leading &lt;s and trailing &gt;s are added if necessary to form
+          an expression of the form &lt;expr2&gt;; &lt;expr2&gt; is then prepended.
+        </li>
+<li>
+          When Jam is invoked it imports all environment variable settings into corresponding
+          Jam variables, followed by all command-line (-s...) variable settings.
+          Variables whose name ends in PATH, Path, or path are split into string
+          lists on OS-specific path-list separator boundaries (e.g. ":"
+          for UNIX and ";" for Windows). All other variables are split
+          on space (" ") boundaries. Boost Jam modifies that behavior by
+          allowing variables to be quoted.
+        </li>
+<li>
+          A variable whose value is an empty list or which consists entirely of empty
+          strings has a negative logical value. Thus, for example, code like the
+          following allows a sensible non-empty default which can easily be overridden
+          by the user: 
+<pre class="programlisting">
+<span class="identifier">MESSAGE</span> <span class="special">?\=</span> <span class="identifier">starting</span> <span class="identifier">jam</span><span class="special">...</span> <span class="special">;</span>
+<span class="keyword">if</span> #<span class="special">(</span><span class="identifier">MESSAGE</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">ECHO</span> <span class="identifier">The</span> <span class="identifier">message</span> <span class="identifier">is</span><span class="special">:</span> #<span class="special">(</span><span class="identifier">MESSAGE</span><span class="special">)</span> <span class="special">;</span> <span class="special">}</span>
+</pre>
+          If the user wants a specific message, he invokes jam with <code class="literal">"-sMESSAGE=message
+          text"</code>. If he wants no message, he invokes jam with <code class="literal">-sMESSAGE=</code>
+          and nothing at all is printed.
+        </li>
+<li>
+          The parsing of command line options in Jam can be rather unintuitive, with
+          regards to how other Unix programs accept options. There are two variants
+          accepted as valid for an option:
+          <div class="orderedlist"><ol type="1">
+<li>
+<code class="literal">-xvalue</code>, and
+            </li>
+<li>
+<code class="literal">-x value</code>.
+            </li>
+</ol></div>
+</li>
+</ul></div>
+</div>
+</div>
+<table width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2003-2006 Rene
+      Rivera, David Abrahams, Vladimir Prus</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="language.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: boost-jam/branches/upstream/current/jam/usage.html
===================================================================
--- boost-jam/branches/upstream/current/jam/usage.html	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jam/usage.html	2006-11-07 14:20:16 UTC (rev 14010)
@@ -0,0 +1,321 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Using BJam</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="up" href="../index.html" title="Boost.Jam : 3.1.13">
+<link rel="prev" href="building.html" title=" Building BJam">
+<link rel="next" href="language.html" title=" Language">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src=".././boost.png"></td></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="building.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="language.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="jam.usage"></a><a href="usage.html" title=" Using BJam"> Using BJam</a></h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="usage.html#jam.usage.options"> Options</a></span></dt>
+<dt><span class="section"><a href="usage.html#jam.usage.operation"> Operation</a></span></dt>
+</dl></div>
+<p>
+      If <span class="emphasis"><em>target</em></span> is provided on the command line, <code class="literal">bjam</code>
+      builds <span class="emphasis"><em>target</em></span>; otherwise <code class="literal">bjam</code> builds
+      the target <code class="literal">all</code>.
+    </p>
+<pre class="programlisting">bjam ( -option [value] | target ) *
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.usage.options"></a><a href="usage.html#jam.usage.options" title=" Options"> Options</a></h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="usage.html#jam.usage.options.command_line_and_environment_variable_quoting">Command-line
+        and Environment Variable Quoting</a></span></dt></dl></div>
+<p>
+        Options are either singular or have an accompanying value. When a value is
+        allowed, or required, it can be either given as an argument following the
+        option argument, or it can be given immediately after the option as part
+        of the option argument. The allowed options are:
+      </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"><code class="literal">-a</code></span></dt>
+<dd>
+          Build all targets anyway, even if they are up-to-date.
+        </dd>
+<dt><span class="term"><code class="literal">-d <span class="emphasis"><em>n</em></span></code></span></dt>
+<dd>
+          Enable cummulative debugging levels from 1 to n. Values are:<br> 1 -
+          Show the actions taken for building targets, as they are executed (the
+          default).<br> 2 - Show "quiet" actions and display all action
+          text, as they are executed.<br> 3 - Show dependency analysis, and target/source
+          timestamps/paths.<br> 4 - Show arguments and timming of shell invocations.<br>
+          5 - Show rule invocations and variable expansions.<br> 6 - Show directory/header
+          file/archive scans, and attempts at binding to targets.<br> 7 - Show
+          variable settings.<br> 8 - Show variable fetches, variable expansions,
+          and evaluation of '"if"' expressions.<br> 9 - Show variable
+          manipulation, scanner tokens, and memory usage.<br> 10 - Show profile
+          information for rules, both timing and memory.<br> 11 - Show parsing
+          progress of Jamfiles.<br> 12 - Show graph of target dependencies.<br>
+          13 - Show change target status (fate).
+        </dd>
+<dt><span class="term"><code class="literal">-d +<span class="emphasis"><em>n</em></span></code></span></dt>
+<dd>
+          Enable debugging level <span class="emphasis"><em>n</em></span>.
+        </dd>
+<dt><span class="term"><code class="literal">-d 0</code></span></dt>
+<dd>
+          Turn off all debugging levels. Only errors are reported.
+        </dd>
+<dt><span class="term"><code class="literal">-f <span class="emphasis"><em>Jambase</em></span></code></span></dt>
+<dd>
+          Read <span class="emphasis"><em>Jambase</em></span> instead of using the built-in Jambase.
+          Only one -f flag is permitted, but the <span class="emphasis"><em>Jambase</em></span> may
+          explicitly include other files. A <span class="emphasis"><em>Jambase</em></span> name of
+          "-" is allowed, in which case console input is read until it
+          is closed, at which point the input is treated as the Jambase.
+        </dd>
+<dt><span class="term"><code class="literal">-j <span class="emphasis"><em>n</em></span></code></span></dt>
+<dd>
+          Run up to <span class="emphasis"><em>n</em></span> shell commands concurrently (UNIX and
+          NT only). The default is 1.
+        </dd>
+<dt><span class="term"><code class="literal">-l <span class="emphasis"><em>n</em></span></code></span></dt>
+<dd>
+          Limit actions to running for <span class="emphasis"><em>n</em></span> number of seconds,
+          after which they are stopped. Note: Windows only.
+        </dd>
+<dt><span class="term"><code class="literal">-n</code></span></dt>
+<dd>
+          Don't actually execute the updating actions, but do everything else. This
+          changes the debug level default to <code class="literal">-d 2</code>.
+        </dd>
+<dt><span class="term"><code class="literal">-o <span class="emphasis"><em>file</em></span></code></span></dt>
+<dd>
+          Write the updating actions to the specified file instead of running them.
+        </dd>
+<dt><span class="term"><code class="literal">-q</code></span></dt>
+<dd>
+          Quit quickly (as if an interrupt was received) as soon as <span class="bold"><strong>any</strong></span>
+          target fails.
+        </dd>
+<dt><span class="term"><code class="literal">-s <span class="emphasis"><em>var</em></span>=<span class="emphasis"><em>value</em></span></code></span></dt>
+<dd>
+          Set the variable <span class="emphasis"><em>var</em></span> to <span class="emphasis"><em>value</em></span>,
+          overriding both internal variables and variables imported from the environment.
+        </dd>
+<dt><span class="term"><code class="literal">-t <span class="emphasis"><em>target</em></span></code></span></dt>
+<dd>
+          Rebuild <span class="emphasis"><em>target</em></span> and everything that depends on it,
+          even if it is up-to-date.
+        </dd>
+<dt><span class="term"><code class="literal">-- <span class="emphasis"><em>value</em></span></code></span></dt>
+<dd>
+          The option and <span class="emphasis"><em>value</em></span> is ignored, but is available
+          from the <code class="literal">$(ARGV)</code> variable.
+        </dd>
+<dt><span class="term"><code class="literal">-v</code></span></dt>
+<dd>
+          Print the version of <code class="literal">bjam</code> and exit.
+        </dd>
+</dl>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.usage.options.command_line_and_environment_variable_quoting"></a><a href="usage.html#jam.usage.options.command_line_and_environment_variable_quoting" title="Command-line
+        and Environment Variable Quoting">Command-line
+        and Environment Variable Quoting</a></h4></div></div></div>
+<p>
+          Classic Jam had an odd behavior with respect to command-line variable (<code class="literal">-s...</code>)
+          and environment variable settings which made it impossible to define an
+          arbitrary variable with spaces in the value. Boost Jam remedies that by
+          treating all such settings as a single string if they are surrounded by
+          double-quotes. Uses of this feature can look interesting, since shells
+          require quotes to keep characters separated by whitespace from being treated
+          as separate arguments:
+        </p>
+<pre class="programlisting">jam -sMSVCNT="\"\"C:\Program Files\Microsoft Visual C++\VC98\"\"" ...
+</pre>
+<p>
+          The outer quote is for the shell. The middle quote is for Jam, to tell
+          it to take everything within those quotes literally, and the inner quotes
+          are for the shell again when paths are passed as arguments to build actions.
+          Under NT, it looks a lot more sane to use environment variables before
+          invoking jam when you have to do this sort of quoting:
+        </p>
+<pre class="programlisting">set MSVCNT=""C:\Program Files\Microsoft Visual C++\VC98\""
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="jam.usage.operation"></a><a href="usage.html#jam.usage.operation" title=" Operation"> Operation</a></h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="usage.html#jam.usage.operation.startup"> Start-up</a></span></dt>
+<dt><span class="section"><a href="usage.html#jam.usage.operation.parsing"> Parsing</a></span></dt>
+<dt><span class="section"><a href="usage.html#jam.usage.operation.binding"> Binding</a></span></dt>
+<dt><span class="section"><a href="usage.html#jam.usage.operation.updating"> Updating</a></span></dt>
+</dl></div>
+<p>
+        BJam has four phases of operation: start-up, parsing, binding, and updating.
+      </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.usage.operation.startup"></a><a href="usage.html#jam.usage.operation.startup" title=" Start-up"> Start-up</a></h4></div></div></div>
+<p>
+          Upon start-up, <code class="literal">bjam</code> imports environment variable settings
+          into <code class="literal">bjam</code> variables. Environment variables are split
+          at blanks with each word becoming an element in the variable's list of
+          values. Environment variables whose names end in <code class="literal">PATH</code>
+          are split at <code class="literal">$(SPLITPATH)</code> characters (e.g., <code class="literal">":"</code>
+          for Unix).
+        </p>
+<p>
+          To set a variable's value on the command line, overriding the variable's
+          environment value, use the <code class="literal">-s</code> option. To see variable
+          assignments made during bjam's execution, use the <code class="literal">-d+7</code>
+          option.
+        </p>
+<p>
+          The Boost.Build v2 initialization behavior has been implemented. This behavior
+          only applies when the executable being invoked is called "<code class="literal">bjam</code>"
+          or, for backward-compatibility, when the <code class="literal">BOOST_ROOT</code>
+          variable is set.
+        </p>
+<div class="orderedlist"><ol type="1">
+<li>
+            We attempt to load "<code class="literal">boost-build.jam</code>" by
+            searching from the current invocation directory up to the root of the
+            file system. This file is expected to invoke the <code class="literal">boost-build</code>
+            rule to indicate where the Boost.Build system files are, and to load
+            them.
+          </li>
+<li>
+            If <code class="literal">boost-build.jam</code> is not found we error and exit,
+            giving brief instructions on possible errors. As a backward-compatibility
+            measure for older versions of Boost.Build, when the <code class="literal">BOOST_ROOT</code>
+            variable is set, we first search for <code class="literal">boost-build.jam</code>
+            in <code class="literal">$(BOOST_ROOT)/tools/build</code> and <code class="literal">$(BOOST_BUILD_PATH)</code>.
+            If found, it is loaded and initialization is complete.
+          </li>
+<li>
+            The <code class="literal">boost-build</code> rule adds its (optional) argument
+            to the front of <code class="literal">BOOST_BUILD_PATH</code>, and attempts to
+            load <code class="literal">bootstrap.jam</code> from those directories. If a relative
+            path is specified as an argument, it is treated as though it was relative
+            to the <code class="literal">boost-build.jam</code> file.
+          </li>
+<li>
+            If the <code class="literal">bootstrap.jam</code> file was not found, we print
+            a likely error message and exit.
+          </li>
+</ol></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.usage.operation.parsing"></a><a href="usage.html#jam.usage.operation.parsing" title=" Parsing"> Parsing</a></h4></div></div></div>
+<p>
+          In the parsing phase, <code class="literal">bjam</code> reads and parses the <code class="literal">Jambase</code>
+          file, by default the built-in one. It is written in the <a href="language.html" title=" Language">jam
+          language</a>. The last action of the <code class="literal">Jambase</code> is to
+          read (via the "include" rule) a user-provided file called "<code class="literal">Jamfile</code>".
+        </p>
+<p>
+          Collectively, the purpose of the <code class="literal">Jambase</code> and the <code class="literal">Jamfile</code>
+          is to name build targets and source files, construct the dependency graph
+          among them, and associate build actions with targets. The <code class="literal">Jambase</code>
+          defines boilerplate rules and variable assignments, and the <code class="literal">Jamfile</code>
+          uses these to specify the actual relationship among the target and source
+          files.
+        </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.usage.operation.binding"></a><a href="usage.html#jam.usage.operation.binding" title=" Binding"> Binding</a></h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="usage.html#jam.usage.operation.binding.fate"> Update Determination</a></span></dt>
+<dt><span class="section"><a href="usage.html#jam.usage.operation.binding.headerscan"> Header File
+          Scanning</a></span></dt>
+</dl></div>
+<p>
+          After parsing, <code class="literal">bjam</code> recursively descends the dependency
+          graph and binds every file target with a location in the filesystem. If
+          <code class="literal">bjam</code> detects a circular dependency in the graph, it
+          issues a warning.
+        </p>
+<p>
+          File target names are given as absolute or relative path names in the filesystem.
+          If the path name is absolute, it is bound as is. If the path name is relative,
+          it is normally bound as is, and thus relative to the current directory.
+          This can be modified by the settings of the <code class="literal">$(SEARCH)</code>
+          and <code class="literal">$(LOCATE)</code> variables, which enable jam to find and
+          build targets spread across a directory tree. See <a href="language.html#jam.language.variables.builtins.search" title=" SEARCH and
+          LOCATE">SEARCH
+          and LOCATE Variables</a> below.
+        </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.usage.operation.binding.fate"></a><a href="usage.html#jam.usage.operation.binding.fate" title=" Update Determination"> Update Determination</a></h5></div></div></div>
+<p>
+            After binding each target, <code class="literal">bjam</code> determines whether
+            the target needs updating, and if so marks the target for the updating
+            phase. A target is normally so marked if it is missing, it is older than
+            any of its sources, or any of its sources are marked for updating. This
+            behavior can be modified by the application of special built-in rules,
+            <code class="literal">ALWAYS</code>, <code class="literal">LEAVES</code>, <code class="literal">NOCARE</code>,
+            <code class="literal">NOTFILE</code>, <code class="literal">NOUPDATE</code>, and <code class="literal">TEMPORARY</code>.
+            See <a href="language.html#jam.language.rules.builtins.modifying_binding" title="Modifying
+          Binding">Modifying
+            Binding</a> below.
+          </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="jam.usage.operation.binding.headerscan"></a><a href="usage.html#jam.usage.operation.binding.headerscan" title=" Header File
+          Scanning"> Header File
+          Scanning</a></h5></div></div></div>
+<p>
+            During the binding phase, <code class="literal">bjam</code> also performs header
+            file scanning, where it looks inside source files for the implicit dependencies
+            on other files caused by C's #include syntax. This is controlled by the
+            special variables $(HDRSCAN) and $(HDRRULE). The result of the scan is
+            formed into a rule invocation, with the scanned file as the target and
+            the found included file names as the sources. Note that this is the only
+            case where rules are invoked outside the parsing phase. See <a href="language.html#jam.language.variables.builtins.hdrscan" title=" HDRSCAN
+          and HDRRULE">HDRSCAN
+            and HDRRULE Variables</a> below.
+          </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="jam.usage.operation.updating"></a><a href="usage.html#jam.usage.operation.updating" title=" Updating"> Updating</a></h4></div></div></div>
+<p>
+          After binding, <code class="literal">bjam</code> again recursively descends the dependency
+          graph, this time executing the update actions for each target marked for
+          update during the binding phase. If a target's updating actions fail, then
+          all other targets which depend on that target are skipped.
+        </p>
+<p>
+          The <code class="literal">-j</code> flag instructs <code class="literal">bjam</code> to build
+          more than one target at a time. If there are multiple actions on a single
+          target, they are run sequentially.
+        </p>
+</div>
+</div>
+</div>
+<table width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2003-2006 Rene
+      Rivera, David Abrahams, Vladimir Prus</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="building.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="language.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: boost-jam/branches/upstream/current/jam.c
===================================================================
--- boost-jam/branches/upstream/current/jam.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jam.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -121,6 +121,8 @@
 # include "make.h"
 # include "strings.h"
 # include "expand.h"
+# include "debug.h"
+# include "filesys.h"
 
 /* Macintosh is "special" */
 
@@ -144,7 +146,8 @@
 # else
 	{ 0, 1 }, 		/* debug ... */
 # endif
-	0			/* output commands, not run them */
+	0,			/* output commands, not run them */
+    0 /* action timeout */
 } ;
 
 /* Symbols to be defined as true for use in Jambase */
@@ -220,26 +223,9 @@
     InitGraf(&qd.thePort);
 # endif
 
-#ifdef HAVE_PYTHON
-    Py_Initialize();
-
-    {
-        static PyMethodDef BjamMethods[] = {
-            {"call", bjam_call, METH_VARARGS,
-             "Call the specified bjam rule."},
-            {"import_rule", bjam_import_rule, METH_VARARGS,
-             "Imports Python callable to bjam."},
-            {NULL, NULL, 0, NULL}
-        };
-
-        Py_InitModule("bjam", BjamMethods);
-    }
-
-#endif
-
     argc--, argv++;
 
-	if( getoptions( argc, argv, "-:d:j:f:gs:t:ano:qv", optv ) < 0 )
+	if( getoptions( argc, argv, "-:l:d:j:f:gs:t:ano:qv", optv ) < 0 )
     {
         printf( "\nusage: %s [ options ] targets...\n\n", progname );
 
@@ -248,6 +234,7 @@
         printf( "-fx     Read x instead of Jambase.\n" );
 	    /* printf( "-g      Build from newest sources first.\n" ); */
         printf( "-jx     Run up to x shell commands concurrently.\n" );
+        printf( "-lx     Limit actions to x number of seconds after which they are stopped.\n" );
         printf( "-n      Don't actually execute the updating actions.\n" );
         printf( "-ox     Write the updating actions to file x.\n" );
 		printf( "-q      Quit quickly as soon as a target fails.\n" );
@@ -290,6 +277,9 @@
 	if( ( s = getoptval( optv, 'g', 0 ) ) )
 	    globs.newestfirst = 1;
 
+    if( ( s = getoptval( optv, 'l', 0 ) ) )
+        globs.timeout = atoi( s );
+
     /* Turn on/off debugging */
 
     for( n = 0; s = getoptval( optv, 'd', n ); n++ )
@@ -319,6 +309,28 @@
             globs.debug[i--] = 1;
     }
 
+    { PROFILE_ENTER(MAIN);
+
+    #ifdef HAVE_PYTHON
+    {
+        PROFILE_ENTER(MAIN_PYTHON);
+        Py_Initialize();
+    
+        {
+            static PyMethodDef BjamMethods[] = {
+                {"call", bjam_call, METH_VARARGS,
+                 "Call the specified bjam rule."},
+                {"import_rule", bjam_import_rule, METH_VARARGS,
+                 "Imports Python callable to bjam."},
+                {NULL, NULL, 0, NULL}
+            };
+    
+            Py_InitModule("bjam", BjamMethods);
+        }
+        PROFILE_EXIT(MAIN_PYTHON);
+    }
+    #endif
+    
 #ifndef NDEBUG
     run_unit_tests();
 #endif
@@ -344,16 +356,11 @@
     }
 
  
-    {
-   /* Pleace don't change the following line. The 'bump_version.py' script
-       expect a specific format of it. */
-    char  *major_version = "03", *minor_version = "01", *changenum = "11";
     var_set( "JAM_VERSION",
-             list_new( list_new( list_new( L0, newstr( major_version ) ), 
-                                 newstr( minor_version ) ), 
-                       newstr( changenum ) ),
+             list_new( list_new( list_new( L0, newstr( VERSION_MAJOR_SYM ) ), 
+                                 newstr( VERSION_MINOR_SYM ) ), 
+                       newstr( VERSION_PATCH_SYM ) ),
              VAR_SET );
-    }
 
     /* And JAMUNAME */
 # ifdef unix
@@ -424,7 +431,7 @@
     {
         if ( arg_v[n][0] == '-' )
         {
-            char *f = "-:d:j:f:gs:t:ano:qv";
+            char *f = "-:l:d:j:f:gs:t:ano:qv";
             for( ; *f; f++ ) if( *f == arg_v[n][1] ) break;
             if ( f[1] == ':' && arg_v[n][2] == '\0' ) { ++n; }
         }
@@ -468,6 +475,8 @@
     /* Now make target */
 
     {
+        PROFILE_ENTER(MAIN_MAKE);
+        
         LIST* targets = targets_to_update();
         if ( !targets )
         {
@@ -478,6 +487,8 @@
             int targets_count = list_length(targets);
             const char **targets2 = (const char **)malloc(targets_count * sizeof(char *));
             int n = 0;
+            if ( DEBUG_PROFILE )
+                profile_memory( targets_count * sizeof(char *) );
             for ( ; targets; targets = list_next(targets) )
             {
                 targets2[n++] = targets->string;
@@ -485,15 +496,20 @@
             status |= make( targets_count, targets2, anyhow );       
             free(targets);
         }
+        
+        PROFILE_EXIT(MAIN_MAKE);
     }
 
 
+    PROFILE_EXIT(MAIN); }
+    
     if ( DEBUG_PROFILE )
         profile_dump();
 
     /* Widely scattered cleanup */
 
     var_done();
+    file_done();
     donerules();
     donestamps();
     donestr();

Modified: boost-jam/branches/upstream/current/jam.h
===================================================================
--- boost-jam/branches/upstream/current/jam.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jam.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -313,11 +313,11 @@
 # define NO_VFORK
 # endif
 # ifdef __QNX__
+# define unix
 # ifdef __QNXNTO__
 # define OSMINOR "OS=QNXNTO"
 # define OS_QNXNTO
 # else
-# define unix
 # define OSMINOR "OS=QNX"
 # define OS_QNX
 # define NO_VFORK
@@ -385,6 +385,10 @@
 # define OS_OPENBSD
 # define unix
 # endif
+# if defined (__FreeBSD_kernel__) && !defined(__FreeBSD__)
+# define OSMINOR "OS=KFREEBSD"
+# define OS_KFREEBSD
+# endif
 # ifndef OSMINOR
 # define OSMINOR "OS=UNKNOWN"
 # endif
@@ -520,6 +524,7 @@
 	int	newestfirst;		/* build newest sources first */
 	char	debug[DEBUG_MAX];
 	FILE	*cmdout;		/* print cmds, not run them */
+    long timeout; /* number of seconds to limit actions to, default 0 for no limit. */
 } ;
 
 extern struct globs globs;

Modified: boost-jam/branches/upstream/current/jambase.c
===================================================================
--- boost-jam/branches/upstream/current/jambase.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/jambase.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -40,7 +40,7 @@
 "ECHO ;\n",
 "EXIT \"Please consult the documentation at 'http://www.boost.org'.\" ;\n",
 "}\n",
-"BOOST_BUILD_PATH = $(dir:R=$(.boost-build-file:D)) $(BOOST_BUILD_PATH) ;\n",
+"BOOST_BUILD_PATH = $(BOOST_BUILD_PATH) $(dir:R=$(.boost-build-file:D)) ;\n",
 "_poke .ENVIRON : BOOST_BUILD_PATH : $(BOOST_BUILD_PATH) ;\n",
 "local bootstrap-file =\n",
 "[ GLOB $(BOOST_BUILD_PATH) : bootstrap.jam ] ;\n",

Modified: boost-jam/branches/upstream/current/lists.c
===================================================================
--- boost-jam/branches/upstream/current/lists.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/lists.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -7,6 +7,7 @@
 # include "jam.h"
 # include "newstr.h"
 # include "lists.h"
+# include "debug.h"
 
 /*
  * lists.c - maintain lists of strings
@@ -80,7 +81,9 @@
 	}
 	else
 	{
-	    l = (LIST *)malloc( sizeof( *l ) );
+        l = (LIST *)malloc( sizeof( LIST ) );
+        if ( DEBUG_PROFILE )
+            profile_memory( sizeof( LIST ) );
 	}
 
 	/* If first on chain, head points here. */

Modified: boost-jam/branches/upstream/current/make1.c
===================================================================
--- boost-jam/branches/upstream/current/make1.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/make1.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -127,6 +127,8 @@
 	}
 	else
 	{
+        if ( DEBUG_PROFILE )
+            profile_memory( sizeof(state) );
 		return (state *)malloc(sizeof(state));
 	}
 }

Modified: boost-jam/branches/upstream/current/modules/order.c
===================================================================
--- boost-jam/branches/upstream/current/modules/order.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules/order.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -7,6 +7,7 @@
 #include "../strings.h"
 #include "../newstr.h"
 #include "../variable.h"
+#include "../debug.h"
 
 
 /* Use quite klugy approach: when we add order dependency from 'a' to 'b',
@@ -62,6 +63,8 @@
 {
     int i;
     int* colors = (int*)calloc(num_vertices, sizeof(int));
+    if ( DEBUG_PROFILE )
+        profile_memory( num_vertices*sizeof(int) );
     for (i = 0; i < num_vertices; ++i)
         colors[i] = white;
 
@@ -86,6 +89,8 @@
     int length = list_length(arg);
     int** graph = (int**)calloc(length, sizeof(int*));
     int* order = (int*)malloc((length+1)*sizeof(int));
+    if ( DEBUG_PROFILE )
+        profile_memory( length*sizeof(int*) + (length+1)*sizeof(int) );
    
     for(tmp = arg, src = 0; tmp; tmp = tmp->next, ++src) {
         /* For all object this one depend upon, add elements
@@ -94,6 +99,8 @@
         int index = 0;
 
         graph[src] = (int*)calloc(list_length(dependencies)+1, sizeof(int));
+        if ( DEBUG_PROFILE )
+            profile_memory( (list_length(dependencies)+1)*sizeof(int) );
         for(; dependencies; dependencies = dependencies->next) {          
             int dst = list_index(arg, dependencies->string);
             if (dst != -1)
@@ -130,12 +137,12 @@
 {
     {
         char* args[] = { "first", "second", 0 };
-        declare_native_rule("class at order", "add-pair", args, add_pair);
+        declare_native_rule("class at order", "add-pair", args, add_pair, 1);
     }
 
     {
         char* args[] = { "objects", "*", 0 };
-        declare_native_rule("class at order", "order", args, order);
+        declare_native_rule("class at order", "order", args, order, 1);
     }
 
 

Modified: boost-jam/branches/upstream/current/modules/path.c
===================================================================
--- boost-jam/branches/upstream/current/modules/path.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules/path.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -26,7 +26,7 @@
 {
     {
         char* args[] = { "location", 0 };
-        declare_native_rule("path", "exists", args, path_exists);
+        declare_native_rule("path", "exists", args, path_exists, 1);
     }
 
 }

Modified: boost-jam/branches/upstream/current/modules/property-set.c
===================================================================
--- boost-jam/branches/upstream/current/modules/property-set.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules/property-set.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -103,7 +103,7 @@
 {
     {
         char* args[] = { "raw-properties", "*", 0 };
-        declare_native_rule("property-set", "create", args, property_set_create);
+        declare_native_rule("property-set", "create", args, property_set_create, 1);
     }
 
 }

Modified: boost-jam/branches/upstream/current/modules/regex.c
===================================================================
--- boost-jam/branches/upstream/current/modules/regex.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules/regex.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -10,15 +10,16 @@
 #include "../compile.h"
 
 /*
-rule transform ( list * : pattern )
+rule transform ( list * : pattern : indices * )
 {
+    indices ?= 1 ;
     local result ;
     for local e in $(list)
     {
         local m = [ MATCH $(pattern) : $(e) ] ;
         if $(m)
         {
-            result += $(m[1]) ;
+            result += $(m[$(indices)]) ;
         }        
     }
     return $(result) ;
@@ -28,30 +29,60 @@
 {
     LIST* l = lol_get( frame->args, 0 );    
     LIST* pattern = lol_get( frame->args, 1 );    
+    LIST* indices_list = lol_get(frame->args, 2);
+    int* indices = 0;
+    int size;
+    int* p;
     LIST* result = 0;
 
     string buf[1];
     string_new(buf);
 
+    if (indices_list)
+    {
+        size = list_length(indices_list);
+        indices = (int*)malloc(size*sizeof(int));
+        for(p = indices; indices_list; indices_list = indices_list->next)
+        {
+            *p++ = atoi(indices_list->string);
+        }        
+    }
+    else 
+    {
+        size = 1;
+        indices = (int*)malloc(sizeof(int));
+        *indices = 1;
+    }
 
-    /* Result is cached and intentionally never freed */
     {
+        /* Result is cached and intentionally never freed */
         regexp *re = regex_compile( pattern->string );
 
         for(; l; l = l->next)
         {
             if( regexec( re, l->string ) )
             {
-                if (re->startp[1])
+                int i = 0;
+                for(; i < size; ++i)
                 {
-                    string_append_range( buf, re->startp[1], re->endp[1] );
-                    result = list_new( result, newstr( buf->value ) );                
-                    string_truncate( buf, 0 );
+                    int index = indices[i];
+                    /* Skip empty submatches. Not sure it's right in all cases,
+                       but surely is right for the case for which this routine
+                       is optimized -- header scanning.
+                    */
+                    if (re->startp[index] != re->endp[index])
+                    {
+                        string_append_range( buf, re->startp[index], re->endp[index] );
+                        result = list_new( result, newstr( buf->value ) ); 
+                        string_truncate( buf, 0 );
+                    }
                 }
             }
         }
         string_free( buf );
     }
+
+    free(indices);
     
     return result;
 }
@@ -59,7 +90,7 @@
 void init_regex()
 {
     {
-        char* args[] = { "list", "*", ":", "pattern", 0 };
-        declare_native_rule("regex", "transform", args, regex_transform);
+        char* args[] = { "list", "*", ":", "pattern", ":", "indices", "*", 0 };
+        declare_native_rule("regex", "transform", args, regex_transform, 2);
     }
 }

Modified: boost-jam/branches/upstream/current/modules/sequence.c
===================================================================
--- boost-jam/branches/upstream/current/modules/sequence.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules/sequence.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -36,7 +36,7 @@
     {
         char* args[] = { "elements", "*", ":", "rank", "*", 0 };
         declare_native_rule("sequence", "select-highest-ranked", args, 
-                            sequence_select_highest_ranked);
+                            sequence_select_highest_ranked, 1);
     }
 
 }

Modified: boost-jam/branches/upstream/current/modules/set.c
===================================================================
--- boost-jam/branches/upstream/current/modules/set.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules/set.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -35,7 +35,7 @@
 {
     {
         char* args[] = { "B", "*", ":", "A", "*", 0 };
-        declare_native_rule("set", "difference", args, set_difference);
+        declare_native_rule("set", "difference", args, set_difference, 1);
     }
 
 }

Modified: boost-jam/branches/upstream/current/modules.c
===================================================================
--- boost-jam/branches/upstream/current/modules.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/modules.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -3,8 +3,10 @@
  *  Distributed under the Boost Software License, Version 1.0.
  *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  */
+#include "jam.h"
+#include "debug.h"
+
 #include "modules.h"
-#include "jam.h"
 #include "string.h"
 #include "hash.h"
 #include "newstr.h"
@@ -30,6 +32,8 @@
 
 module_t* bindmodule( char* name )
 {
+    PROFILE_ENTER(BINDMODULE);
+    
     string s;
     module_t m_, *m = &m_;
 
@@ -56,6 +60,9 @@
         m->user_module = 0;
     }
     string_free( &s );
+
+    PROFILE_EXIT(BINDMODULE);
+
     return m;
 }
 
@@ -115,9 +122,11 @@
 }
 
 void import_module(LIST* module_names, module_t* target_module)
-{ 
+{
+    PROFILE_ENTER(IMPORT_MODULE);
+    
     struct hash* h;
-
+    
     if (!target_module->imported_modules)
         target_module->imported_modules = hashinit( sizeof(char*), "imported");
     h = target_module->imported_modules;
@@ -129,6 +138,8 @@
         
         hashenter(h, (HASHDATA**)&ss);
     }
+    
+    PROFILE_EXIT(IMPORT_MODULE);
 }
 
 static void add_module_name( void* r_, void* result_ )

Modified: boost-jam/branches/upstream/current/native.c
===================================================================
--- boost-jam/branches/upstream/current/native.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/native.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -10,7 +10,7 @@
 
 
 void declare_native_rule(char* module, char* rule, char** args, 
-                         LIST*(*f)(PARSE*, FRAME*))
+                         LIST*(*f)(PARSE*, FRAME*), int version)
 
 {
     module_t* m = bindmodule(module);
@@ -31,6 +31,7 @@
             n.arguments = 0;
         }
         n.procedure = parse_make( f, P0, P0, P0, C0, C0, 0 );        
+        n.version = version;
         hashenter(m->native_rules, (HASHDATA**)&np);
     }
 }

Modified: boost-jam/branches/upstream/current/native.h
===================================================================
--- boost-jam/branches/upstream/current/native.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/native.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -12,13 +12,22 @@
     char* name;
     argument_list* arguments;
     PARSE* procedure;
+    /* Version of the interface that the native rule provides.
+       It's possible that we want to change the set parameter
+       for existing native rule. In that case, version number
+       should be incremented so that Boost.Build can check for
+       version it relies on.
+
+       Versions are numbered from 1.
+    */
+    int version;
 };
 
 /* MSVC debugger gets confused unless this is provided */
 typedef struct native_rule_t native_rule_t ; 
 
 void declare_native_rule(char* module, char* rule, char** args, 
-                         LIST*(*f)(PARSE*, FRAME*));
+                         LIST*(*f)(PARSE*, FRAME*), int version);
 
 
 

Modified: boost-jam/branches/upstream/current/newstr.c
===================================================================
--- boost-jam/branches/upstream/current/newstr.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/newstr.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -7,6 +7,7 @@
 # include "jam.h"
 # include "newstr.h"
 # include "hash.h"
+# include "compile.h"
 # include <stddef.h>
 # include <stdlib.h>
 
@@ -34,6 +35,8 @@
 
 static struct hash *strhash = 0;
 static int strtotal = 0;
+static int strcount_in = 0;
+static int strcount_out = 0;
 
 /*
  * Immortal string allocator implementation speeds string allocation
@@ -53,11 +56,20 @@
 static char* storage_start = 0;
 static char* storage_finish = 0;
 
+/* */
+#define SIMPLE_ALLOC 0
+/*/
+#define SIMPLE_ALLOC 1
+/* */
+
 /*
  * allocate() - Allocate n bytes of immortal string storage
  */
 static char* allocate(size_t n)
 {
+    #if SIMPLE_ALLOC
+    return (char*)malloc(n);
+    #else
     /* See if we can grab storage from an existing block */
     size_t remaining = storage_finish - storage_start;
     if ( remaining >= n )
@@ -88,6 +100,7 @@
         }
         return new_block->data;
     }
+    #endif
 }
 
 /*
@@ -112,8 +125,12 @@
 	    strtotal += l + 1;
 	    memcpy( m, string, l + 1 );
 	    *s = m;
+
+        if ( DEBUG_PROFILE )
+            profile_memory( l+1 );
 	}
 
+    strcount_in += 1;
 	return *s;
 }
 
@@ -124,6 +141,7 @@
 char *
 copystr( char *s )
 {
+    strcount_in += 1;
 	return s;
 }
 
@@ -134,6 +152,7 @@
 void
 freestr( char *s )
 {
+    strcount_out += 1;
 }
 
 /*
@@ -155,4 +174,6 @@
     
     if( DEBUG_MEM )
         printf( "%dK in strings\n", strtotal / 1024 );
+    
+    /* printf( "--- %d strings of %d dangling\n", strcount_in-strcount_out, strcount_in ); */
 }

Modified: boost-jam/branches/upstream/current/parse.c
===================================================================
--- boost-jam/branches/upstream/current/parse.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/parse.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -17,6 +17,7 @@
 # include "newstr.h"
 # include "modules.h"
 # include "frames.h"
+# include "debug.h"
 
 /*
  * parse.c - make and destroy parse trees as driven by the parser
@@ -78,6 +79,8 @@
 	int	num )
 {
 	PARSE	*p = (PARSE *)malloc( sizeof( PARSE ) );
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( PARSE ) );
 
 	p->func = func;
 	p->left = left;

Modified: boost-jam/branches/upstream/current/patchlevel.h
===================================================================
--- boost-jam/branches/upstream/current/patchlevel.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/patchlevel.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -7,5 +7,11 @@
 /* Keep JAMVERSYM in sync with VERSION. */
 /* It can be accessed as $(JAMVERSION) in the Jamfile. */
 
-#define VERSION "3.1.11"
+#define VERSION_MAJOR 3
+#define VERSION_MINOR 1
+#define VERSION_PATCH 13
+#define VERSION_MAJOR_SYM "03"
+#define VERSION_MINOR_SYM "1"
+#define VERSION_PATCH_SYM "13"
+#define VERSION "3.1.13"
 #define JAMVERSYM "JAMVERSION=3.1"

Modified: boost-jam/branches/upstream/current/pathsys.h
===================================================================
--- boost-jam/branches/upstream/current/pathsys.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/pathsys.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -63,4 +63,19 @@
 
 #endif
 
+#ifdef USE_PATHUNIX
+/** Returns a static pointer to the system dependent path to the temporary
+    directory. NOTE: *without* a trailing path separator.
+*/
+const char * path_tmpdir(void);
+
+/** Returns a new temporary name.
+*/
+const char * path_tmpnam(void);
+
+/** Returns a new temporary path.
+*/
+const char * path_tmpfile(void);
 #endif
+
+#endif

Modified: boost-jam/branches/upstream/current/pathunix.c
===================================================================
--- boost-jam/branches/upstream/current/pathunix.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/pathunix.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -6,6 +6,7 @@
 
 /*  This file is ALSO:
  *  Copyright 2001-2004 David Abrahams.
+ *  Copyright 2005 Rene Rivera.
  *  Distributed under the Boost Software License, Version 1.0.
  *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  */
@@ -15,6 +16,11 @@
 # include "strings.h"
 # include "newstr.h"
 # include "filesys.h"
+# include <time.h>
+# include <stdlib.h>
+# ifndef OS_NT
+# include <unistd.h>
+# endif
 
 # ifdef USE_PATHUNIX
 
@@ -281,11 +287,11 @@
 DWORD ShortPathToLongPath(LPCTSTR lpszShortPath,LPTSTR lpszLongPath,DWORD
                           cchBuffer)
 {
-    DWORD i=0;
+    LONG i=0;
     TCHAR path[_MAX_PATH]={0};
     TCHAR ret[_MAX_PATH]={0};
-    DWORD pos=0, prev_pos=0;
-    DWORD len=_tcslen(lpszShortPath);
+    LONG pos=0, prev_pos=0;
+    LONG len=_tcslen(lpszShortPath);
 
     /* Is the string valid? */
     if (!lpszShortPath) {
@@ -393,5 +399,63 @@
 
 #endif
 
+static string path_tmpdir_buffer[1];
+static const char * path_tmpdir_result = 0;
 
+const char * path_tmpdir()
+{
+    if (!path_tmpdir_result)
+    {
+        # ifdef OS_NT
+        DWORD pathLength = 0;
+        pathLength = GetTempPath(pathLength,NULL);
+        string_new(path_tmpdir_buffer);
+        string_reserve(path_tmpdir_buffer,pathLength);
+        pathLength = GetTempPathA(pathLength,path_tmpdir_buffer[0].value);
+        path_tmpdir_buffer[0].value[pathLength-1] = '\0';
+        path_tmpdir_buffer[0].size = pathLength-1;
+        # else
+        const char * t = getenv("TMPDIR");
+        if (!t)
+        {
+            t = "/tmp";
+        }
+        string_new(path_tmpdir_buffer);
+        string_append(path_tmpdir_buffer,t);
+        # endif
+        path_tmpdir_result = path_tmpdir_buffer[0].value;
+    }
+    return path_tmpdir_result;
+}
+
+const char * path_tmpnam(void)
+{
+    char name_buffer[64];
+    # ifdef OS_NT
+    unsigned long c0 = GetCurrentProcessId();
+    # else
+    unsigned long c0 = getpid();
+    # endif
+    static unsigned long c1 = 0;
+    if (0 == c1) c1 = time(0)&0xffff;
+    c1 += 1;
+    sprintf(name_buffer,"jam%lx%lx.000",c0,c1);
+    return newstr(name_buffer);
+}
+
+const char * path_tmpfile(void)
+{
+    const char * result = 0;
+    
+    string file_path;
+    string_copy(&file_path,path_tmpdir());
+    string_push_back(&file_path,PATH_DELIM);
+    string_append(&file_path,path_tmpnam());
+    result = newstr(file_path.value);
+    string_free(&file_path);
+    
+    return result;
+}
+
+
 # endif /* unix, NT, OS/2, AmigaOS */

Modified: boost-jam/branches/upstream/current/pwd.c
===================================================================
--- boost-jam/branches/upstream/current/pwd.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/pwd.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -1,4 +1,4 @@
-/* Copyright Vladimir Prus 2002. Distributed under the Boost */
+/* Copyright Vladimir Prus 2002, Rene Rivera 2005. Distributed under the Boost */
 /* Software License, Version 1.0. (See accompanying */
 /* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
 
@@ -21,24 +21,32 @@
 #endif
 #endif
 
+/* The current directory can't change in bjam, so optimize this to cache
+** the result.
+*/
+static char pwd_buffer[PATH_MAX];
+static char * pwd_result = NULL;
 
 
 LIST*
 pwd(void)
 {
-    char buffer[PATH_MAX];
-    if (getcwd(buffer, sizeof(buffer)) == NULL)
+    if (!pwd_result)
     {
-        perror("can not get current directory");
-        return L0;
-    }
-    else
-    {
+        if (getcwd(pwd_buffer, sizeof(pwd_buffer)) == NULL)
+        {
+            perror("can not get current directory");
+            return L0;
+        }
+        else
+        {
 #ifdef NT
-        return list_new(L0, short_path_to_long_path(buffer));
+            pwd_result = short_path_to_long_path(pwd_buffer);
 #else
-        return list_new(L0, newstr(buffer));
+            pwd_result = newstr(pwd_buffer);
 #endif
+        }
     }
+    return list_new(L0, pwd_result);
 }
 

Modified: boost-jam/branches/upstream/current/regexp.c
===================================================================
--- boost-jam/branches/upstream/current/regexp.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/regexp.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -42,6 +42,7 @@
  * regular-expression syntax might require a total rethink.
  */
 #include "regexp.h"
+#include "debug.h"
 #include <stdio.h>
 #include <ctype.h>
 #ifndef ultrix
@@ -241,6 +242,8 @@
 	r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize);
 	if (r == NULL)
 		FAIL("out of space");
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof(regexp) + (unsigned)regsize );
 
 	/* Second pass: emit code. */
 	regparse = (char *)exp;

Modified: boost-jam/branches/upstream/current/rules.c
===================================================================
--- boost-jam/branches/upstream/current/rules.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/rules.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -16,6 +16,7 @@
 # include "lists.h"
 # include "pathsys.h"
 # include "timestamp.h"
+# include "debug.h"
 
 /*  This file is ALSO:
  *  Copyright 2001-2004 David Abrahams.
@@ -265,6 +266,8 @@
 	TARGET *t;
 
 	t = (TARGET *)malloc( sizeof( *t ) );
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( *t ) );
 	memset( (char *)t, '\0', sizeof( *t ) );
 	t->name = copystr( ot->name );
 	t->boundname = t->name;
@@ -319,6 +322,8 @@
 	TARGETS *c;
 
 	c = (TARGETS *)malloc( sizeof( TARGETS ) );
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( TARGETS ) );
 	c->target = target;
 
 	if( !chain ) chain = c;
@@ -365,6 +370,8 @@
 	ACTION	*action )
 {
 	ACTIONS *actions = (ACTIONS *)malloc( sizeof( ACTIONS ) );
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( ACTIONS ) );
 
 	actions->action = action;
 
@@ -413,7 +420,11 @@
         if ( v )
             settings_freelist = v->next;
         else
+        {
             v = (SETTINGS *)malloc( sizeof( *v ) );
+            if ( DEBUG_PROFILE )
+                profile_memory( sizeof( *v ) );
+        }
         
 	    v->symbol = newstr( symbol );
 	    v->value = value;
@@ -553,6 +564,8 @@
 argument_list* args_new()
 {
     argument_list* r = (argument_list*)malloc( sizeof(argument_list) );
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof(argument_list) );
     r->reference_count = 0;
     lol_init(r->data);
     return r;
@@ -690,6 +703,8 @@
 static rule_actions* actions_new( char* command, LIST* bindlist, int flags )
 {
     rule_actions* result = (rule_actions*)malloc(sizeof(rule_actions));
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof(rule_actions) );
     result->command = copystr( command );
     result->bindlist = bindlist;
     result->flags = flags;

Modified: boost-jam/branches/upstream/current/scan.c
===================================================================
--- boost-jam/branches/upstream/current/scan.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/scan.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -11,6 +11,7 @@
 # include "jamgram.h"
 # include "jambase.h"
 # include "newstr.h"
+# include "debug.h"
 
 /*
  * scan.c - the jam yacc scanner
@@ -82,6 +83,8 @@
 yyfparse( char *s )
 {
 	struct include *i = (struct include *)malloc( sizeof( *i ) );
+    if ( DEBUG_PROFILE )
+        profile_memory( sizeof( *i ) );
 
 	/* Push this onto the incp chain. */
 

Modified: boost-jam/branches/upstream/current/strings.c
===================================================================
--- boost-jam/branches/upstream/current/strings.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/strings.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -3,6 +3,7 @@
 /* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
 
 #include "strings.h"
+#include "debug.h"
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
@@ -55,6 +56,8 @@
     if ( self->value == self->opt )
     {
         self->value = (char*)malloc( capacity + JAM_STRING_MAGIC_SIZE );
+        if ( DEBUG_PROFILE )
+            profile_memory( capacity + JAM_STRING_MAGIC_SIZE );
         self->value[0] = 0;
         strncat( self->value, self->opt, sizeof(self->opt) );
         assert( strlen( self->value ) <= self->capacity ); /* This is a regression test */

Modified: boost-jam/branches/upstream/current/timestamp.c
===================================================================
--- boost-jam/branches/upstream/current/timestamp.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/timestamp.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -11,6 +11,8 @@
  */
 
 # include "jam.h"
+# include "debug.h"
+
 # include "hash.h"
 # include "filesys.h"
 # include "pathsys.h"
@@ -69,13 +71,15 @@
 	char	*target,
 	time_t	*time )
 {
+    PROFILE_ENTER(timestamp);
+    
 	PATHNAME f1, f2;
 	BINDING	binding, *b = &binding;
 	string buf[1];
+    string path; 
+	char *p;
 
 # ifdef DOWNSHIFT_PATHS
-        string path; 
-	char *p;
 
         string_copy( &path, target );
         p = path.value;
@@ -181,6 +185,8 @@
 # ifdef DOWNSHIFT_PATHS
         string_free( &path );
 #endif
+    
+    PROFILE_EXIT(timestamp);
 }
 
 static void

Modified: boost-jam/branches/upstream/current/variable.c
===================================================================
--- boost-jam/branches/upstream/current/variable.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/variable.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -6,6 +6,8 @@
 
 /*  This file is ALSO:
  *  Copyright 2001-2004 David Abrahams.
+ *  Copyright 2005 Reece H. Dunn.
+ *  Copyright 2005 Rene Rivera.
  *  Distributed under the Boost Software License, Version 1.0.
  *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  */
@@ -19,7 +21,9 @@
 # include "filesys.h"
 # include "newstr.h"
 # include "strings.h"
+# include "pathsys.h"
 # include <stdlib.h>
+# include <stdio.h>
 
 /*
  * variable.c - handle jam multi-element variables
@@ -121,7 +125,7 @@
 # endif
                 size_t len = strlen(val + 1);
 
-                int quoted = val[1] == '"' && val[len] == '"';
+                int quoted = val[1] == '"' && val[len] == '"' && len > 1;
                 
                 if ( quoted && preprocess )
                 {
@@ -207,6 +211,97 @@
 
 		if( in[0] == '$' && in[1] == '(' )
 		    dollar++;
+                #ifdef OPT_AT_FILES
+                else if ( in[0] == '@' && in[1] == '(' )
+                {
+                    int depth = 1;
+                    char *ine = in + 2;
+                    char *split = 0;
+                    
+                    /* Scan the content of the response file @() section. */
+                    
+                    while( *ine && depth > 0 )
+                    {
+                        switch( *ine )
+                        {
+                        case '(':
+                            ++depth;
+                            break;
+                        case ')':
+                            --depth;
+                            break;
+                        case ':':
+                            if( depth == 1 && ine[1] == 'E' && ine[2] == '=' )
+                            {
+                                split = ine;
+                            }
+                           break;
+                        }
+                        ++ine;
+                    }
+                    
+                    if (!split)
+                    {
+                        printf( "no file specified!\n" );
+                        exit( EXITBAD );
+                    }
+                    
+                    if ( depth == 0 )
+                    {
+                        string file_name_v;
+                        int file_name_l = 0;
+                        const char * file_name_s = 0;
+                        
+                        /* expand the temporary file name var inline */
+                        #if 0
+                        string_copy(&file_name_v,"$(");
+                        string_append_range(&file_name_v,in+2,split);
+                        string_push_back(&file_name_v,')');
+                        #else
+                        string_new(&file_name_v);
+                        string_append_range(&file_name_v,in+2,split);
+                        #endif
+                        file_name_l = var_string(file_name_v.value,out,oute-out+1,lol);
+                        string_free(&file_name_v);
+                        if ( file_name_l < 0 ) return -1;
+                        file_name_s = out;
+                        
+                        /* for stdout/stderr we will create a temp file and generate
+                           a command that outputs the content as needed. */
+                        if ( strcmp( "STDOUT", out ) == 0 || strcmp( "STDERR", out ) == 0 )
+                        {
+                            int err_redir = strcmp( "STDERR", out ) == 0;
+                            out[0] = '\0';
+                            file_name_s = path_tmpfile();
+                            file_name_l = strlen(file_name_s);
+                            #ifdef OS_NT
+                            if ( (out+7+file_name_l+(err_redir?5:0)) >= oute ) return -1;
+                            sprintf( out,"type \"%s\"%s",
+                                file_name_s,
+                                err_redir ? " 1>&2" : "" );
+                            #else
+                            if ( (out+6+file_name_l+(err_redir?5:0)) >= oute ) return -1;
+                            sprintf( out,"cat \"%s\"%s",
+                                file_name_s,
+                                err_redir ? " 1>&2" : "" );
+                            #endif
+                            /* we also make sure that the temp files created by this
+                               get nuked eventually. */
+                            file_remove_atexit( file_name_s );
+                        }
+                        
+                        /* expand the file value into the file reference */
+                        if ( !globs.noexec )
+                            var_string_to_file( split+3, ine-split-4, file_name_s, lol );
+                        
+                        /* continue on with the expansion */
+                        out += strlen(out);
+                    }
+                    
+                    /* and continue with the parsing just past the @() reference */
+                    in = ine;
+                }
+                #endif
 
 		*out++ = *in++;
 	    }
@@ -228,7 +323,7 @@
 
 		out = lastword;
 
-		for( ; l; l = list_next( l ) )
+		while ( l )
 		{
 		    int so = strlen( l->string );
 
@@ -237,7 +332,8 @@
 
 		    strcpy( out, l->string );
 		    out += so;
-		    *out++ = ' ';
+		    l = list_next( l );
+		    if ( l ) *out++ = ' ';
 		}
 
 		list_free( l );
@@ -252,6 +348,102 @@
 	return out - out0;
 }
 
+void var_string_to_file( const char * in, int insize, const char * out, LOL * lol )
+{
+    const char * ine = in+insize;
+    FILE * out_file = 0;
+    if ( strcmp( out, "STDOUT" ) == 0 )
+    {
+        out_file = stdout;
+    }
+    else if ( strcmp( out, "STDERR" ) == 0 )
+    {
+        out_file = stderr;
+    }
+    else
+    {
+        /* Handle "path to file" filenames. */
+        string out_name;
+        if ( out[0] == '"' && out[strlen(out) - 1] == '"' )
+        {
+            string_copy(&out_name,out+1);
+            string_truncate(&out_name,out_name.size-1);
+        }
+        else
+        {
+            string_copy(&out_name,out);
+        }
+        out_file = fopen( out_name.value, "w" );
+        if (!out_file)
+        {
+            printf( "failed to write output file '%s'!\n", out_name.value );
+            exit( EXITBAD );
+        }
+        string_free(&out_name);
+    }
+
+    while( *in && in < ine )
+    {
+        int dollar = 0;
+        const char * output_0 = in;
+        const char * output_1 = in;
+
+        /* Copy white space */
+
+        while ( output_1 < ine && *output_1 && isspace( *output_1 ) )
+        {
+            ++output_1;
+        }
+        if ( output_0 < output_1 )
+        {
+            fwrite(output_0,output_1-output_0,1,out_file);
+        }
+        output_0 = output_1;
+
+        /* Copy non-white space, watching for variables */
+
+        while( output_1 < ine && *output_1 && !isspace( *output_1 ) )
+        {
+            if( output_1[0] == '$' && output_1[1] && output_1[1] == '(' )
+            {
+                dollar++;
+            }
+            ++output_1;
+        }
+
+        /* If a variable encountered, expand it and and embed the */
+        /* space-separated members of the list in the output. */
+
+        if( dollar )
+        {
+            LIST *l;
+
+            l = var_expand( L0, (char*)output_0, (char*)output_1, lol, 0 );
+
+            while ( l )
+            {
+                fputs( l->string, out_file );
+                l = list_next( l );
+                if ( l ) fputc( ' ', out_file );
+            }
+
+            list_free( l );
+        }
+        else if ( output_0 < output_1 )
+        {
+            fwrite(output_0,output_1-output_0,1,out_file);
+        }
+        
+        in = output_1;
+    }
+
+    if ( out_file != stdout && out_file != stderr )
+    {
+        fflush( out_file );
+        fclose( out_file );
+    }
+}
+
 /*
  * var_get() - get value of a user defined symbol
  *
@@ -261,18 +453,44 @@
 LIST *
 var_get( char *symbol )
 {
-	VARIABLE var, *v = &var;
-
-	v->symbol = symbol;
-
-	if( varhash && hashcheck( varhash, (HASHDATA **)&v ) )
-	{
-	    if( DEBUG_VARGET )
-		var_dump( v->symbol, v->value, "get" );
-	    return v->value;
-	}
+    LIST * result = 0;
+    #ifdef OPT_AT_FILES
+    /* Some "fixed" variables... */
+    if ( strcmp( "TMPDIR", symbol ) == 0 )
+    {
+        result = list_new( L0, newstr( (char*)path_tmpdir() ) );
+    }
+    else if ( strcmp( "TMPNAME", symbol ) == 0 )
+    {
+        result = list_new( L0, newstr( (char*)path_tmpnam() ) );
+    }
+    else if ( strcmp( "TMPFILE", symbol ) == 0 )
+    {
+        result = list_new( L0, newstr( (char*)path_tmpfile() ) );
+    }
+    else if ( strcmp( "STDOUT", symbol ) == 0 )
+    {
+        result = list_new( L0, newstr( "STDOUT" ) );
+    }
+    else if ( strcmp( "STDERR", symbol ) == 0 )
+    {
+        result = list_new( L0, newstr( "STDERR" ) );
+    }
+    else
+    #endif
+    {
+        VARIABLE var, *v = &var;
     
-	return 0;
+        v->symbol = symbol;
+    
+        if( varhash && hashcheck( varhash, (HASHDATA **)&v ) )
+        {
+            if( DEBUG_VARGET )
+                var_dump( v->symbol, v->value, "get" );
+            result = v->value;
+        }
+    }
+    return result;
 }
 
 /*

Modified: boost-jam/branches/upstream/current/variable.h
===================================================================
--- boost-jam/branches/upstream/current/variable.h	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/variable.h	2006-11-07 14:20:16 UTC (rev 14010)
@@ -18,6 +18,13 @@
 void 	var_done();
 void    var_hash_swap( struct hash** );
 
+/** Expands the "in" expression directly into the "out" file.
+    The file can be one of: a path, STDOUT, or STDERR to send
+    the output to a file overwriting previous content, to
+    the console, or to the error output respectively.
+*/
+void var_string_to_file( const char * in, int insize, const char * out, LOL * lol );
+
 /*
  * Defines for var_set().
  */

Modified: boost-jam/branches/upstream/current/w32_getreg.c
===================================================================
--- boost-jam/branches/upstream/current/w32_getreg.c	2006-11-04 00:33:38 UTC (rev 14009)
+++ boost-jam/branches/upstream/current/w32_getreg.c	2006-11-07 14:20:16 UTC (rev 14010)
@@ -3,6 +3,9 @@
 /* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
 
 # include "jam.h"
+
+# if defined( OS_NT ) || defined( OS_CYGWIN )
+
 # include "lists.h"
 # include "newstr.h"
 # include "parse.h"
@@ -122,3 +125,4 @@
     return  result;
 }
 
+# endif




More information about the pkg-boost-commits mailing list