Update of /cvsroot/boost/boost/tools/build/v2/util
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10123/tools/build/v2/util
Modified Files:
Tag: RC_1_34_0
sequence.jam os.jam
Log Message:
** This comment represents the aggregate changes merged from the **
** bbv2python branch. **
gcc.jam: build and use import libraries on Cygwin and Windows, but
accept DLL-only linking with prebuilt DLLs.
builtin.jam: fix default-host-os so that <target-os> actually becomes
a functional feature. Improve English in comments
property-set.jam: add str method so we can print them in generator
debugging output.
generators.jam: improved debugging output
build-system.jam: add missing semicolon
python.jam:
* fix cross-NT/CYGWIN build support
* add condition to the build requirements of the python targets
os.jam:
* add the ability to get constants for a particular OS
builtin.jam:
* remove "optional" attribute from host-os
* fix confusing indents
python.jam
----------
* Removed comments about known problems because they make no sense.
* Unified MacOS initialization with NT and *nix
* Updated comment describing init behavior
* Support for passing Python command as first argument
* Removed unused get-python-interpreter and get-python-version rules,
since they can't work with that interface. Working versions of
these will be reinstated for Doug Gregor in the near future.
* When invoking Python to collect configuration info, collect it all at at once.
* When a Cygwin symlink is found by an NT build of bjam, give hints
about where to find the file it points at.
* Lots of refactoring
* Make the logic work plausibly even when no Python executable can be found
darwin.jam
----------
* Simplified logic for setting up FRAMEWORK_PATH
* Corrected logic for setting up -framework option
feature.jam
-----------
* Make feature.defaults, feature.attributes, feature.values, and
feature.get-values resilient to feature names being passed without
grist.
gcc.jam, python.jam, builtin.jam
--------------------------------
* Include some progress volodya has made toward support for
<suppress-import-lib>
Index: sequence.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/util/sequence.jam,v
retrieving revision 1.15.16.3
retrieving revision 1.15.16.4
diff -u -d -r1.15.16.3 -r1.15.16.4
--- sequence.jam 5 Nov 2006 07:24:38 -0000 1.15.16.3
+++ sequence.jam 15 Mar 2007 04:02:22 -0000 1.15.16.4
@@ -46,6 +46,16 @@
return $(result) ;
}
+rule reverse ( s * )
+{
+ local r ;
+ for local x in $(s)
+ {
+ r = $(x) $(r) ;
+ }
+ return $(r) ;
+}
+
rule less ( a b )
{
@@ -304,5 +314,7 @@
assert.result e-3 h-3
: sequence.select-highest-ranked e-1 e-3 h-3 m-2 : 1 3 3 2 ;
+
+ assert.result 7 6 5 4 3 2 1 : sequence.reverse 1 2 3 4 5 6 7 ;
}
}
Index: os.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/util/os.jam,v
retrieving revision 1.12.4.2
retrieving revision 1.12.4.3
diff -u -d -r1.12.4.2 -r1.12.4.3
--- os.jam 5 Nov 2006 07:24:38 -0000 1.12.4.2
+++ os.jam 15 Mar 2007 04:02:22 -0000 1.12.4.3
@@ -5,6 +5,7 @@
# (See accompanying file LICENSE_1_0.txt or
http://www.boost.org/LICENSE_1_0.txt)
import modules ;
+import string ;
# Return the value(s) of the given environment variable(s) at the time
# bjam was invoked.
@@ -17,50 +18,77 @@
.platform = [ modules.peek : OSPLAT ] ;
.version = [ modules.peek : OSVER ] ;
-local rule constant ( c )
+local rule constant ( c : os ? )
{
+ os ?= $(.name) ;
# First look for platform-specific name, then general value
- local variables = .$(c)-$(.name) .$(c) ;
+ local variables = .$(c)-$(os) .$(c) ;
local result = $($(variables)) ;
return $(result[1]) ;
}
-rule get-constant ( )
+rule get-constant ( os ? )
{
# Find the name of the constant being accessed, which is
# equal to the name used to invoke us.
local bt = [ BACKTRACE 1 ] ;
local rulename = [ MATCH ([^.]*)$ : $(bt[4]) ] ;
- return [ constant $(rulename) ] ;
+ return [ constant $(rulename) : $(os) ] ;
}
# export all the common constants
-.constants = name platform version shared-library-path-variable path-separator
;
+.constants = name platform version shared-library-path-variable path-separator
executable-path-variable executable-suffix ;
for local constant in $(.constants)
{
IMPORT $(__name__) : get-constant : $(__name__) : $(constant) ;
}
EXPORT $(__name__) : $(.constants) ;
-.shared-library-path-variable-NT = PATH ;
+.executable-path-variable-NT = PATH ;
+# On Windows the case and capitalization of PATH is not always
+# predictable, so let's find out what variable name was really set.
+if $(.name) = NT
+{
+ for local n in [ VARNAMES .ENVIRON ]
+ {
+ if $(n:L) = path
+ {
+ .executable-path-variable-NT = $(n) ;
+ }
+ }
+}
+
+# Specific constants for various platforms. There's no need to define
+# any constant whose value would be the same as the default, below.
+.shared-library-path-variable-NT = $(.executable-path-variable-NT) ;
.path-separator-NT = ";" ;
.expand-variable-prefix-NT = % ;
.expand-variable-suffix-NT = % ;
+.executable-suffix-NT = .exe ;
.shared-library-path-variable-CYGWIN = PATH ;
-.path-separator-CYGWIN = ":" ;
-.expand-variable-prefix-CYGWIN = $ ;
-.expand-variable-suffix-CYGWIN = "" ;
.shared-library-path-variable-MACOSX = DYLD_LIBRARY_PATH ;
-
+# Default constants
.shared-library-path-variable = LD_LIBRARY_PATH ;
.path-separator = ":" ;
.expand-variable-prefix = $ ;
.expand-variable-suffix = "" ;
+.executable-path-variable = PATH ;
+.executable-suffix = "" ;
+# Return a list of the directories in the PATH. Yes, that information
+# is (sort of) available in the global module, but jam code can change
+# those values, and it isn't always clear what case/capitalization to
+# use when looking. This rule is a more reliable way to get there.
+rule executable-path ( )
+{
+ return [ string.words [ environ [ constant executable-path-variable ] ]
+ : [ constant path-separator ] ] ;
+}
+
if $(.name) = NT
{
local home = [ environ HOMEDRIVE HOMEPATH ] ;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs