|
Boost-Commit : |
From: grafikrobot_at_[hidden]
Date: 2007-08-20 12:52:58
Author: grafik
Date: 2007-08-20 12:52:55 EDT (Mon, 20 Aug 2007)
New Revision: 38792
URL: http://svn.boost.org/trac/boost/changeset/38792
Log:
Merge changes from Version_1_34_1 back to trunk.
Text files modified:
trunk/tools/build/v2/tools/gcc.jam | 50 +++++++++++++++++++--------------------
trunk/tools/build/v2/tools/testing.jam | 2
trunk/tools/build/v2/tools/vacpp.jam | 3 +
trunk/tools/build/v2/util/os.jam | 47 ++++++++++++++++++++++++++++++-------
trunk/tools/build/v2/util/sequence.jam | 12 +++++++++
5 files changed, 77 insertions(+), 37 deletions(-)
Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam (original)
+++ trunk/tools/build/v2/tools/gcc.jam 2007-08-20 12:52:55 EDT (Mon, 20 Aug 2007)
@@ -434,42 +434,40 @@
local generated-targets = [ unix-linking-generator.run $(project) $(name)
: $(property-set) : $(sources) ] ;
- # If more than one target was generated, throw out the
- # last one, which on windows just leaves the import
- # library. Most generators on windows simply don't accept
- # shared libraries as input, but being able to link
- # directly to a shared library without an import library
- # is an important capability of GCC. Therefore, we remove
- # the target after the action sees it so that dependent
- # targets don't try to link to both the import library and
- # the DLL.
- if [ $(property-set).get <suppress-import-lib> ] = true
- {
- return $(generated-targets[0]) $(generated-targets[-1]) ;
- }
- else
- {
- return $(generated-targets[1-2]) ;
- }
+ return $(generated-targets) ;
}
}
}
-generators.register [ new gcc-linking-generator gcc.link : LIB OBJ : EXE
- : <toolset>gcc ] ;
-
.IMPLIB-COMMAND = ;
-.IMPLIB-TYPE = ;
if [ os.on-windows ]
{
.IMPLIB-COMMAND = "-Wl,--out-implib," ;
- .IMPLIB-TYPE = IMPORT_LIB ;
+ generators.register
+ [ new gcc-linking-generator gcc.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>gcc ] ;
+ generators.register
+ [ new gcc-linking-generator gcc.link.dll
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : IMPORT_LIB SHARED_LIB
+ : <toolset>gcc ] ;
+}
+else
+{
+ generators.register
+ [ new gcc-linking-generator gcc.link
+ : LIB OBJ
+ : EXE
+ : <toolset>gcc ] ;
+ generators.register
+ [ new gcc-linking-generator gcc.link.dll
+ : LIB OBJ
+ : SHARED_LIB
+ : <toolset>gcc ] ;
}
-generators.register
- [ new gcc-linking-generator gcc.link.dll : LIB OBJ : $(.IMPLIB-TYPE) SHARED_LIB
- : <toolset>gcc ] ;
-
# Declare flags for linking
# First, the common flags
flags gcc.link OPTIONS <debug-symbols>on : -g ;
Modified: trunk/tools/build/v2/tools/testing.jam
==============================================================================
--- trunk/tools/build/v2/tools/testing.jam (original)
+++ trunk/tools/build/v2/tools/testing.jam 2007-08-20 12:52:55 EDT (Mon, 20 Aug 2007)
@@ -354,7 +354,7 @@
# - if 'none', does not remove anything, ever
# - if empty, removes 'source'
# - if non-empty and not 'none', contains a list of sources to remove.
-rule capture-output ( target : source : properties * : targets-to-remove ? )
+rule capture-output ( target : source : properties * : targets-to-remove * )
{
output-file on $(target) = $(target:S=.output) ;
LOCATE on $(target:S=.output) = [ on $(target) return $(LOCATE) ] ;
Modified: trunk/tools/build/v2/tools/vacpp.jam
==============================================================================
--- trunk/tools/build/v2/tools/vacpp.jam (original)
+++ trunk/tools/build/v2/tools/vacpp.jam 2007-08-20 12:52:55 EDT (Mon, 20 Aug 2007)
@@ -70,12 +70,13 @@
flags vacpp.link LINKFLAGS <link>static : -qtwolink ;
# Run-time linking
- flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl ;
+ flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl -qtwolink ;
}
else
{
# Linux PPC
flags vacpp.compile CFLAGS <link>shared : -qpic ;
+ flags vacpp FINDLIBS : rt ;
}
# Profiling
Modified: trunk/tools/build/v2/util/os.jam
==============================================================================
--- trunk/tools/build/v2/util/os.jam (original)
+++ trunk/tools/build/v2/util/os.jam 2007-08-20 12:52:55 EDT (Mon, 20 Aug 2007)
@@ -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,51 +18,79 @@
.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 ;
.shared-library-path-variable-AIX = LIBPATH ;
+# 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 ] ;
Modified: trunk/tools/build/v2/util/sequence.jam
==============================================================================
--- trunk/tools/build/v2/util/sequence.jam (original)
+++ trunk/tools/build/v2/util/sequence.jam 2007-08-20 12:52:55 EDT (Mon, 20 Aug 2007)
@@ -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 ;
}
}
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