|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62724 - sandbox
From: john_at_[hidden]
Date: 2010-06-10 05:15:15
Author: johnmaddock
Date: 2010-06-10 05:15:13 EDT (Thu, 10 Jun 2010)
New Revision: 62724
URL: http://svn.boost.org/trac/boost/changeset/62724
Log:
Add some error handling to boost-build.jam so newbe setup is hopefully easier.
Added default Jamroot file, which just adds the main Boost tree to the include path.
Added README file to briefly describe how to get started.
Added:
sandbox/Jamroot.jam (contents, props changed)
sandbox/README.txt (contents, props changed)
Text files modified:
sandbox/boost-build.jam | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
Added: sandbox/Jamroot.jam
==============================================================================
--- (empty file)
+++ sandbox/Jamroot.jam 2010-06-10 05:15:13 EDT (Thu, 10 Jun 2010)
@@ -0,0 +1,7 @@
+
+import modules ;
+
+local boost = [ modules.peek : BOOST ] ;
+
+project sandbox : requirements <include>$(boost) ;
+
Added: sandbox/README.txt
==============================================================================
--- (empty file)
+++ sandbox/README.txt 2010-06-10 05:15:13 EDT (Thu, 10 Jun 2010)
@@ -0,0 +1,21 @@
+This directory contains the file "boost-build.jam" which search for a Boost install as follows:
+
+* In a directory specified by the --boost=path command line option.
+* In a directory specified by the BOOST environment variable.
+* In the directories ../boost and ../Trunk.
+
+In addition the variables BOOST and BOOST_ROOT are set to point to the root of the Boost install, so to refer to other
+Boost libraries and the main Boost headers, your Jamfile should contain something like:
+
+import modules ;
+
+local boost-path = [ modules.peek : BOOST ] ;
+
+And then you can refer to a Boost library "foo" as:
+
+$(boost)/libs/foo/build//boost_foo
+
+Note that if your project does not specify a Jamroot file, then a default one is provided for you,
+and that this file will automatically add $(BOOST)/ to your include path.
+
+
Modified: sandbox/boost-build.jam
==============================================================================
--- sandbox/boost-build.jam (original)
+++ sandbox/boost-build.jam 2010-06-10 05:15:13 EDT (Thu, 10 Jun 2010)
@@ -25,6 +25,15 @@
$(.boost-build-file:D)/../Trunk
] ;
+# error handling:
+if ! $(boost-src)
+{
+ ECHO Unable to find the Boost source tree in the locations searched. ;
+ ECHO Try setting the environment variable BOOST to point to your ;
+ ECHO Boost tree, or else invoke bjam with the --boost=path option. ;
+ ECHO The Boost include path will not be automatically set. ;
+}
+
#~ Attempts to find the Boost.Build files...
local boost-build-src = [ if-has-file bootstrap.jam :
@@ -34,6 +43,15 @@
$(boost-src)/tools/build/v2
] ;
+# error handling:
+if ! $(boost-build-src)
+{
+ ECHO Unable to find the Boost.Build source tree in the locations searched. ;
+ ECHO Try setting the environment variable BOOST_BUILD to point to your ;
+ ECHO Boost.Build tree, or else invoke bjam with the --boost-build=path option. ;
+ ECHO More failures will very likely follow... ;
+}
+
#~ Set some common vars to refer to the Boost sources...
BOOST ?= $(boost-src) ;
@@ -43,3 +61,5 @@
boost-build $(boost-build-src) ;
+
+
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk