|
Boost-Commit : |
From: grafik_at_[hidden]
Date: 2007-05-25 14:36:05
Author: grafik
Date: 2007-05-25 14:36:04 EDT (Fri, 25 May 2007)
New Revision: 4253
URL: http://svn.boost.org/trac/boost/changeset/4253
Log:
Some modifications to make specifying Boost and/or Boost.Build location with options and/or env vars and/or automatic.
Removed:
sandbox/Jamfile
sandbox/Jamrules
Text files modified:
sandbox/Jamfile.v2 | 29 ++++++++++++++++++++
sandbox/boost-build.jam | 54 +++++++++++++++++++++++++++++----------
2 files changed, 68 insertions(+), 15 deletions(-)
Deleted: sandbox/Jamfile
==============================================================================
--- sandbox/Jamfile 2007-05-25 14:36:04 EDT (Fri, 25 May 2007)
+++ (empty file)
@@ -1,4 +0,0 @@
-project-root ;
-subinclude libs/numeric/bindings/amos ;
-subinclude libs/numeric/bindings/blas ;
-subinclude libs/numeric/bindings/lapack ;
Modified: sandbox/Jamfile.v2
==============================================================================
--- sandbox/Jamfile.v2 (original)
+++ sandbox/Jamfile.v2 2007-05-25 14:36:04 EDT (Fri, 25 May 2007)
@@ -1 +1,28 @@
-use-project /boost : $(BOOST_ROOT) ;
+# Copyright Rene Rivera 2007.
+#
+# 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)
+
+# Usage:
+#
+# bjam [options | properties | targets]
+#
+# Options:
+#
+# --boost=<BOOST> The directotory of a Boost source tree.
+# Default; BOOST env var (if found)
+# Default; ../boost (if found)
+#
+# --boost-build=<BOOST_BUILD>
+# The directory for the Boost.Build v2 files.
+# Default; BOOST_BUILD_PATH env var (if found)
+# Default; BOOST_BUILD env var (if found)
+# Default; <BOOST>/tools/build/v2 (if found)
+
+#~ If we have the Boost sources we can use the project...
+
+if [ GLOB $(BOOST) : [ modules.peek project : JAMFILE ] ]
+{
+ use-project /boost : $(BOOST) ;
+}
Deleted: sandbox/Jamrules
==============================================================================
--- sandbox/Jamrules 2007-05-25 14:36:04 EDT (Fri, 25 May 2007)
+++ (empty file)
@@ -1 +0,0 @@
-project boost : $(BOOST) ;
\ No newline at end of file
Modified: sandbox/boost-build.jam
==============================================================================
--- sandbox/boost-build.jam (original)
+++ sandbox/boost-build.jam 2007-05-25 14:36:04 EDT (Fri, 25 May 2007)
@@ -1,17 +1,43 @@
-# Set the BOOST environment variable on your command-line or in the
-# environment to point at the root of your regular Boost installation.
-# Defaults to finding the boost installation in the same directory as
-# the directory containing this file.
-BOOST ?= $(.boost-build-file:D)/../boost ;
+# Copyright Rene Rivera 2007.
+#
+# 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)
-if --v2 in $(ARGV)
+# For instructions see Jamfile.v2, or "bjam --help".
+
+local rule if-has-file ( file + : dir * )
{
- JAMFILE = [Bb]uild.jam [Jj]amfile.v2 ;
- BOOST_ROOT = $(BOOST) ;
- boost-build $(BOOST)/tools/build/v2 ;
+ local result ;
+ if $(dir)
+ {
+ result = [ GLOB $(dir) : $(file) ] ;
+ }
+ return $(result[1]:P) ;
}
-else
-{
- BOOST_ROOT = $(.boost-build-file:D) $(BOOST) ;
- boost-build $(BOOST)/tools/build/v1 ;
-}
+
+#~ Attempts to find the Boost source tree...
+
+local boost-src = [ if-has-file configure :
+ [ MATCH --boost=(.*) : $(ARGV) ]
+ $(BOOST)
+ $(.boost-build-file:D)/../boost
+ ] ;
+
+#~ Attempts to find the Boost.Build files...
+
+local boost-build-src = [ if-has-file bootstrap.jam :
+ [ MATCH --boost-build=(.*) : $(ARGV) ]
+ $(BOOST_BUILD_PATH)
+ $(BOOST_BUILD)
+ $(boost-src)/tools/build/v2
+ ] ;
+
+#~ Set some common vars to refer to the Boost sources...
+
+BOOST ?= $(boost-src) ;
+BOOST_ROOT ?= $(boost-src) ;
+
+#~ And load up Boost.Build...
+
+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