Update of /cvsroot/boost/boost/tools/build/v2/util
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13122/tools/build/v2/util
Modified Files:
Tag: bbv2python
os.jam sequence.jam
Log Message:
checkpoint for volodya
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.2.2.1
diff -u -d -r1.12.4.2 -r1.12.4.2.2.1
--- os.jam 5 Nov 2006 07:24:38 -0000 1.12.4.2
+++ os.jam 8 Mar 2007 15:56:58 -0000 1.12.4.2.2.1
@@ -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.
@@ -36,31 +37,57 @@
# 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 ] ;
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.3.2.1
diff -u -d -r1.15.16.3 -r1.15.16.3.2.1
--- sequence.jam 5 Nov 2006 07:24:38 -0000 1.15.16.3
+++ sequence.jam 8 Mar 2007 15:56:58 -0000 1.15.16.3.2.1
@@ -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 ;
}
}
-------------------------------------------------------------------------
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