diff --git a/v2/Jamroot.jam b/v2/Jamroot.jam
index 421e51a18..11334864c 100644
--- a/v2/Jamroot.jam
+++ b/v2/Jamroot.jam
@@ -15,13 +15,14 @@ if [ os.on-windows ]
package.install boost-build-engine boost-build
: # properties
: # binaries
- bjam$(ext)
+ b2$(ext) bjam$(ext)
;
local e1 = [ path.glob-tree $(SELF)/example : * : . .svn ] ;
local e2 ;
for e in $(e1)
{
+ e = [ path.native $(e) ] ;
if [ CHECK_IF_FILE $(e) ]
{
e2 += $(e) ;
diff --git a/v2/bootstrap.bat b/v2/bootstrap.bat
index 3fa2b199d..190c9283d 100644
--- a/v2/bootstrap.bat
+++ b/v2/bootstrap.bat
@@ -6,20 +6,22 @@ REM Distributed under the Boost Software License, Version 1.0.
REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
ECHO Bootstrapping the build engine
-if exist ".\engine\src\bin.ntx86\bjam.exe" del engine\src\bin.ntx86\bjam.exe
-if exist ".\engine\src\bin.ntx86_64\bjam.exe" del engine\src\bin.ntx86_64\bjam.exe
-cd engine\src
+if exist ".\engine\bin.ntx86\bjam.exe" del engine\bin.ntx86\bjam.exe
+if exist ".\engine\bin.ntx86_64\bjam.exe" del engine\bin.ntx86_64\bjam.exe
+cd engine
call .\build.bat %* > ..\..\bootstrap.log
@ECHO OFF
-cd ..\..
+cd ..
-if exist ".\engine\src\bin.ntx86\bjam.exe" (
- copy .\engine\src\bin.ntx86\bjam.exe . > nul
+if exist ".\engine\bin.ntx86\b2.exe" (
+ copy .\engine\bin.ntx86\b2.exe . > nul
+ copy .\engine\bin.ntx86\bjam.exe . > nul
goto :bjam_built)
-if exist ".\engine\src\bin.ntx86_64\bjam.exe" (
- copy .\engine\src\bin.ntx86_64\bjam.exe . > nul
+if exist ".\engine\bin.ntx86_64\b2.exe" (
+ copy .\engine\bin.ntx86_64\b2.exe . > nul
+ copy .\engine\bin.ntx86_64\bjam.exe . > nul
goto :bjam_built)
goto :bjam_failure
@@ -29,7 +31,7 @@ goto :bjam_failure
ECHO.
ECHO Bootstrapping is done. To build, run:
ECHO.
-ECHO .\bjam --prefix=DIR install
+ECHO .\b2 --prefix=DIR install
ECHO.
goto :end
diff --git a/v2/bootstrap.sh b/v2/bootstrap.sh
index 3b681004c..508355173 100755
--- a/v2/bootstrap.sh
+++ b/v2/bootstrap.sh
@@ -55,7 +55,7 @@ my_dir="."
# Determine the toolset, if not already decided
if test "x$TOOLSET" = x; then
- guessed_toolset=`$my_dir/engine/src/build.sh --guess-toolset`
+ guessed_toolset=`$my_dir/engine/build.sh --guess-toolset`
case $guessed_toolset in
acc | darwin | gcc | como | mipspro | pathscale | pgi | qcc | vacpp )
TOOLSET=$guessed_toolset
@@ -96,7 +96,7 @@ rm -f config.log
if test "x$BJAM" = x; then
echo -n "Bootstrapping the build engine with toolset $TOOLSET... "
pwd=`pwd`
- (cd "$my_dir/engine/src" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
+ (cd "$my_dir/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
if [ $? -ne 0 ]; then
echo
echo "Failed to bootstrap the build engine"
@@ -104,16 +104,17 @@ if test "x$BJAM" = x; then
exit 1
fi
cd "$pwd"
- arch=`cd $my_dir/engine/src && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
- BJAM="$my_dir/engine/src/$arch/bjam"
- echo "engine/src/$arch/bjam"
+ arch=`cd $my_dir/engine && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
+ BJAM="$my_dir/engine/$arch/b2"
+ echo "engine/$arch/bjam"
cp "$BJAM" .
+ cp "$my_dir/engine/$arch/bjam" .
fi
cat << EOF
Bootstrapping is done. To build and install, run:
- ./bjam install --prefix=
+ ./b2 install --prefix=
EOF
diff --git a/v2/build-system.jam b/v2/build-system.jam
index a555b610d..9f9c884cc 100644
--- a/v2/build-system.jam
+++ b/v2/build-system.jam
@@ -543,14 +543,15 @@ local rule should-clean-project ( project )
#
################################################################################
-{
+{
if --version in $(.argv)
{
version.print ;
EXIT ;
}
-
-
+
+ version.verify-engine-version ;
+
load-configuration-files ;
local extra-properties ;
@@ -771,7 +772,6 @@ local rule should-clean-project ( project )
# Prepare valid XML header and footer with some basic info.
local nl = "
" ;
- local jam = [ version.jam ] ;
local os = [ modules.peek : OS OSPLAT JAMUNAME ] "" ;
local timestamp = [ modules.peek : JAMDATE ] ;
local cwd = [ PWD ] ;
@@ -780,7 +780,6 @@ local rule should-clean-project ( project )
.header on $(xml-file) =
""
"$(nl)"
- "$(nl) "
"$(nl) "
"$(nl) "
"$(nl) "
diff --git a/v2/build/configure.jam b/v2/build/configure.jam
index 6a87157a2..14c1328af 100644
--- a/v2/build/configure.jam
+++ b/v2/build/configure.jam
@@ -17,6 +17,8 @@ import sequence ;
import property ;
import property-set ;
import "class" : new ;
+import common ;
+import path ;
rule log-summary ( )
{
@@ -185,12 +187,9 @@ rule builds ( metatarget-reference : properties * : what ? : retry ? )
# should never be called by users.
rule set-log-file ( log-file )
{
- # FIXME: remove this check as soon as Boost regression tests
- # start using trunk bjam
- if FILE_OPEN in [ RULENAMES ]
- {
- .log-fd = [ FILE_OPEN $(log-file) : "w" ] ;
- }
+ path.makedirs [ path.parent $(log-file) ] ;
+
+ .log-fd = [ FILE_OPEN $(log-file) : "w" ] ;
}
# Frontend rules
diff --git a/v2/build/project.jam b/v2/build/project.jam
index 4a8eb5607..c9967613b 100644
--- a/v2/build/project.jam
+++ b/v2/build/project.jam
@@ -433,7 +433,8 @@ rule initialize (
# Import rules common to all project modules from project-rules module,
# defined at the end of this file.
- modules.clone-rules project-rules $(module-name) ;
+ local rules = [ RULENAMES project-rules ] ;
+ IMPORT project-rules : $(rules) : $(module-name) : $(rules) ;
local jamroot ;
@@ -881,15 +882,16 @@ module project-rules
# expect the module to be found even though the directory is not in
# BOOST_BUILD_PATH.
local x = [ modules.peek : BOOST_BUILD_PATH ] ;
- local caller = [ modules.binding $(__name__) ] ;
- modules.poke : BOOST_BUILD_PATH : $(caller:D) $(x) ;
+ local caller = [ CALLER_MODULE ] ;
+ local caller-location = [ modules.binding $(caller) ] ;
+ modules.poke : BOOST_BUILD_PATH : $(caller-location:D) $(x) ;
toolset.using $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
modules.poke : BOOST_BUILD_PATH : $(x) ;
# The above might have clobbered .current-project. Restore the correct
# value.
modules.poke project : .current-project
- : [ project.target $(__name__) ] ;
+ : [ project.target $(caller) ] ;
}
import modules ;
@@ -913,7 +915,8 @@ module project-rules
import path ;
import project ;
- local attributes = [ project.attributes $(__name__) ] ;
+ local caller = [ CALLER_MODULE ] ;
+ local attributes = [ project.attributes $(caller) ] ;
if $(id)
{
$(attributes).set id : $(id) ;
@@ -991,7 +994,8 @@ module project-rules
)
{
import project ;
- local p = [ project.target $(__name__) ] ;
+ local caller = [ CALLER_MODULE ] ;
+ local p = [ project.target $(caller) ] ;
$(p).add-constant $(name) : $(value) ;
}
@@ -1005,20 +1009,26 @@ module project-rules
)
{
import project ;
- local p = [ project.target $(__name__) ] ;
+ local caller = [ CALLER_MODULE ] ;
+ local p = [ project.target $(caller) ] ;
$(p).add-constant $(name) : $(value) : path ;
}
rule use-project ( id : where )
{
+ import modules ;
# See comment in 'load' for explanation.
- .used-projects += $(id) $(where) ;
+ local caller = [ CALLER_MODULE ] ;
+ modules.poke $(caller) : .used-projects :
+ [ modules.peek $(caller) : .used-projects ]
+ $(id) $(where) ;
}
rule build-project ( dir )
{
import project ;
- local attributes = [ project.attributes $(__name__) ] ;
+ local caller = [ CALLER_MODULE ] ;
+ local attributes = [ project.attributes $(caller) ] ;
local now = [ $(attributes).get projects-to-build ] ;
$(attributes).set projects-to-build : $(now) $(dir) ;
diff --git a/v2/build/version.jam b/v2/build/version.jam
index 1d64026d9..7626ddda8 100644
--- a/v2/build/version.jam
+++ b/v2/build/version.jam
@@ -6,26 +6,44 @@
import errors ;
import numbers ;
+major = "2011" ;
+minor = "04" ;
rule boost-build ( )
{
- return "V2 (Milestone 12)" ;
+ return "$(major).$(minor)-svn" ;
}
-
-rule jam ( )
-{
- local v = [ modules.peek : JAM_VERSION ] ;
- return $(v:J=.) ;
-}
-
-
rule print ( )
{
- ECHO "Boost.Build" [ boost-build ] ;
- ECHO "Boost.Jam" [ jam ] ;
+ if [ verify-engine-version ]
+ {
+ ECHO "Boost.Build" [ boost-build ] ;
+ }
}
+rule verify-engine-version ( )
+{
+ local v = [ modules.peek : JAM_VERSION ] ;
+
+ if $(v[1]) != $(major) || $(v[2]) != $(minor)
+ {
+ local argv = [ modules.peek : ARGV ] ;
+ local e = $(argv[1]) ;
+ local l = [ modules.binding version ] ;
+ l = $(l:D) ;
+ l = $(l:D) ;
+ ECHO "warning: mismatched versions of Boost.Build engine and core" ;
+ ECHO "warning: Boost.Build engine ($(e)) is $(v:J=.)" ;
+ ECHO "warning: Boost.Build core (at $(l)) is" [ boost-build ] ;
+ }
+ else
+ {
+ return true ;
+ }
+}
+
+
# Utility rule for testing whether all elements in a sequence are equal to 0.
#
diff --git a/v2/doc/jamfile.jam b/v2/doc/jamfile.jam
index 7c946a453..9bfbd0641 100644
--- a/v2/doc/jamfile.jam
+++ b/v2/doc/jamfile.jam
@@ -15,6 +15,7 @@ boostbook userman : src/standalone.xml
jam_docs
jam_docs
boost.root=../../../../..
+ boost.defaults=Boost
;
xml jam_docs : bjam.qbk ;
diff --git a/v2/doc/src/install.xml b/v2/doc/src/install.xml
index 526606fd6..afae46aa1 100644
--- a/v2/doc/src/install.xml
+++ b/v2/doc/src/install.xml
@@ -22,7 +22,7 @@
Run either .\bootstrap.bat (on Windows), or
- ./bootstrap.sh (on other operating systmes).
+ ./bootstrap.sh (on other operating systems).
@@ -52,7 +52,7 @@
PREFIX/share/boost-build/examples/hello
to a different directory, then change to that directory and run:
PREFIX/bin/bjam
- A simple executable should be build.
+ A simple executable should be built.
-
-
-
-
-
-
- Automatic redirection failed, please go to ../../../../doc/html/jam.html
-
-