This proposal has several goals:
To this end, I have tried to remove the distinction between toolsets, variants, and features. Instead, toolsets and variants will be treated as special kinds of features. This will allow the addition of properties like <std-library>stlport in a consistent way. I've also extended the notion of feature to include sub-features which can be used to specify version information.
import features # bring in definitions : feature subfeature properties ;
feature profiling : off on ; feature threading : single multi ; feature runtime-link : dynamic static : symmetric ; feature optimization : off speed space ; feature define : : free ; feature "include" : : path free ; feature library-file : : free path dependency ;
This one is actually used by the build system
feature target-type : : free ;
The toolset feature initially has no values.
feature toolset : : implicit executed ;
this will be part of the result of loading the msvc toolset. It adds the value "msvc" to the set of permissible values for toolset.
features.extend toolset : gcc ;
declares toolset-version as a subfeature of toolset. A subfeature is not translated into a new path element, but is instead appended to the feature name with a dash separator, as in "gcc-3.0.1".
subfeature toolset version : : optional ;
A subfeature may also be declared relative to a particular value of its superfeature:
subfeature <toolset>gcc version : 2.95.2 2.95.3 2.96 3.0 3.0.1 : optional ;
features.link-compatible gcc-2.95.2 gcc-2.95.3 gcc-2.96 ;This property is link-compatible with anything
features.link-compatible <shared-linkable>true ;
feature variant : : implicit composite ;
variant debug : <debug-symbols>on <runtime-build>debug <optimization>off <inlining>off ;
this would be executed as a result of declaring the "debug" variant
features.extend variant : debug ; properties debug : <debug-symbols>on <runtime-build>debug <optimization>off <inlining>off ;
A module called stlport.jam might contain the following:
import features : feature subfeature properties ; feature std-library : implicit optional executed ;
features.extend std-library : stlport ; subfeature toolset : version : optional ;
subfeature stlport version : 4.0 4.5 : optional ; feature stlport-iostreams : on off : optional ;
properties stlport-version : <sys-include>$(STLPORT_ROOT)/STLPort : optional ; properties stlport-iostreams : <sys-include>$(STLPORT_ROOT)/STLPort : optional ;
declare the features which generate directories at the top of the build tree, and the order in which the directories are generated. this forces the first few features in the sort order for target directory generation. Since library is labelled "optional" above, no directory may be generated for the library if it is not overridden.
build.top-features toolset library variant ;
target-type DLL : .dll .lib # suffixes : <shared-linkable>true ; # requirements
build = gcc-3.0.1/stlport msvc/stlport msvc debug ;
more specifically, elements are first segregated according to whether or not they contain composite features, then the above combinations are applied within the two groups. Finally, each element of the first group is combined with each element of the second group, with values in the composite group being overridden by values in the other one, so
build = gcc-3.0.1/stlport debug release <inlining>off ;builds:
[buy lipitor online] [buy lipitor] [[buy lipitor online]]
[buy fioricet online] [buy fioricet] [[buy fioricet online]]