mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Fix a few problems with common naming:
* Move toolset requirements code from toolsets plus common-variant-tag into a separate toolset::requirements. This fixes inconsistency problems with libraries that have names that don't match the real content. * Remove custom stlport code in msvc-strport toolset and use common stlport.jam. This normalizes the settings and requirements for stlport builds. Also added support for removing the version related info, tolset and version tag, to support --layout=system install option. [SVN r24427]
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
#~ Copyright 2002-2004 Rene Rivera.
|
||||
#~ Copyright 2001-2004 David Abrahams.
|
||||
#~ Distributed under the Boost Software License, Version 1.0.
|
||||
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# (C) Copyright David Abrahams and Carlos Pinto Coelho 2001. Permission to
|
||||
# copy, use, modify, sell and distribute this software is granted provided this
|
||||
# copyright notice appears in all copies. This software is provided "as is"
|
||||
@@ -1377,7 +1382,7 @@ rule declare-basic-target ( target-id : sources * : requirements * : default-bui
|
||||
# type, and the corresponding <target-type> property.
|
||||
#
|
||||
gTARGET_REQUIREMENTS($(target-id))
|
||||
= $(requirements) $(gTARGET_TYPE_REQUIREMENTS($(target-type))) ;
|
||||
= toolset::requirements $(requirements) $(gTARGET_TYPE_REQUIREMENTS($(target-type))) ;
|
||||
if ! $(gNO_TARGET_TYPE_REQUIREMENT($(target-type)))
|
||||
{
|
||||
gTARGET_REQUIREMENTS($(target-id)) += <target-type>$(target-type) ;
|
||||
@@ -2575,69 +2580,43 @@ rule common-variant-tag ( toolset variant : properties * )
|
||||
if <stlport-iostream>off in $(properties) { runtime-tag += n ; }
|
||||
|
||||
local toolset-tag = ;
|
||||
switch $(toolset)
|
||||
if ! $(gUNVERSIONED_VARIANT_TAG)
|
||||
{
|
||||
case *borland* : toolset-tag += bcb ;
|
||||
case *como* : toolset-tag += como ;
|
||||
case *cwpro8* :
|
||||
switch $(toolset)
|
||||
{
|
||||
toolset-tag += cw8 ;
|
||||
if <runtime-link>dynamic in $(properties) { thread-tag = mt ; }
|
||||
case borland* : toolset-tag += bcb ;
|
||||
case como* : toolset-tag += como ;
|
||||
case cwpro8* : toolset-tag += cw 8 ;
|
||||
case cwpro9* : toolset-tag += cw 9 ;
|
||||
case darwin* : toolset-tag += ;
|
||||
case edg* : toolset-tag += edg ;
|
||||
case gcc* : toolset-tag += gcc ;
|
||||
case intel-linux* : toolset-tag += il ;
|
||||
case intel-win32* : toolset-tag += iw ;
|
||||
case kcc* : toolset-tag += kcc ;
|
||||
case kylix* : toolset-tag += bck ;
|
||||
case metrowerks* : toolset-tag += cw ;
|
||||
case mingw* : toolset-tag += mgw ;
|
||||
case mipspro* : toolset-tag += mp ;
|
||||
case msvc* : toolset-tag += vc 6 ;
|
||||
case sunpro* : toolset-tag += sw ;
|
||||
case tru64cxx* : toolset-tag += tru ;
|
||||
case vacpp* : toolset-tag += xlc ;
|
||||
case vc[678]* : toolset-tag += [ MATCH "vc([678])[.]([0123456789]*)" : $(toolset) ] ;
|
||||
case * :
|
||||
toolset-tag += [ MATCH "^([^-]*)" : $(toolset) ] ;
|
||||
}
|
||||
case *cwpro9* :
|
||||
{
|
||||
toolset-tag += cw9 ;
|
||||
if <runtime-link>dynamic in $(properties) { thread-tag = mt ; }
|
||||
}
|
||||
case *darwin* : toolset-tag += ;
|
||||
case *edg* : toolset-tag += edg ;
|
||||
case *gcc* : toolset-tag += gcc ;
|
||||
case *intel-linux* : toolset-tag += il ;
|
||||
case *intel-win32* :
|
||||
{
|
||||
toolset-tag += iw ;
|
||||
if <runtime-link>dynamic in $(properties) { thread-tag = mt ; }
|
||||
}
|
||||
case *kcc* : toolset-tag += kcc ;
|
||||
case *kylix* : toolset-tag += bck ;
|
||||
case *metrowerks* : toolset-tag += cw ;
|
||||
case *mingw* : toolset-tag += mgw ;
|
||||
case *mipspro* : toolset-tag += mp ;
|
||||
case *msvc* :
|
||||
{
|
||||
toolset-tag += vc6 ;
|
||||
if <runtime-link>dynamic in $(properties) { thread-tag = mt ; }
|
||||
}
|
||||
case *sunpro* : toolset-tag += sw ;
|
||||
case *tru64cxx* : toolset-tag += tru ;
|
||||
case *vacpp* : toolset-tag += xlc ;
|
||||
case *vc7* :
|
||||
{
|
||||
toolset-tag += vc7 ;
|
||||
toolset-tag += [ MATCH "vc7[.]([0123456789]*)" : $(toolset) ] ;
|
||||
if <runtime-link>dynamic in $(properties) { thread-tag = mt ; }
|
||||
# <stlport-iostream> is always on, no matter what we may think
|
||||
# this is an stlport build requirement.
|
||||
runtime-tag = [ difference $(runtime-tag) : n ] ;
|
||||
}
|
||||
case *vc8* :
|
||||
{
|
||||
toolset-tag += vc8 ;
|
||||
toolset-tag += [ MATCH "vc8[.]([0123456789]*)" : $(toolset) ] ;
|
||||
if <runtime-link>dynamic in $(properties) { thread-tag = mt ; }
|
||||
# <stlport-iostream> is always on, no matter what we may think
|
||||
# this is an stlport build requirement.
|
||||
runtime-tag = [ difference $(runtime-tag) : n ] ;
|
||||
}
|
||||
case * :
|
||||
toolset-tag += [ MATCH "^([^-]*)" : $(toolset) ] ;
|
||||
toolset-tag += [ MATCH "[-]([0123456789]+).([0123456789]*)" : $(toolset) ] ;
|
||||
}
|
||||
toolset-tag += [ MATCH "[-]([0123456789]+).([0123456789]*)" : $(toolset) ] ;
|
||||
|
||||
local version-number = [ get-values <version> : $(properties) ] ;
|
||||
version-number ?= $(BOOST_VERSION) ;
|
||||
local version-tag = [ MATCH "^([^.]+).([^.]+)" : $(version-number[1]) ] ;
|
||||
version-tag = $(version-tag:J="_") ;
|
||||
local version-tag = ;
|
||||
if ! $(gUNVERSIONED_VARIANT_TAG)
|
||||
{
|
||||
local version-number = [ get-values <version> : $(properties) ] ;
|
||||
version-number ?= $(BOOST_VERSION) ;
|
||||
version-tag = [ MATCH "^([^.]+).([^.]+)" : $(version-number[1]) ] ;
|
||||
version-tag = $(version-tag:J="_") ;
|
||||
}
|
||||
|
||||
tags += $(toolset-tag:J=) ;
|
||||
tags += $(thread-tag:J=) ;
|
||||
@@ -2822,3 +2801,74 @@ rule common-stage-tag ( toolset variant : subvariant-path properties * )
|
||||
{
|
||||
return [ common-variant-tag $(toolset) $(variant) : $(subvariant-path) $(properties) ] ;
|
||||
}
|
||||
|
||||
# Enforces toolset level requirements. This is added to all targets.
|
||||
rule toolset::requirements ( toolset variant : subvariant-path properties * )
|
||||
{
|
||||
local requirements = ;
|
||||
switch $(toolset)
|
||||
{
|
||||
case cwpro8* :
|
||||
{
|
||||
# dynamic runtime only comes in the multi-threading flavor
|
||||
if <runtime-link>dynamic in $(properties) { requirements += <threading>multi ; }
|
||||
}
|
||||
case cwpro9* :
|
||||
{
|
||||
# dynamic runtime only comes in the multi-threading flavor
|
||||
if <runtime-link>dynamic in $(properties) { requirements += <threading>multi ; }
|
||||
}
|
||||
case cw* :
|
||||
{
|
||||
# dynamic runtime only comes in the multi-threading flavor
|
||||
if <runtime-link>dynamic in $(properties) { requirements += <threading>multi ; }
|
||||
}
|
||||
case msvc* :
|
||||
{
|
||||
# dynamic runtime only comes in the multi-threading flavor
|
||||
if <runtime-link>dynamic in $(properties) { requirements += <threading>multi ; }
|
||||
if [ MATCH .*(stlport).* : $(toolset) ] ||
|
||||
[ MATCH .*(stlport).* : $(properties:G) ]
|
||||
{
|
||||
# STLPort doesn't have any single-threaded builds, so we're going
|
||||
# to force all such targets to be built with multithread support.
|
||||
# This is essentially a usage-requirement on the stlport library.
|
||||
requirements += <threading>multi ;
|
||||
}
|
||||
}
|
||||
case vc* :
|
||||
{
|
||||
# dynamic runtime only comes in the multi-threading flavor
|
||||
if <runtime-link>dynamic in $(properties) { requirements += <threading>multi ; }
|
||||
if [ MATCH .*(stlport).* : $(toolset) ] ||
|
||||
[ MATCH .*(stlport).* : $(properties:G) ]
|
||||
{
|
||||
# STLPort doesn't have any single-threaded builds, so we're going
|
||||
# to force all such targets to be built with multithread support.
|
||||
# This is essentially a usage-requirement on the stlport library.
|
||||
requirements += <threading>multi ;
|
||||
# STLPort doesn't support <stlport-iostream>off with vc7 and vc8.
|
||||
# This is essentially a usage-requirement on the stlport library.
|
||||
switch $(toolset)
|
||||
{
|
||||
case vc7* : requirements += <stlport-iostream>on ;
|
||||
case vc8* : requirements += <stlport-iostream>on ;
|
||||
case vc-7* : requirements += <stlport-iostream>on ;
|
||||
case vc-8* : requirements += <stlport-iostream>on ;
|
||||
}
|
||||
}
|
||||
}
|
||||
case intel-win32* :
|
||||
{
|
||||
# dynamic runtime only comes in the multi-threading flavor
|
||||
if <runtime-link>dynamic in $(properties) { requirements += <threading>multi ; }
|
||||
}
|
||||
}
|
||||
requirements = [ unique $(requirements) ] ;
|
||||
properties =
|
||||
[ sort
|
||||
[ difference $(properties) : [ get-properties $(requirements:G) : $(properties) ] ]
|
||||
$(requirements)
|
||||
] ;
|
||||
return $(subvariant-path) $(properties) ;
|
||||
}
|
||||
|
||||
12
v1/cw-8.3-tools.jam
Normal file
12
v1/cw-8.3-tools.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
#~ Copyright 2004 Rene Rivera.
|
||||
#~ Distributed under the Boost Software License, Version 1.0.
|
||||
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# The following #// line will be used by the regression test table generation
|
||||
# program as the column heading for HTML tables. Must not include version number.
|
||||
#//<a href="http://www.metrowerks.com/MW/Develop/Desktop/default.htm">Metrowerks<br>CodeWarrior</a>
|
||||
|
||||
{
|
||||
local CW_VERSION = 8.0 ;
|
||||
extends-toolset cw ;
|
||||
}
|
||||
@@ -1,132 +1,19 @@
|
||||
#
|
||||
# This is msvc-stlport-tools.jam. It adds support for STLport used with
|
||||
# the msvc toolset.
|
||||
#
|
||||
# Written by Markus Schöpflin.
|
||||
# Originally based on "gcc-stlport-tools.jam", copyrighted by David
|
||||
# Abrahams and Carlos Pinto Coelho 2001.
|
||||
#
|
||||
# To use it, you have to:
|
||||
#
|
||||
# 1. specify msvc-stlport as the tool name, for example by placing
|
||||
# TOOLS = msvc-stlport ;
|
||||
# in your jam rules file.
|
||||
#
|
||||
# 2a. Set STLPORT_PATH to point to the directory _above_ the STLport
|
||||
# directory. This assumes that you didn't rename the STLport folder
|
||||
# and allows for automatic selection of multiple STLport versions.
|
||||
#
|
||||
# and / or
|
||||
#
|
||||
# 2b. For STLPort version X.Y, set STLPORT_X.Y_PATH to the STLport
|
||||
# directory for each STLport version you are going to use.
|
||||
# This also overrides any setting of STLPORT_PATH for this version.
|
||||
#
|
||||
# NOTE: For msvc, the link libs are pulled in by the STLport header files
|
||||
# automatically; there's no need to specify them manually.
|
||||
#
|
||||
# Copyright 2004 Rene Rivera.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# The following #// line will be used by the regression test table generation
|
||||
# program as the column heading for HTML tables. Must not include version number.
|
||||
#//<a href="http://msdn.microsoft.com/vstudio/default.asp">Micro-<br>soft<br>VC++</a><br><a href="http://www.stlport.org/">STLport</a>
|
||||
|
||||
{
|
||||
# This is simply an extension to the msvc toolset. However,
|
||||
# STLPort doesn't have any single-threaded builds, so we're going
|
||||
# to force all such targets to be built with multithread support.
|
||||
# This is essentially a usage-requirement on the stlport library.
|
||||
local gBUILD_PROPERTIES = [ difference $(gBUILD_PROPERTIES) : <threading>single ] <threading>multi ;
|
||||
extends-toolset msvc ;
|
||||
}
|
||||
extends-toolset msvc ;
|
||||
|
||||
CURR_TOOLSET = msvc-stlport ;
|
||||
STLPORT_LIB_BASE_NAME = stlport_vc60 ;
|
||||
|
||||
MSVC_STDHDRS = $(STDHDRS) ;
|
||||
MSVC_STDLIBPATH = $(STDLIBPATH) ;
|
||||
# bring in the STLPort configuration
|
||||
SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ;
|
||||
include stlport.jam ;
|
||||
|
||||
STDHDRS = ;
|
||||
STDLIBPATH = ;
|
||||
|
||||
# STLport iostreams or native iostreams
|
||||
feature stlport-iostream : on off ;
|
||||
|
||||
STLPORT_VERSION ?= 4.5.3 ;
|
||||
STLPORT_VERSIONS ?= 4.6 4.5 4.0 ;
|
||||
# major versions of STLport
|
||||
feature stlport-version : $(STLPORT_VERSION) $(STLPORT_VERSIONS) ;
|
||||
|
||||
feature stlport-cstd-namespace : std global ;
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Returns a path which is assumed to be the root of the STLport installation.
|
||||
#
|
||||
# The result depends on the current version X.Y of STLport.
|
||||
# 1. If global STLPORT_<X.Y>_PATH is set, return it.
|
||||
# 2. If global STLPORT_PATH is set, return $(STLPORT_PATH)/STLport-<X.Y>
|
||||
#
|
||||
rule get-stlport-root
|
||||
{
|
||||
local version ;
|
||||
version = [ get-values <stlport-version> : $(gBUILD_PROPERTIES) ] ;
|
||||
version ?= $(STLPORT_VERSION) ;
|
||||
|
||||
local path ;
|
||||
path ?= $(STLPORT_$(version)_PATH) ;
|
||||
path ?= $(STLPORT_PATH)$(SLASH)STLport-$(version) ;
|
||||
|
||||
if $(version) && ! $(path)
|
||||
{
|
||||
local dollar = "$" ;
|
||||
ECHO **** No STLPORT_PATH configured. *** ;
|
||||
ECHO To configure STLPort for use with the msvc-stlport toolset, the following variables can be set: ;
|
||||
ECHO ;
|
||||
ECHO STLPORT_PATH - A directory containing at least one subdirectory of the form /STLPort-<version> ;
|
||||
ECHO " where STLPort installations can be found." ;
|
||||
ECHO ;
|
||||
ECHO STLPORT_<version>_PATH - The directory where the specific STLPort <version> installation can be ;
|
||||
ECHO " found, in case there is no central location appropriate for STLPORT_PATH, above, or a" ;
|
||||
ECHO " particular version's installation is not located in the usual place." ;
|
||||
ECHO ;
|
||||
ECHO STLPORT_VERSION - The version of STLPort in use by default. Defaults to \"4.5.3\". Other ;
|
||||
ECHO " values can be selected in parallel setting the build property <stlport-version> to" ;
|
||||
ECHO " values from the list of $(dollar)(STLPORT_VERSIONS)" ;
|
||||
ECHO ;
|
||||
ECHO STLPORT_VERSIONS - Alternate versions of STLport available on this machine. Defaults to \"4.5 4.0\". ;
|
||||
ECHO ;
|
||||
ECHO "Note that STLPort iostreams are /not/ in use by default. To enable them, you must place" ;
|
||||
ECHO " <stlport-iostream>on in your BUILD variable or in target requirements." ;
|
||||
EXIT ;
|
||||
}
|
||||
|
||||
return $(path) ;
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
|
||||
# flags which work for any STLport version
|
||||
|
||||
flags msvc-stlport STDHDRS : [ join [ get-stlport-root ] $(SLASH)stlport ] ;
|
||||
flags msvc-stlport VC_STDLIB_PATH <stlport-iostream>on : [ join [ get-stlport-root ] $(SLASH)lib ] ;
|
||||
flags msvc-stlport STDLIBPATH <stlport-iostream>on : [ join [ get-stlport-root ] $(SLASH)lib ] ;
|
||||
|
||||
|
||||
flags msvc-stlport THIS_FLAG_IS_UNUSED_BUT_ENSURES_TAG_ISNT_IGNORED <stlport-version> : ;
|
||||
|
||||
# special flags for STLport 4.0
|
||||
{
|
||||
local stl = _STLP ;
|
||||
if <stlport-version>4.0 in $(gBUILD_PROPERTIES)
|
||||
{
|
||||
stl = __STL ;
|
||||
}
|
||||
|
||||
flags msvc-stlport DEFINES <stlport-iostream>off : $(stl)_NO_SGI_IOSTREAMS=1 ;
|
||||
flags msvc-stlport DEFINES <stlport-cstd-namespace>std : $(stl)_DO_IMPORT_CSTD_FUNCTIONS=1 ;
|
||||
flags msvc-stlport DEFINES <runtime-build>debug : $(stl)_DEBUG=1 $(stl)_DEBUG_UNINITIALIZED=1 ;
|
||||
}
|
||||
|
||||
# Append the old values for STDHDRS and STDLIBPATH
|
||||
|
||||
flags msvc-stlport STDHDRS : $(MSVC_STDHDRS) ;
|
||||
flags msvc-stlport STDLIBPATH : $(MSVC_STDLIBPATH) ;
|
||||
flags msvc-stlport VC_STDLIB_PATH <stlport-iostream>on : [ join [ get-stlport-root ] $(SLASH)$(STLPORT_LIB_DIRECTORY) ] ;
|
||||
#~ flags msvc-stlport THIS_FLAG_IS_UNUSED_BUT_ENSURES_TAG_ISNT_IGNORED <stlport-version> : ;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
# This is simply an extension to the msvc-stlport toolset. However,
|
||||
# STLPort doesn't support <stlport-iostream>off with vc7.
|
||||
# This is essentially a usage-requirement on the stlport library.
|
||||
local gBUILD_PROPERTIES = [ difference $(gBUILD_PROPERTIES) : <stlport-iostream>off ] <stlport-iostream>on ;
|
||||
STLPORT_VERSION ?= 4.6 ;
|
||||
extends-toolset msvc-stlport ;
|
||||
}
|
||||
extends-toolset msvc-stlport ;
|
||||
|
||||
CURR_TOOLSET = vc7-stlport ;
|
||||
STLPORT_LIB_BASE_NAME = stlport_vc70 ;
|
||||
|
||||
# bring in the STLPort configuration
|
||||
SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ;
|
||||
include stlport.jam ;
|
||||
|
||||
# singleton variables...
|
||||
set-as-singleton VC7_ROOT ;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
# This is simply an extension to the msvc-stlport toolset. However,
|
||||
# STLPort doesn't support <stlport-iostream>off with vc7.
|
||||
# This is essentially a usage-requirement on the stlport library.
|
||||
local gBUILD_PROPERTIES = [ difference $(gBUILD_PROPERTIES) : <stlport-iostream>off ] <stlport-iostream>on ;
|
||||
STLPORT_VERSION ?= 4.6 ;
|
||||
extends-toolset msvc-stlport ;
|
||||
}
|
||||
extends-toolset msvc ;
|
||||
|
||||
CURR_TOOLSET = vc-7.1-stlport ;
|
||||
STLPORT_LIB_BASE_NAME = stlport_vc71 ;
|
||||
|
||||
# bring in the STLPort configuration
|
||||
SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ;
|
||||
include stlport.jam ;
|
||||
|
||||
# singleton variables...
|
||||
set-as-singleton VC71_ROOT ;
|
||||
@@ -22,12 +21,10 @@ VC_PDB_NAME = vc71 ;
|
||||
|
||||
feature native-wchar_t : off on ;
|
||||
|
||||
flags vc7.1 CFLAGS : /Op ;
|
||||
flags vc7.1 C++FLAGS : /Zc:forScope ;
|
||||
flags vc7.1 C++FLAGS <native-wchar_t>on : /Zc:wchar_t ;
|
||||
flags vc-7.1-stlport CFLAGS : /Op ;
|
||||
flags vc-7.1-stlport C++FLAGS : /Zc:forScope ;
|
||||
flags vc-7.1-stlport C++FLAGS <native-wchar_t>on : /Zc:wchar_t ;
|
||||
|
||||
# The following #// line will be used by the regression test table generation
|
||||
# program as the column heading for HTML tables. Must not include version number.
|
||||
#//<a href="http://msdn.microsoft.com/vstudio/default.asp">Micro-<br>soft<br>VC++</a><br><a href="http://www.stlport.org/">STLport</a>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user