Minor stylistic changes made to the main Boost library Jamroot file. Corrected several comments. Made searching for header files not search through .svn folders.

[SVN r48493]
This commit is contained in:
Jurko Gospodnetić 2008-08-31 10:18:33 +00:00
parent 20186872b6
commit 9f569e3053

146
Jamroot
View file

@ -117,7 +117,8 @@ path-constant BOOST_ROOT : . ;
constant BOOST_VERSION : 1.37.0 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ]
;
if $(version-tag[3]) = 0
{
version-tag = $(version-tag[1-2]) ;
@ -125,8 +126,7 @@ if $(version-tag[3]) = 0
constant BOOST_VERSION_TAG : $(version-tag:J="_") ;
# Option to choose how many variants to build. The default is "minimal",
# which builds only the "release <threading>multi <link>shared" variant.
# Option to choose how many variants to build. The default is "minimal".
local build-type = [ MATCH "^--build-type=(.*)" : [ modules.peek : ARGV ] ] ;
build-type ?= minimal ;
if ! ( $(build-type) in minimal complete )
@ -151,8 +151,8 @@ local default-build,complete =
# Set the default build.
local default-build = $(default-build,$(build-type)) ;
# We only use the default build when building at the root to
# avoid having it impact the default regression testing of "debug".
# We only use the default build when building at the root to avoid having it
# impact the default regression testing of "debug".
# TODO: Consider having a "testing" build type instead of this check.
if $(__file__:D) != ""
{
@ -162,17 +162,14 @@ if $(__file__:D) != ""
rule handle-static-runtime ( properties * )
{
# This property combination is dangerous.
# Ideally, we'd add constraint to default build,
# so that user can build with property combination
# by hand. But we don't have any 'constraint' mechanism
# for default-build, so disable such builds in requirements.
# This property combination is dangerous. Ideally, we would add a constraint
# to default build, so that user can build this property combination only if
# requested directly. But we do not have any 'constraint' system for
# default-build, so we disable such builds in requirements.
# For CW, static runtime is needed so that
# std::locale works.
if <link>shared in $(properties)
&& <runtime-link>static in $(properties)
&& ! ( <toolset>cw in $(properties) )
# For CW, static runtime is needed so that std::locale works.
if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
! ( <toolset>cw in $(properties) )
{
return <build>no ;
}
@ -181,23 +178,22 @@ rule handle-static-runtime ( properties * )
project boost
: requirements <include>.
# disable auto-linking for all targets here,
# primarily because it caused troubles with V2
# Disable auto-linking for all targets here, primarily because it caused
# troubles with V2.
<define>BOOST_ALL_NO_LIB=1
# Used to encode variant in target name. See the
# 'tag' rule below.
# Used to encode variant in target name. See the 'tag' rule below.
<tag>@$(__name__).tag
<conditional>@handle-static-runtime
: usage-requirements <include>.
: build-dir bin.v2
: default-build $(default-build)
;
# Setup convenient aliases for all libraries.
all-libraries =
[ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ] [ glob libs/*/build/Jamfile ] ]
all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
[ glob libs/*/build/Jamfile ] ]
;
all-libraries = [ sequence.unique $(all-libraries) ] ;
@ -209,6 +205,7 @@ local rule explicit-alias ( id : targets + )
explicit $(id) ;
}
# First, the complicated libraries: where the target name in Jamfile is
# different from its directory name.
explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
@ -231,13 +228,14 @@ alias headers : : : : <include>. ;
# Decides which libraries are to be installed by looking at --with-<library>
# --without-<library> arguments. Returns the list of directories under "libs"
# which must be built and installed.
#
rule libraries-to-install ( existing-libraries * )
{
local argv = [ modules.peek : ARGV ] ;
local with-parameter = [ MATCH --with-(.*) : $(argv) ] ;
local without-parameter = [ MATCH --without-(.*) : $(argv) ] ;
# Do some checks
# Do some checks.
if $(with-parameter) && $(without-parameter)
{
ECHO "error: both --with-<library> and --without-<library> specified" ;
@ -267,22 +265,25 @@ rule libraries-to-install ( existing-libraries * )
}
}
# what kind of layout are we doing?
# What kind of layout are we doing?
layout = [ MATCH "^--layout=(.*)" : [ modules.peek : ARGV ] ] ;
layout ?= versioned ;
layout-$(layout) = true ;
# possible stage only location
# Possible stage only location.
local stage-locate = [ MATCH "^--stagedir=(.*)" : [ modules.peek : ARGV ] ] ;
stage-locate ?= stage ;
path-constant BOOST_STAGE_LOCATE : $(stage-locate) ;
# location of python
local python-root = [ MATCH "^--with-python-root=(.*)" : [ modules.peek : ARGV ] ] ;
# Python location.
local python-root = [ MATCH "^--with-python-root=(.*)" : [ modules.peek : ARGV ]
] ;
PYTHON_ROOT ?= $(python-root) ;
# Select the libraries to install.
libraries = [ libraries-to-install $(all-libraries) ] ;
@ -303,9 +304,11 @@ if $(build-id)
constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ;
}
# This rule is called by Boost.Build to determine the name of
# target. We use it to encode build variant, compiler name and
# boost version in the target name
# This rule is called by Boost.Build to determine the name of target. We use it
# to encode the build variant, compiler name and boost version in the target
# name.
#
rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
@ -317,14 +320,13 @@ rule tag ( name : type ? : property-set )
-$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
# Optionally add version suffix.
# On NT, library with version suffix won't be recognized
# by linkers. On CYGWIN, we get strage duplicate symbol
# errors when library is generated with version suffix.
# On OSX, version suffix is not needed -- the linker expets
# libFoo.1.2.3.dylib format.
# AIX linkers don't accept version suffixes either.
# Pgi compilers can't accept library with version suffix
# Optionally add version suffix. On NT, library with version suffix
# will not be recognized by linkers. On CYGWIN, we get strage
# duplicate symbol errors when library is generated with version
# suffix. On OSX, version suffix is not needed -- the linker expects
# the libFoo.1.2.3.dylib format. AIX linkers do not accept version
# suffixes either. Pgi compilers can not accept library with version
# suffix.
if $(type) = SHARED_LIB &&
( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
! ( [ $(property-set).get <toolset> ] in pgi ) )
@ -336,18 +338,17 @@ rule tag ( name : type ? : property-set )
}
else
{
return [ common.format-name
<base> <threading> <runtime> -$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
return [ common.format-name <base> <threading> <runtime>
-$(BUILD_ID) : $(name) : $(type) : $(property-set) ] ;
}
}
}
# Install to system location.
install-requirements =
<install-source-root>$(BOOST_ROOT)/boost
;
install-requirements = <install-source-root>$(BOOST_ROOT)/boost ;
if $(layout-versioned)
{
install-requirements += <install-header-subdir>boost-$(BOOST_VERSION_TAG)/boost ;
@ -366,32 +367,30 @@ else if [ modules.peek : UNIX ]
}
local headers =
[ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc : CVS ]
[ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc : CVS .svn ]
[ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* : CVS
] ;
.svn ] ;
# Complete install
# Complete install.
package.install install-proper
: $(install-requirements) <install-no-version-symlinks>on
: $(install-requirements) <install-no-version-symlinks>on
:
: libs/$(libraries)/build
: $(headers)
: libs/$(libraries)/build
: $(headers)
;
explicit install-proper ;
# Install just library.
install stage-proper
: libs/$(libraries)/build
: <location>$(stage-locate)/lib
<install-dependencies>on <install-type>LIB
<install-no-version-symlinks>on
: libs/$(libraries)/build
: <location>$(stage-locate)/lib
<install-dependencies>on <install-type>LIB
<install-no-version-symlinks>on
;
explicit stage-proper ;
if $(layout-versioned)
&& ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
if $(layout-versioned) && ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
{
rule make-unversioned-links ( project name ? : property-set : sources * )
{
@ -410,7 +409,8 @@ if $(layout-versioned)
}
else
{
m = [ MATCH "(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)" : [ $(s).name ] ] ;
m = [ MATCH "(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)" :
[ $(s).name ] ] ;
}
if $(m)
{
@ -424,8 +424,7 @@ if $(layout-versioned)
local name = [ $(s).name ] ;
local ea = [ $(s).action ] ;
local ep = [ $(ea).properties ] ;
local a = [
new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
local a = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
local noversion-file ;
if $(nt)
@ -451,16 +450,16 @@ if $(layout-versioned)
}
generate stage-unversioned : stage-proper :
<generating-rule>@make-unversioned-links ;
<generating-rule>@make-unversioned-links ;
explicit stage-unversioned ;
generate install-unversioned : install-proper :
<generating-rule>@make-unversioned-links ;
<generating-rule>@make-unversioned-links ;
explicit install-unversioned ;
}
else
{
# Create do-nothing aliases
# Create do-nothing aliases.
alias stage-unversioned ;
explicit stage-unversioned ;
alias install-unversioned ;
@ -473,23 +472,25 @@ explicit install ;
explicit stage ;
# Just build the libraries, don't install them anywhere.
# This is what happens with just "bjam --v2".
# Just build the libraries, don't install them anywhere. This is what happens
# with just "bjam --v2".
alias build_all : libs/$(libraries)/build ;
# This rule should be called from libraries' Jamfiles and will
# create two targets, "install" and "stage", that will install
# or stage that library. The --prefix option is respected, but
# --with and --without options, naturally, are ignored.
# This rule should be called from libraries' Jamfiles and will create two
# targets, "install" and "stage", that will install or stage that library. The
# --prefix option is respected, but --with and --without options, naturally, are
# ignored.
#
# - libraries -- list of library targets to install.
#
rule boost-install ( libraries * )
{
package.install install
: <dependency>/boost//install-proper-headers $(install-requirements)
: <dependency>/boost//install-headers $(install-requirements)
: # No binaries
: $(libraries)
: # No headers, it's handled by the dependency
: # No headers, it is handled by the dependency.
;
install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
@ -503,6 +504,7 @@ rule boost-install ( libraries * )
}
}
# Make project ids of all libraries known.
for local l in $(all-libraries)
{