2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Wholesale merge from trunk.

[SVN r54880]
This commit is contained in:
Vladimir Prus
2009-07-11 11:04:31 +00:00
parent 0ad507b5a5
commit eff20dcde4
14 changed files with 292 additions and 64 deletions

View File

@@ -1215,6 +1215,10 @@ rule find-viable-generators ( target-type : property-set )
{
viable-generators += $(g) ;
}
else
{
generators.dout [ indent ] " generator " [ $(g).id ] "is active, discaring" ;
}
}
# Generators which override 'all'.
@@ -1320,8 +1324,20 @@ local rule construct-really ( project name ? : target-type : property-set :
# 'construct' in stack, returns only targets of requested 'target-type',
# otherwise, returns also unused sources and additionally generated targets.
#
rule construct ( project name ? : target-type : property-set * : sources * )
# If 'top-level' is set, does not suppress generators that are already
# used in the stack. This may be useful in cases where a generator
# has to build a metatargets -- for example a target corresponding to
# built tool.
#
rule construct ( project name ? : target-type : property-set * : sources * : top-level ? )
{
local saved-stack ;
if $(top-level)
{
saved-active = $(.active-generators) ;
.active-generators = ;
}
if (.construct-stack)
{
ensure-type $(sources) ;
@@ -1348,11 +1364,15 @@ rule construct ( project name ? : target-type : property-set * : sources * )
decrease-indent ;
.construct-stack = $(.construct-stack[2-]) ;
if $(top-level)
{
.active-generators = $(saved-active) ;
}
return $(result) ;
}
# Given 'result', obtained from some generator or generators.construct, adds
# 'raw-properties' as usage requirements to it. If result already contains usage
# requirements -- that is the first element of result of an instance of the

View File

@@ -1434,7 +1434,7 @@ class typed-target : basic-target
local r = [ generators.construct $(self.project) $(name:S=) : $(self.type)
: [ property-set.create [ $(property-set).raw ]
<main-target-type>$(self.type) ]
: $(source-targets) ] ;
: $(source-targets) : true ] ;
if ! $(r)
{
ECHO "warn: Unable to construct" [ full-name ] ;

View File

@@ -736,6 +736,17 @@ bjam toolset=gcc variant=debug optimization=space
<entry>Cause the produced binaries to be thread-safe. This requires proper support in the source code itself.</entry>
</row>
<row>
<entry>address-model</entry>
<entry>32,64</entry>
<entry>Explicitly request either 32-bit or 64-bit code generation. This typically
requires that your compiler is appropriately configured. Please refer to
<xref linkend="bbv2.reference.tools.compilers"/> and your compiler documentation
in case of problems.</entry>
</row>
<row>
<entry>toolset</entry>
@@ -744,6 +755,22 @@ bjam toolset=gcc variant=debug optimization=space
<entry>The C++ compiler to use. See <xref linkend="bbv2.reference.tools.compilers"/> for a detailed list.</entry>
</row>
<row>
<entry>include</entry>
<entry>(Arbitrary string)</entry>
<entry>Additional include paths for C and C++ compilers.</entry>
</row>
<row>
<entry>define</entry>
<entry>(Arbitrary string)</entry>
<entry>Additional macro definitions for C and C++ compilers.</entry>
</row>
<row>
<entry>cxxflags</entry>
@@ -761,19 +788,11 @@ bjam toolset=gcc variant=debug optimization=space
</row>
<row>
<entry>includes</entry>
<entry>linkflags</entry>
<entry>(Arbitrary string)</entry>
<entry>Additional include paths for C and C++ compilers.</entry>
</row>
<row>
<entry>define</entry>
<entry>(Arbitrary string)</entry>
<entry>Additional macro definitions for C and C++ compilers.</entry>
<entry>Custom options to pass to the C++ linker.</entry>
</row>
<row>

View File

@@ -108,10 +108,6 @@ flags borland NEED_IMPLIB <main-target-type>LIB/<link>shared : "" ;
# -q no banner
# -c compile to object
# -P C++ code regardless of file extention
# -Ve zero sized empty base classes, this option is on in the IDE by default
# and effects binary compatibility.
# -Vx zero sized empty members, this option is on in the IDE by default
# and effects binary compatibility.
# -a8 8 byte alignment, this option is on in the IDE by default
# and effects binary compatibility.
#
@@ -121,13 +117,13 @@ flags borland NEED_IMPLIB <main-target-type>LIB/<link>shared : "" ;
actions compile.c++
{
"$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
"$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
}
# For C, we don't pass -P flag
actions compile.c
{
"$(CONFIG_COMMAND)" -j5 -g255 -q -c -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
"$(CONFIG_COMMAND)" -j5 -g255 -q -c -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
}

View File

@@ -30,6 +30,7 @@ import types/register ;
import utility ;
import virtual-target ;
import message ;
import convert ;
# FIXME: the following generate module import is not needed here but removing it
# too hastly will break using code (e.g. the main Boost library Jamroot file)
@@ -38,7 +39,13 @@ import generate ;
.os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd
openbsd osf qnx qnxnto sgi solaris unix unixware windows ;
openbsd osf qnx qnxnto sgi solaris unix unixware windows
elf # Not actually an OS -- used for targeting bare metal where
# object format is ELF. This catches both -elf and -eabi gcc
# targets and well as other compilers targeting ELF. It is not
# clear how often do we need to key of ELF specifically as opposed
# to other bare metal targets, but let's stick with gcc naming.
;
# Feature used to determine which OS we're on. New <target-os> and <host-os>
# features should be used instead.

View File

@@ -501,10 +501,12 @@ if "\n" = "n"
# see below.
nl = "
" ;
q = "" ;
}
else
{
nl = "\n" ;
q = "\"" ;
}
# Returns the command needed to set an environment variable on the current
@@ -526,7 +528,7 @@ rule variable-setting-command ( variable : value )
# sequence that messes up the executed export command which then reports
# that the passed variable name is incorrect.
# But we have a check for cygwin in kernel/bootstrap.jam already.
return "$(variable)=$(value)$(nl)export $(variable)$(nl)" ;
return "$(variable)=$(q)$(value)$(q)$(nl)export $(variable)$(nl)" ;
}
}
@@ -751,37 +753,42 @@ actions hard-link
#
rule format-name ( format * : name : type ? : property-set )
{
if [ type.is-derived $(type) LIB ]
local result = "" ;
for local f in $(format)
{
local result = "" ;
for local f in $(format)
switch $(f:G)
{
switch $(f:G)
{
case <base> :
case <base> :
result += $(name:B) ;
case <toolset> :
case <toolset> :
result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) :
$(property-set) ] ] ;
case <threading> :
$(property-set) ] ] ;
case <threading> :
result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type)
: $(property-set) ] ] ;
case <runtime> :
: $(property-set) ] ] ;
case <runtime> :
result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) :
$(property-set) ] ] ;
$(property-set) ] ] ;
case <qt> :
result += [ join-tag $(f:G=) : [ qt-tag $(name) : $(type) :
$(property-set) ] ] ;
case <version:*> :
case <address-model> :
result += [ join-tag $(f:G=) : [ address-model-tag $(name) : $(type) :
$(property-set) ] ] ;
case <version:*> :
local key = [ MATCH <version:(.*)> : $(f:G) ] ;
local version = [ $(property-set).get <$(key)> ] ;
version ?= $(key) ;
version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ]
;
version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ] ;
result += [ join-tag $(f:G=) : $(version[1])_$(version[2]) ] ;
case <property:*> :
case <property:*> :
local key = [ MATCH <property:(.*)> : $(f:G) ] ;
local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ;
if $(p0)
@@ -793,14 +800,13 @@ rule format-name ( format * : name : type ? : property-set )
}
}
case * :
case * :
result += $(f:G=) ;
}
}
result = [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) :
$(property-set) ] ;
return $(result) ;
}
result = [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) :
$(property-set) ] ;
return $(result) ;
}
@@ -846,6 +852,7 @@ local rule toolset-tag ( name : type ? : property-set )
#case mingw* : tag += mgw ;
case mipspro* : tag += mp ;
case msvc* : tag += vc ;
case qcc* : tag += qcc ;
case sun* : tag += sw ;
case tru64cxx* : tag += tru ;
case vacpp* : tag += xlc ;
@@ -922,6 +929,25 @@ local rule runtime-tag ( name : type ? : property-set )
return $(tag:J=) ;
}
# Create a tag for the Qt library version
# "<qt>4.6.0" will result in tag "qt460"
local rule qt-tag ( name : type ? : property-set )
{
local properties = [ $(property-set).get <qt> ] ;
local version = [ MATCH "([0123456789]+)[.]?([0123456789]*)[.]?([0123456789]*)"
: $(properties) ] ;
local tag = "qt"$(version:J=) ;
return $(tag) ;
}
# Create a tag for the address-model
# <address-model>64 will simply generate "64"
local rule address-model-tag ( name : type ? : property-set )
{
local tag = ;
local version = [ $(property-set).get <address-model> ] ;
return $(version) ;
}
rule __test__ ( )
{

62
v2/tools/convert.jam Normal file
View File

@@ -0,0 +1,62 @@
# Copyright (c) 2009 Vladimir Prus
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
# Implements 'convert' target that takes a bunch of source and
# tries to convert each one to the specified type.
#
# For example:
#
# convert objects obj : a.cpp b.cpp ;
#
import targets ;
import generators ;
import project ;
import type ;
import "class" : new ;
class convert-target-class : typed-target
{
rule __init__ ( name : project : type
: sources * : requirements * : default-build * : usage-requirements * )
{
typed-target.__init__ $(name) : $(project) : $(type)
: $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ;
}
rule construct ( name : source-targets * : property-set )
{
local r = [ generators.construct $(self.project) : $(self.type)
: [ property-set.create [ $(property-set).raw ] # [ feature.expand
<main-target-type>$(self.type) ]
# ]
: $(source-targets) ] ;
if ! $(r)
{
errors.error "unable to construct" [ full-name ] ;
}
return $(r) ;
}
}
rule convert ( name type : sources * : requirements * : default-build *
: usage-requirements * )
{
local project = [ project.current ] ;
# This is a circular module dependency, so it must be imported here
modules.import targets ;
targets.main-target-alternative
[ new convert-target-class $(name) : $(project) : [ type.type-from-rule-name $(type) ]
: [ targets.main-target-sources $(sources) : $(name) ]
: [ targets.main-target-requirements $(requirements) : $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
: [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ]
] ;
}
IMPORT $(__name__) : convert : : convert ;

View File

@@ -349,6 +349,40 @@ rule setup-fpic ( targets * : sources * : properties * )
}
}
rule setup-address-model ( targets * : sources * : properties * )
{
local model = [ feature.get-values address-model : $(properties) ] ;
if $(model)
{
local option ;
local os = [ feature.get-values target-os : $(properties) ] ;
if $(os) = aix
{
if $(model) = 32
{
option = -maix32 ;
}
else
{
option = -maix64 ;
}
}
else
{
if $(model) = 32
{
option = -m32 ;
}
else
{
option = -m64 ;
}
}
OPTIONS on $(targets) += $(option) ;
}
}
# FIXME: this should not use os.name.
if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX && [ os.name ] != AIX
{
@@ -369,6 +403,7 @@ rule compile.c++.pch ( targets * : sources * : properties * )
{
setup-threading $(targets) : $(sources) : $(properties) ;
setup-fpic $(targets) : $(sources) : $(properties) ;
setup-address-model $(targets) : $(sources) : $(properties) ;
}
actions compile.c++.pch
@@ -380,6 +415,7 @@ rule compile.c.pch ( targets * : sources * : properties * )
{
setup-threading $(targets) : $(sources) : $(properties) ;
setup-fpic $(targets) : $(sources) : $(properties) ;
setup-address-model $(targets) : $(sources) : $(properties) ;
}
actions compile.c.pch
@@ -391,6 +427,7 @@ rule compile.c++ ( targets * : sources * : properties * )
{
setup-threading $(targets) : $(sources) : $(properties) ;
setup-fpic $(targets) : $(sources) : $(properties) ;
setup-address-model $(targets) : $(sources) : $(properties) ;
# Some extensions are compiled as C++ by default. For others, we need to
# pass -x c++. We could always pass -x c++ but distcc does not work with it.
@@ -420,6 +457,7 @@ rule compile.c ( targets * : sources * : properties * )
{
setup-threading $(targets) : $(sources) : $(properties) ;
setup-fpic $(targets) : $(sources) : $(properties) ;
setup-address-model $(targets) : $(sources) : $(properties) ;
# If we use the name g++ then default file suffix -> language mapping does
# not work. So have to pass -x option. Maybe, we can work around this by
@@ -542,6 +580,28 @@ generators.register
generators.override gcc.mingw.link : gcc.link ;
generators.override gcc.mingw.link.dll : gcc.link.dll ;
# Cygwin is similar to msvc and mingw in that it uses import libraries.
# While in simple cases, it can directly link to a shared library,
# it is believed to be slower, and not always possible. Define cygwin-specific
# generators here.
g = [ new gcc-linking-generator gcc.cygwin.link
: OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
: EXE
: <toolset>gcc <target-os>cygwin ] ;
$(g).set-rule-name gcc.link ;
generators.register $(g) ;
g = [ new gcc-linking-generator gcc.cygwin.link.dll
: OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
: IMPORT_LIB SHARED_LIB
: <toolset>gcc <target-os>cygwin ] ;
$(g).set-rule-name gcc.link.dll ;
generators.register $(g) ;
generators.override gcc.cygwin.link : gcc.link ;
generators.override gcc.cygwin.link.dll : gcc.link.dll ;
# Declare flags for linking.
# First, the common flags.
toolset.flags gcc.link OPTIONS <debug-symbols>on : -g ;
@@ -553,6 +613,7 @@ toolset.flags gcc.link FINDLIBS-SA <find-shared-library> ;
toolset.flags gcc.link LIBRARIES <library-file> ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>cygwin : "-Wl,--out-implib," ;
# For <runtime-link>static we made sure there are no dynamic libraries in the
# link. On HP-UX not all system libraries exist as archived libraries (for
@@ -722,6 +783,7 @@ rule init-link-flags ( toolset linker condition )
rule link ( targets * : sources * : properties * )
{
setup-threading $(targets) : $(sources) : $(properties) ;
setup-address-model $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
# Serialize execution of the 'link' action, since running N links in
# parallel is just slower. For now, serialize only gcc links, it might be a
@@ -786,6 +848,7 @@ actions piecemeal archive
rule link.dll ( targets * : sources * : properties * )
{
setup-threading $(targets) : $(sources) : $(properties) ;
setup-address-model $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}
@@ -873,8 +936,6 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + : val
# Set architecture/instruction-set options.
#
# x86 and compatible
toolset.flags gcc OPTIONS <architecture>x86/<address-model>32 : -m32 ;
toolset.flags gcc OPTIONS <architecture>x86/<address-model>64 : -m64 ;
cpu-flags gcc OPTIONS : x86 : i386 : -march=i386 : default ;
cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
@@ -908,8 +969,6 @@ cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
# Sparc
toolset.flags gcc OPTIONS <architecture>sparc/<address-model>32 : -m32 ;
toolset.flags gcc OPTIONS <architecture>sparc/<address-model>64 : -m64 ;
cpu-flags gcc OPTIONS : sparc : c3 : -mcpu=c3 : default ;
cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 ;
cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
@@ -926,8 +985,6 @@ cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
# RS/6000 & PowerPC
toolset.flags gcc OPTIONS <architecture>power/<address-model>32 : -m32 ;
toolset.flags gcc OPTIONS <architecture>power/<address-model>64 : -m64 ;
cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;
cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ;
@@ -961,6 +1018,4 @@ cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ;
cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ;
cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
# AIX variant of RS/6000 & PowerPC
toolset.flags gcc OPTIONS <architecture>power/<address-model>32/<target-os>aix : -maix32 ;
toolset.flags gcc OPTIONS <architecture>power/<address-model>64/<target-os>aix : -maix64 ;
toolset.flags gcc AROPTIONS <architecture>power/<address-model>64/<target-os>aix : "-X 64" ;
toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X 64" ;

View File

@@ -112,6 +112,7 @@ rule compile.c++ ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}
@@ -124,6 +125,7 @@ rule compile.c ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}
@@ -136,6 +138,7 @@ rule compile.c++.pch ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
}
#
# Compiling a pch first deletes any existing *.pchi file, as Intel's compiler
@@ -151,6 +154,7 @@ rule compile.c.pch ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
}
actions compile.c.pch
@@ -161,6 +165,7 @@ actions compile.c.pch
rule link ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}
@@ -173,6 +178,7 @@ actions link bind LIBRARIES
rule link.dll ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}

View File

@@ -254,6 +254,11 @@ rule configure-version-specific ( toolset : version : conditions )
# 8.0 and above only has multi-threaded static RTL.
toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>off/<runtime-link>static/<threading>single : /MT ;
toolset.flags $(toolset).compile CFLAGS $(conditions)/<runtime-debugging>on/<runtime-link>static/<threading>single : /MTd ;
# Specify target machine type so the linker will not need to guess.
toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-amd64) : /MACHINE:X64 ;
toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-i386) : /MACHINE:X86 ;
toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-ia64) : /MACHINE:IA64 ;
}
toolset.pop-checking-for-flags-module ;
}
@@ -677,11 +682,15 @@ local rule configure-really ( version ? : options * )
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
if [ MATCH "(Microsoft Visual Studio 9)" : $(command) ]
if [ MATCH "(Microsoft Visual Studio 10)" : $(command) ]
{
version = 10.0 ;
}
else if [ MATCH "(Microsoft Visual Studio 9)" : $(command) ]
{
version = 9.0 ;
}
if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ]
else if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ]
{
version = 8.0 ;
}
@@ -729,7 +738,10 @@ local rule configure-really ( version ? : options * )
# MSVC 7.1 compiler even though it thinks it is using the msvc-9.0
# toolset version.
command = [ common.get-absolute-tool-path $(command[-1]) ] ;
}
if $(command)
{
local parent = [ path.make $(command) ] ;
parent = [ path.parent $(parent) ] ;
parent = [ path.native $(parent) ] ;
@@ -1263,7 +1275,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
# Known toolset versions, in order of preference.
.known-versions = 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
.known-versions = 10.0 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
# Version aliases.
.version-alias-6 = 6.0 ;
@@ -1271,6 +1283,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-alias-7 = 7.0 ;
.version-alias-8 = 8.0 ;
.version-alias-9 = 9.0 ;
.version-alias-10 = 10.0 ;
# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
@@ -1281,6 +1294,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-8.0express-reg = "VCExpress\\8.0\\Setup\\VC" ;
.version-9.0-reg = "VisualStudio\\9.0\\Setup\\VC" ;
.version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ;
.version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation

View File

@@ -83,8 +83,26 @@ rule install ( name : requirements * : binaries * : libraries * : headers * )
stage.install $(name)-bin : $(binaries) : $(requirements)
<location>$(bin-locate) ;
stage.install $(name)-lib : $(binaries) $(libraries) : $(requirements)
<location>$(lib-locate) <install-dependencies>on <install-type>LIB ;
alias $(name)-lib : $(name)-lib-shared $(name)-lib-static ;
# Since the install location of shared libraries differs on universe
# and cygwin, use target alternatives to make different targets.
# We should have used indirection conditioanl requirements, but it's
# awkward to pass bin-locate and lib-locate from there to another rule.
alias $(name)-lib-shared : $(name)-lib-shared-universe ;
alias $(name)-lib-shared : $(name)-lib-shared-cygwin : <target-os>cygwin ;
# For shared libraries, we install both explicitly specified one and the
# shared libraries that the installed executables depend on.
stage.install $(name)-lib-shared-universe : $(binaries) $(libraries) : $(requirements)
<location>$(lib-locate) <install-dependencies>on <install-type>SHARED_LIB ;
stage.install $(name)-lib-shared-cygwin : $(binaries) $(libraries) : $(requirements)
<location>$(bin-locate) <install-dependencies>on <install-type>SHARED_LIB ;
# For static libraries, we do not care about executable dependencies, since
# static libraries are already incorporated into them.
stage.install $(name)-lib-static : $(libraries) : $(requirements)
<location>$(lib-locate) <install-dependencies>on <install-type>STATIC_LIB ;
stage.install $(name)-headers : $(headers) : $(requirements)
<location>$(include-locate)$(install-header-subdir)
<install-source-root>$(install-source-root) ;
@@ -94,6 +112,7 @@ rule install ( name : requirements * : binaries * : libraries * : headers * )
local project-module = [ $(c).project-module ] ;
module $(project-module)
{
explicit $(1)-bin $(1)-lib $(1)-headers $(1) ;
explicit $(1)-bin $(1)-lib $(1)-headers $(1) $(1)-lib-shared $(1)-lib-static
$(1)-lib-shared-universe $(1)-lib-shared-cygwin ;
}
}

View File

@@ -91,8 +91,8 @@ feature.feature pythonpath : : free optional path ;
#
# Example usage:
#
# using python 2.3 ;
# using python 2.3 : /usr/local/bin/python ;
# using python : 2.3 ;
# using python : 2.3 : /usr/local/bin/python ;
#
rule init ( version ? : cmd-or-prefix ? : includes * : libraries ?
: condition * : extension-suffix ? )

View File

@@ -52,6 +52,10 @@ flags sun.compile OPTIONS <profiling>on : -xprofile=tcov ;
flags sun.compile OPTIONS <optimization>speed : -xO4 ;
flags sun.compile OPTIONS <optimization>space : -xO2 -xspace ;
flags sun.compile OPTIONS <threading>multi : -mt ;
flags sun.compile OPTIONS <warnings>off : -erroff ;
flags sun.compile OPTIONS <warnings>on : -erroff=%none ;
flags sun.compile OPTIONS <warnings>all : -erroff=%none ;
flags sun.compile OPTIONS <warnings-as-errors>on : -errwarn ;
flags sun.compile.c++ OPTIONS <inlining>off : +d ;

View File

@@ -9,7 +9,7 @@ type.register LIB ;
type.set-generated-target-prefix LIB : : "lib" ;
type.set-generated-target-prefix LIB : <target-os>windows : "" ;
type.set-generated-target-prefix LIB : <target-os>cygwin : "" ;
type.set-generated-target-prefix LIB : <target-os>cygwin : "cyg" ;
# FIXME: should not register both extensions on both
# platforms.