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

Add stlport support.

[SVN r17068]
This commit is contained in:
Vladimir Prus
2003-01-28 15:59:23 +00:00
parent 202f647001
commit b7ac8d527c
2 changed files with 86 additions and 6 deletions

View File

@@ -733,7 +733,10 @@ rule split ( property-set )
# Appends a rule to the list of rules assigned to the given feature or property.
# That rules will be used in extending property sets by the 'run-actions' rule.
# The rule should accept single argument -- a property, and return a set of additional
# The rule should accept two arguments:
# - the property which is registered
# - the list of all properties
# and return a set of additional
# properties to be added. Property should be specified in the usual way:
# <feature>value, and feature should be specified as <feature>.
rule action ( property-or-feature : rule-name )
@@ -771,7 +774,7 @@ rule run-actions ( properties * )
}
for local r in $(rules)
{
added += [ $(r) $(e) ] ;
added += [ $(r) $(e) : $(properties) ] ;
}
}
return $(properties) $(added) ;
@@ -810,22 +813,22 @@ local rule __test__ ( )
subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4
3.0 3.0.1 3.0.2 : optional ;
rule handle-stlport ( property )
rule handle-stlport ( property : properties * )
{
return <include>/path/to/stlport ;
}
rule handle-magic ( property )
rule handle-magic ( property : properties * )
{
return <define>MAGIC=$(property:G=) ;
}
rule handle-magic2 ( property )
rule handle-magic2 ( property : properties * )
{
return <define>MAGIC=BIG_MAGIC ;
}
rule handle-magic3 ( property )
rule handle-magic3 ( property : properties * )
{
return <define>MAGIC=VERY_BIG_MAGIC ;
}

77
stlport.jam Normal file
View File

@@ -0,0 +1,77 @@
# (C) Copyright Gennadiy Rozental 2002.
# (C) Copyright Vladimir Prus 2002.
# 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" without express or implied warranty, and with no claim as
# to its suitability for any purpose.
import feature : feature subfeature ;
feature.extend stdlib : stlport ;
# STLport iostreams or native iostreams
subfeature stdlib stlport : iostream : hostios : optional propagated ;
# STLport extensions
#subfeature stdlib stlport : extensions : on off ;
# STLport anachronisms
#subfeature stdlib stlport : anachronisms : on off ;
# STLport debug allocation
#subfeature stdlib stlport : debug-alloc : off on ;
rule init ( headers : libraries ? )
{
.headers = $(headers) ;
.libraries = $(libraries) ;
feature.action <stdlib>stlport : adjust-properties ;
}
rule adjust-properties ( property : properties * )
{
local result = <include>$(.headers) ;
local need-library ;
if <stdlib-iostream>hostios in $(properties)
{
result += <define>_STLP_NO_OWN_IOSTREAMS ;
}
else
{
result += <library-path>$(.libraries) ;
need-library = true ;
}
# Commented out until I find out why stlport won't link
# with debugging on, using Boost.Build or otherwise.
if $(0) {
local library ;
if <variant>debug in $(properties)
{
result += <define>_STLP_DEBUG ;
library = <find-static-library>stlport_gcc_debug <find-static-library>pthread ;
}
else
{
library = <find-shared-library>stlport_gcc ;
}
}
library = <find-shared-library>stlport_gcc ;
if $(need-library)
{
result += $(library) ;
}
return $(result) ;
}