From cbbe68579fee4a2e54a88acf5dd86090a0c2cd4c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 08:17:47 +0000 Subject: [PATCH 01/91] Make gcc's PCH generator ignore the cpp sources, so that cpp-pch pch : pch.hpp pch.cpp ; work both on gcc and msvc. [SVN r35604] --- v2/tools/gcc.jam | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index b67e9001e..06dd7bcbd 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -164,9 +164,20 @@ class gcc-pch-generator : pch-generator { import project ; import property-set ; + import type ; - rule run-pch ( project name ? : property-set : header ) + rule run-pch ( project name ? : property-set : sources + ) { + # Find the header in sources. Ignore any CPP sources. + local header ; + for local s in $(sources) + { + if [ type.is-derived [ $(s).type ] H ] + { + header = $(s) ; + } + } + # error handling # base name of header file should be the same as the base name # of precompiled header. From 2f1f6190ff874f29d4451ca968a3e9781db7230a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 08:26:13 +0000 Subject: [PATCH 02/91] Fix a problem with compilation options being sometimes ignored when generating PCH. When an action generated two targets, target variables must be set on both, on just on the first one. Patch from Franz Schnyder. tools/ * msvc.jam (compile.c++): Call get-rspline on all 'targets', to implicitly verify there's just one element. (compile.c.pch): Call get-rspline on all targets. (compile.c++.pch): Likewise. [SVN r35605] --- v2/tools/msvc.jam | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index c80f5f98e..10fa58732 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -691,7 +691,7 @@ rule compile.c ( targets + : sources * : properties * ) rule compile.c++ ( targets + : sources * : properties * ) { - get-rspline $(targets[1]) : -TP ; + get-rspline $(targets) : -TP ; compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; } @@ -705,6 +705,7 @@ rule compile.c.pch ( targets + : sources * : properties * ) C++FLAGS on $(targets[1]) = ; DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ; get-rspline $(targets[1]) : -TC ; + get-rspline $(targets[2]) : -TC ; compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ] ; } @@ -712,6 +713,7 @@ rule compile.c++.pch ( targets + : sources * : properties * ) { DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ; get-rspline $(targets[1]) : -TP ; + get-rspline $(targets[2]) : -TP ; compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ] ; } From 0dab97ab91cf576c7680b0df4a43252324258abc Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 10:28:03 +0000 Subject: [PATCH 03/91] Improve the hanling of "inline" targets, like: alias foo : [ run a.cpp ] ; and exe main : main.cpp [ lib helpers : helpers.cpp ] ; Now inline targets are marked explicit, so that they are not build unless requested, and for the alias target, the names of inline targets are not qualified by the name of top-level target. build/ * alias.jam (alias): Pass 'no-renaming' to target.main-target-sources. * target.jam (main-target-sources): New parameter 'no-renaming'. Make inline target explicit. * builtin.jam (lib): Declare 'result' variable, to avoid implicit declaration of a global one. tools/ * testing.jam (test-suite): Make synonymous with 'alias'. test/ * inline.py: Adjust to the fact that alias no longer changes names of inline targets. Check that inline targets are explicit. [SVN r35607] --- v2/build/alias.jam | 2 +- v2/build/targets.jam | 21 +++++++++++++----- v2/test/inline.py | 53 +++++++++++++++++++++++++++++++------------- v2/tools/builtin.jam | 1 + v2/tools/python.jam | 11 ++++++++- v2/tools/testing.jam | 22 ++++++------------ 6 files changed, 71 insertions(+), 39 deletions(-) diff --git a/v2/build/alias.jam b/v2/build/alias.jam index 35bcfea61..d7d68a376 100644 --- a/v2/build/alias.jam +++ b/v2/build/alias.jam @@ -63,7 +63,7 @@ rule alias ( name : sources * : requirements * : default-build * : usage-require targets.main-target-alternative [ new alias-target-class $(name) : $(project) - : [ targets.main-target-sources $(sources) : $(name) ] + : [ targets.main-target-sources $(sources) : $(name) : no-renaming ] : [ targets.main-target-requirements $(requirements) : $(project) ] : [ targets.main-target-default-build $(default-build) : $(project) ] : [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ] diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 94bfc6b28..8f9134f32 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1369,18 +1369,27 @@ class typed-target : basic-target # Return the list of sources to use, if main target rule is invoked # with 'sources'. If there are any objects in 'sources', they are treated -# as main target instances, and WRITEME. -rule main-target-sources ( sources * : main-target-name ) +# as main target instances, and the name of such targets are adjusted to +# be '__'. Such renaming +# is disabled is non-empty value is passed for 'no-renaming' parameter. +# +rule main-target-sources ( sources * : main-target-name : no-renaming ? ) { local result ; for local t in $(sources) { if [ class.is-instance $(t) ] { - local name = [ $(t).name ] ; - local new-name = $(main-target-name)__$(name) ; - $(t).rename $(new-name) ; - result += $(new-name) ; + local name = [ $(t).name ] ; + if ! $(no-renaming) + { + name = $(main-target-name)__$(name) ; + $(t).rename $(name) ; + } + # Inline targets are not built by default. + local p = [ $(t).project ] ; + $(p).mark-target-as-explicit $(name) ; + result += $(name) ; } else { diff --git a/v2/test/inline.py b/v2/test/inline.py index c35865cfe..45f0a5b8c 100644 --- a/v2/test/inline.py +++ b/v2/test/inline.py @@ -9,12 +9,13 @@ from BoostBuild import Tester, List t = Tester() -t.write("project-root.jam", "") -t.write("Jamfile", """ -alias everything : [ exe a : a.cpp ] ; +t.write("Jamroot", """ +project : requirements static ; +exe a : a.cpp [ lib helper : helper.cpp ] ; """) -t.write("a.cpp", """ +t.write("a.cpp", """ +extern void helper(); int main() { return 0; @@ -22,29 +23,49 @@ int main() """) -t.run_build_system() -t.expect_addition("bin/$toolset/debug/everything__a.exe") -t.rm("bin/$toolset/debug/everything__a.exe") +t.write("helper.cpp", """ +void helper() +{ +} +""") -t.run_build_system("everything__a") -t.expect_addition("bin/$toolset/debug/everything__a.exe") +t.run_build_system() +t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib") +t.rm("bin/$toolset/debug/link-static/a__helper.lib") + +t.run_build_system("a__helper") +t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib") t.rm("bin") # Now check that inline targets with the same name but # present in different places are not confused between # each other, and with top-level targets. -t.write("Jamfile", """ -exe a : a.cpp ; -alias everything : [ exe a : a.cpp ] ; -alias everything2 : [ exe a : a.cpp ] ; +t.write("Jamroot", """ +project : requirements static ; +exe a : a.cpp [ lib helper : helper.cpp ] ; +exe a2 : a.cpp [ lib helper : helper.cpp ] ; """) t.run_build_system() -t.expect_addition("bin/$toolset/debug/a.exe") -t.expect_addition("bin/$toolset/debug/everything__a.exe") -t.expect_addition("bin/$toolset/debug/everything2__a.exe") +t.expect_addition("bin/$toolset/debug/link-static/a.exe") +t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib") +t.expect_addition("bin/$toolset/debug/link-static/a2__helper.lib") +# Check that the 'alias' target does not change name of +# inline targets, and that inline targets are explicit. +t.write("Jamroot", """ +project : requirements static ; +alias a : [ lib helper : helper.cpp ] ; +explicit a ; +""") +t.rm("bin") + +t.run_build_system() +t.expect_nothing_more() + +t.run_build_system("a") +t.expect_addition("bin/$toolset/debug/link-static/helper.lib") t.cleanup() diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index e96fcc645..26019df41 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -499,6 +499,7 @@ generators.register [ new lib-generator builtin.lib-generator : : LIB ] ; rule lib ( names + : sources * : requirements * : default-build * : usage-requirements * ) { + local result ; local project = [ project.current ] ; # This is a circular module dependency, so it must be imported here diff --git a/v2/tools/python.jam b/v2/tools/python.jam index 9f1389fce..7791e71fb 100644 --- a/v2/tools/python.jam +++ b/v2/tools/python.jam @@ -530,7 +530,16 @@ class python-test-generator : generator { if [ $(s).type ] = PY { - python = $(s) ; + if ! $(python) + { + # First Python source ends up on command line. + python = $(s) ; + } + else + { + # Other Python sources become dependencies. + property-set = [ $(property-set).add-raw $(s) ] ; + } } } diff --git a/v2/tools/testing.jam b/v2/tools/testing.jam index 8bb2612f1..542c9f525 100644 --- a/v2/tools/testing.jam +++ b/v2/tools/testing.jam @@ -155,19 +155,11 @@ rule run-fail ( sources + : args * : input-files * : requirements * : target-nam return [ make-test run-fail : $(sources) : $(requirements) : $(target-name) ] ; } -# Rule for grouping tests in suites. -rule test-suite ( suite-name : tests + ) -{ - # In V2, if 'tests' are instances of 'abstract-target', they will be considered - # 'inline-targets' and will suffer some adjustments. This will not be compatible - # with V1 behaviour, so we get names of 'tests' and use them. - local names ; - for local t in $(tests) - { - names += [ $(t).name ] ; - } - modules.call-in [ CALLER_MODULE ] : alias $(suite-name) : $(names) ; -} + +# Use 'test-suite' as synonym for 'alias', for backward compatibility. +IMPORT : alias : : test-suite ; + + # For all main target in 'project-module', # which are typed target with type derived from 'TEST', @@ -442,8 +434,8 @@ actions unit-test $(LAUNCHER) $(>) && $(MAKE_FILE) $(<) } -IMPORT $(__name__) : compile compile-fail test-suite run run-fail link link-fail - : : compile compile-fail test-suite run run-fail link link-fail ; +IMPORT $(__name__) : compile compile-fail run run-fail link link-fail + : : compile compile-fail run run-fail link link-fail ; type.register TIME : time ; From 51198824562d6927a21000fe45762f044ebb9962 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 10:37:54 +0000 Subject: [PATCH 04/91] build/ * generators.jam (construct): Remove the 'allowed-type' parameter. Adjust other files. [SVN r35608] --- v2/build/generators.jam | 7 +------ v2/tools/builtin.jam | 2 +- v2/tools/stage.jam | 2 +- v2/tools/stlport.jam | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/v2/build/generators.jam b/v2/build/generators.jam index e037bab77..3c7cfe365 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -1134,12 +1134,7 @@ local rule construct-really ( # 'construct' in stack, returns only targets of requested 'target-type', # otherwise, returns also unused sources and additionally generated # targets. -# -# Does not return target which are not of 'allowed-type' or of type derived from -# it. If 'allowed-type' is not specified, it's defaulted to 'target-type'. -# See lib-target-class for use case of this. -rule construct ( project name ? : target-type : property-set * : sources * - : allowed-type * ) +rule construct ( project name ? : target-type : property-set * : sources * ) { if (.construct-stack) { diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index 26019df41..859f232bf 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -480,7 +480,7 @@ class lib-generator : generator property-set = [ $(property-set).add-raw LIB ] ; # Construct the target. return [ generators.construct $(project) $(name) : $(actual-type) - : $(property-set) : $(sources) : LIB ] ; + : $(property-set) : $(sources) ] ; } } diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index cb3806eab..ab9ea585d 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -150,7 +150,7 @@ class install-target-class : basic-target else { local targets = [ generators.construct $(self.project) $(name) : - INSTALLED_$(t) : $(new-properties) : $(i) : * ] ; + INSTALLED_$(t) : $(new-properties) : $(i) ] ; staged-targets += $(targets[2-]) ; } } diff --git a/v2/tools/stlport.jam b/v2/tools/stlport.jam index cda3be262..ad1c1eb15 100644 --- a/v2/tools/stlport.jam +++ b/v2/tools/stlport.jam @@ -172,7 +172,7 @@ class stlport-target-class : basic-target = [ targets.main-target-requirements [ $(lib-file.props).raw ] $(lib-file[-1]) : $(self.project) ] ; - return [ generators.construct $(self.project) $(name) : LIB : $(lib-file.requirements) : : LIB ] ; + return [ generators.construct $(self.project) $(name) : LIB : $(lib-file.requirements) ] ; } else { From 66f44a1253aea8da01d881612eccfdc060579b0d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 10:45:31 +0000 Subject: [PATCH 05/91] tools/ * python.jam (python-test-generator.run): Set dependency on other python sources only for the result, not for extension module. Set ARGS variable on capture-output. [SVN r35609] --- v2/tools/python.jam | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/v2/tools/python.jam b/v2/tools/python.jam index 7791e71fb..66c05bb2b 100644 --- a/v2/tools/python.jam +++ b/v2/tools/python.jam @@ -526,6 +526,7 @@ class python-test-generator : generator rule run ( project name ? : property-set : sources * : multiple ? ) { local python ; + local other-pythons ; for local s in $(sources) { if [ $(s).type ] = PY @@ -538,7 +539,7 @@ class python-test-generator : generator else { # Other Python sources become dependencies. - property-set = [ $(property-set).add-raw $(s) ] ; + other-pythons += $(s) ; } } } @@ -585,7 +586,8 @@ class python-test-generator : generator } } - + property-set = [ $(property-set).add-raw $(other-pythons) ] ; + result = [ construct-result $(python) $(extensions) $(new-sources) : $(project) $(name) : $(property-set) ] ; } @@ -598,6 +600,10 @@ generators.register-standard testing.expect-success : RUN_PYD_OUTPUT : RUN_PYD ; +# The flag settings on testing.capture-output do not +# apply to python.capture output at the moment. +# Redo this explicitly. +toolset.flags python.capture-output ARGS ; rule capture-output ( target : sources * : properties * ) { # Setup up proper DLL search path. From 4691f3a81c05b152ad5c3b47134b87f47944b2dd Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 15 Oct 2006 19:05:45 +0000 Subject: [PATCH 06/91] Fix comment [SVN r35620] --- v2/build/project.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/build/project.jam b/v2/build/project.jam index 08565be90..1ee6b1ec5 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -964,7 +964,7 @@ module project-rules # at once. This is a shorthand to be reduce duplication and to # keep an inline declarative syntax. For example: # - # lib x : x.cpp : [ gcc debug : + # lib x : x.cpp : [ conditional gcc debug : # DEBUG_EXCEPTION DEBUG_TRACE ] ; # rule conditional ( condition + : requirements * ) From 4ed8788affe362c6e31f2b756d7f553d9d2ecc19 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 16 Oct 2006 02:08:34 +0000 Subject: [PATCH 07/91] Make extensions project not be standalone, and to inherit from the enclosing project. So that they use the build location, and properties of the context project. [SVN r35622] --- v2/build/project.jam | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/v2/build/project.jam b/v2/build/project.jam index 1ee6b1ec5..9041a2ade 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -746,13 +746,31 @@ rule extension ( id : options * : * ) # We need to do the rest within the extension module. module $(mod) { + import path ; + + # Find the root project. + local root-project = [ project.current ] ; + root-project = [ $(root-project).project-module ] ; + while + [ project.attribute $(root-project) parent-module ] && + [ project.attribute $(root-project) parent-module ] != user-config + { + root-project = [ project.attribute $(root-project) parent-module ] ; + } + # Create the project data, and bring in the project rules # into the module. - project.initialize $(__name__) ; + project.initialize $(__name__) : + [ path.join [ project.attribute $(root-project) location ] ext $(1:L) ] ; # Create the project itself, i.e. the attributes. # All extensions are created in the "/ext" project space. project /ext/$(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; + local attributes = [ project.attributes $(__name__) ] ; + + # Inherit from the root project of whomever is defining us. + project.inherit-attributes $(__name__) : $(root-project) ; + $(attributes).set parent-module : $(root-project) : exact ; } } From 66310027be7b1a14fe348c8e0d4c2698d8f149c4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 16 Oct 2006 02:11:02 +0000 Subject: [PATCH 08/91] Fix some bugs in the common format-name functionality, and add some documentation. [SVN r35623] --- v2/tools/common.jam | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index 5ad6ce235..5cbc21eae 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -566,6 +566,45 @@ actions quietly updated piecemeal together RmTemps $(RM) "$(>)" $(IGNORE) } +# Given a format and the info from a target, as given to a tag +# rule, returns for synthesized name for the target. The format +# specifies which information from the target is place, and where +# it is placed to form the name. The individual elements of the format +# are evaluated and sequencially composed into the resulting name. +# The format options can be: +# +# [joiner] +# :: The basename of the target name. +# [joiner] +# :: The abbreviated toolset tag being used to build the target. +# [joiner] +# :: Indication of a multi-threaded build. +# [joiner] +# :: Collective tag of the build runtime. +# [joiner] +# :: Short version tag taken from the given "version-feature" +# in the build properties. Or if not present the literal +# value as the version number. +# [joiner] +# :: Direct lookup of the given property-name value in the +# build properties. +# otherwise +# :: The literal value of the format argument. +# +# For all, but the literal, format the value, if given, is taken as +# the as string to prepend to the output to join the item to the rest of +# the name. If not given "-" is used as a joiner. For example this format: +# +# boost_ +# +# Might return: +# +# boost_thread-vc80-mt-gd-1_33.dll, or +# boost_regex-vc80-gd-1_33.dll +# +# The returned name also has the target type specific prefix and suffix +# which puts it in a ready form to use as the value from a custom tag rule. +# rule format-name ( format * : name : type ? : property-set ) { if [ type.is-derived $(type) LIB ] @@ -586,7 +625,7 @@ rule format-name ( format * : name : type ? : property-set ) result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type) : $(property-set) ] ] ; - case : + case : result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) : $(property-set) ] ] ; @@ -594,7 +633,7 @@ rule format-name ( format * : name : type ? : property-set ) local key = [ MATCH : $(f:G) ] ; local version = [ $(property-set).get <$(key)> ] ; version ?= $(key) ; - version = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" + version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ] ; result += [ join-tag $(f:G=) : $(version[1])_$(version[2]) ] ; @@ -687,6 +726,7 @@ local rule toolset-tag ( name : type ? : property-set ) local rule threading-tag ( name : type ? : property-set ) { local tag = ; + local properties = [ $(property-set).raw ] ; if multi in $(properties) { tag = mt ; } return $(tag:J=) ; From b0516f69f0194c2a8d9f3a5b3ba171c4fa821447 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 16 Oct 2006 20:43:26 +0000 Subject: [PATCH 09/91] Add exclusion patterns to glob-tree to allow for exclusing things like CVS directories from scanning. This fixes the problem of invalid/unknown target for those dirs when they are hidden as they get returned as files instead of dirs by the OS. Also updated copyright and license info. [SVN r35641] --- v2/util/path.jam | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/v2/util/path.jam b/v2/util/path.jam index c63ddb2da..33403887b 100644 --- a/v2/util/path.jam +++ b/v2/util/path.jam @@ -1,7 +1,10 @@ -# Copyright (C) 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. +# Copyright Vladimir Prus 2002-2006. +# Copyright Dave Abrahams 2003-2004. +# Copyright Rene Rivera 2003-2006. +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) # Performs various path manipulations. Path are always in a 'normilized' # representation. In it, a path may be either: @@ -18,6 +21,7 @@ import modules ; import sequence ; import regex ; import errors : error ; +import set ; os = [ modules.peek : OS ] ; @@ -237,19 +241,33 @@ rule glob ( dirs * : patterns + ) } # Recursive version of GLOB. Builds the glob of files while -# also searching in the subdirectories of the given roots. +# also searching in the subdirectories of the given roots. An +# optional set of exclusion patterns will filter out the +# matching entries from the result. The exclusions also apply +# to the subdirectory scanning, such that directories that +# match the exclusion patterns will not be searched. # -rule glob-tree ( roots * : patterns + ) +rule glob-tree ( roots * : patterns + : exclude-patterns * ) { return [ sequence.transform path.make : [ .glob-tree - [ sequence.transform path.native : $(roots) ] : $(patterns) ] ] ; + [ sequence.transform path.native : $(roots) ] + : $(patterns) + : $(exclude-patterns) + ] ] ; } -local rule .glob-tree ( roots * : patterns * ) +local rule .glob-tree ( roots * : patterns * : exclude-patterns * ) { - local result = [ GLOB $(roots) : $(patterns) ] ; + local excluded ; + if $(exclude-patterns) + { + excluded = [ GLOB $(roots) : $(exclude-patterns) ] ; + } + local result = [ set.difference + [ GLOB $(roots) : $(patterns) ] : $(excluded) ] ; local subdirs ; - for local d in [ GLOB $(roots) : * ] + for local d in [ set.difference + [ GLOB $(roots) : * ] : $(excluded) ] { if ! ( $(d:D=) in . .. ) && ! [ CHECK_IF_FILE $(d) ] { subdirs += $(d) ; } } From c1ff85b55c0b2ba63007f7b6a8a9e6fdf96f4925 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 17 Oct 2006 02:00:56 +0000 Subject: [PATCH 10/91] Cleanup format-name docs. [SVN r35645] --- v2/tools/common.jam | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index 5cbc21eae..f74de3979 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -566,11 +566,14 @@ actions quietly updated piecemeal together RmTemps $(RM) "$(>)" $(IGNORE) } -# Given a format and the info from a target, as given to a tag -# rule, returns for synthesized name for the target. The format -# specifies which information from the target is place, and where -# it is placed to form the name. The individual elements of the format -# are evaluated and sequencially composed into the resulting name. +# Given a target, as given to a custom tag rule, returns a string formatted +# according to the passed format. Format is a list of properties that is +# represented in the result. For each element of format the corresponding +# target information is obtained and added to the result string. +# For all, but the literal, the format value is taken as the as string to +# prepend to the output to join the item to the rest of the result. If not +# given "-" is used as a joiner. +# # The format options can be: # # [joiner] @@ -588,12 +591,10 @@ actions quietly updated piecemeal together RmTemps # [joiner] # :: Direct lookup of the given property-name value in the # build properties. -# otherwise +# /otherwise/ # :: The literal value of the format argument. # -# For all, but the literal, format the value, if given, is taken as -# the as string to prepend to the output to join the item to the rest of -# the name. If not given "-" is used as a joiner. For example this format: +# For example this format: # # boost_ # From 622fcf6ed638c7429b872349234e2b307760f4ae Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 18 Oct 2006 05:40:37 +0000 Subject: [PATCH 11/91] Improve wording of an error message. [SVN r35649] --- v2/build/targets.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 8f9134f32..533845511 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1041,7 +1041,7 @@ class basic-target : abstract-target if $(sources:G) { - errors.error "gristed element in sources for" [ full-name ] ; + errors.user-error "properties found in the 'sources' parameter for" [ full-name ] ; } } From af6408109b7ec0836dbaafe80b28d192bdd53cda Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 18 Oct 2006 13:02:31 +0000 Subject: [PATCH 12/91] Fix building on Windows. tools/ * builtin.jam: linking-generator.run (Return nothing if it failed). [SVN r35657] --- v2/tools/builtin.jam | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index 859f232bf..8e63d2c53 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -737,10 +737,13 @@ class linking-generator : generator local result = [ generator.run $(project) $(name) : $(property-set) : $(sources) ] ; - local ur = [ extra-usage-requirements $(result) : $(property-set) ] ; - ur = [ $(ur).add - [ property-set.create $(extra-xdll-paths) ] ] ; - + local ur ; + if $(result) + { + ur = [ extra-usage-requirements $(result) : $(property-set) ] ; + ur = [ $(ur).add + [ property-set.create $(extra-xdll-paths) ] ] ; + } return $(ur) $(result) ; } From a25d3f128833db9c3558cb0822ff96d1449b7cf5 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 21 Oct 2006 10:39:48 +0000 Subject: [PATCH 13/91] Don't include toolset version in libs built with bcb [SVN r35684] --- v2/tools/common.jam | 8 ++++++++ v2/tools/stage.jam | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index f74de3979..df2a7bee5 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -719,6 +719,14 @@ local rule toolset-tag ( name : type ? : property-set ) { version = ; } + + # On borland, version is not added for compatibility + # with V1. + if $(tag) = bcb + { + version = ; + } + tag += $(version) ; return $(tag:J=) ; diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index ab9ea585d..5d4793ed8 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -555,6 +555,13 @@ rule rename ( name : type ? : property-set : unversioned ? ) version = ; } + # On borland, version is not added for compatibility + # with V1. + if $(toolset-tag) = bcb + { + version = ; + } + toolset-tag += $(version) ; } From f902bf3a6b29cf8237e3f19253cc90737fabd82d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 22 Oct 2006 14:15:54 +0000 Subject: [PATCH 14/91] build/ * generators.jam (add-usage-requirements): New. [SVN r35690] --- v2/build/generators.jam | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/v2/build/generators.jam b/v2/build/generators.jam index 3c7cfe365..d1013e7c3 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -639,7 +639,6 @@ rule register ( g ) # a generator and then call 'run' method on that generator, bypassing all # generator selection. rule register-standard ( id : source-types * : target-types + : requirements * ) - { local g = [ new generator $(id) : $(source-types) : $(target-types) : $(requirements) ] ; @@ -1168,3 +1167,22 @@ rule construct ( project name ? : target-type : property-set * : sources * ) 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 property-set class, +# the existing usage requirements and 'raw-properties' are combined. +rule add-usage-requirements ( result * : raw-properties * ) +{ + if $(result) + { + if [ class.is-a $(result[1]) : property-set ] + { + return [ $(result[1]).add-raw $(raw-properties) ] $(result[2-]) ; + } + else + { + return [ property-set.create $(raw-properties) ] $(result) ; + } + } +} From 410718da929fbdfd4ea048638bd92c5530b17c94 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 22 Oct 2006 17:41:31 +0000 Subject: [PATCH 15/91] Automatically set BOOST_BUILD_PCH_ENABLED when pch is enabled. [SVN r35692] --- v2/tools/pch.jam | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2/tools/pch.jam b/v2/tools/pch.jam index 575cbf568..e06a92143 100644 --- a/v2/tools/pch.jam +++ b/v2/tools/pch.jam @@ -38,6 +38,7 @@ type.register CPP_PCH : : PCH ; feature.feature pch : on off + : propagated ; feature.feature pch-header : : free dependency ; @@ -74,8 +75,10 @@ class pch-generator : generator } else { - return [ run-pch $(project) $(name) : $(property-set) - : $(sources) ] ; + local r = [ run-pch $(project) $(name) : $(property-set) + : $(sources) ] ; + return [ generators.add-usage-requirements $(r) + : BOOST_BUILD_PCH_ENABLED ] ; } } From bf3ddc766e5be9bcc905f21f8802cd887857342b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 23 Oct 2006 16:30:38 +0000 Subject: [PATCH 16/91] Add "USERPROFILE" dir to user directories so that when the other HOME related vars don't point to the usual Windows location the user-config.jam can still be found. This fixes running from non-CMD shells, like the MinGW MSYS shell. [SVN r35697] --- v2/util/os.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/util/os.jam b/v2/util/os.jam index 67f1ab7f6..9e2ea1925 100644 --- a/v2/util/os.jam +++ b/v2/util/os.jam @@ -63,7 +63,7 @@ EXPORT $(__name__) : $(.constants) ; if $(.name) = NT { local home = [ environ HOMEDRIVE HOMEPATH ] ; - .home-directories = $(home[1])$(home[2]) [ environ HOME ] ; + .home-directories = $(home[1])$(home[2]) [ environ HOME ] [ environ USERPROFILE ] ; } else { From 9b5aca5a9da3d7b5d837d62a8aa98bcd46ba503b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:17:44 +0000 Subject: [PATCH 17/91] * msvc.jam (msvc-pch-generator.run-pch): Accept any number of sources. Don't error out if no .cpp file found in sources. (compile-c-c++-pch-s): Copied from compile-c-c++-pch. (compile-c-c++-pch): Generate temporary .cpp file. (compile.c.pch): Forward to compile-c-c++-pch-s or compile-c-c++-pch depending on presense of PCH_SOURCE. (compile.c++.pch): Likewise. [SVN r35699] --- v2/tools/msvc.jam | 48 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index 10fa58732..da83dff0a 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -543,10 +543,9 @@ class msvc-pch-generator : pch-generator { import property-set ; - rule run-pch ( project name ? : property-set : source-1 source-2 ) + rule run-pch ( project name ? : property-set : sources * ) { # searching header and source file in the sources - local sources = $(source-1) $(source-2) ; local pch-header ; local pch-source ; for local s in $(sources) @@ -568,10 +567,8 @@ class msvc-pch-generator : pch-generator errors.user-error "can't build pch without pch-header" ; } - if ! $(pch-source) - { - errors.user-error "can't build pch without pch-source" ; - } + # If we don't have PCH source, it's fine, we'll + # create temporary .cpp file in the action. local generated = [ @@ -695,26 +692,51 @@ rule compile.c++ ( targets + : sources * : properties * ) compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; } -actions compile-c-c++-pch +actions compile-c-c++-pch-s { $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" } +# Needed only to avoid messing up Emacs syntax highlighting in +# the messing N-quoted code below. +quote = "\"" ; + +actions compile-c-c++-pch +{ + $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(quote)$(>[1]:D)$(quote))" +} + rule compile.c.pch ( targets + : sources * : properties * ) { C++FLAGS on $(targets[1]) = ; - DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ; get-rspline $(targets[1]) : -TC ; get-rspline $(targets[2]) : -TC ; - compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ] ; + local pch-source = [ on $(<) return $(PCH_SOURCE) ] ; + if $(pch-source) + { + DEPENDS $(<) : $(pch-source) ; + compile-c-c++-pch-s $(targets) : $(sources) $(pch-source) ; + } + else + { + compile-c-c++-pch $(targets) : $(sources) ; + } } rule compile.c++.pch ( targets + : sources * : properties * ) { - DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ; - get-rspline $(targets[1]) : -TP ; - get-rspline $(targets[2]) : -TP ; - compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ] ; + get-rspline $(targets[1]) : -TC ; + get-rspline $(targets[2]) : -TC ; + local pch-source = [ on $(<) return $(PCH_SOURCE) ] ; + if $(pch-source) + { + DEPENDS $(<) : $(pch-source) ; + compile-c-c++-pch-s $(targets) : $(sources) $(pch-source) ; + } + else + { + compile-c-c++-pch $(targets) : $(sources) ; + } } actions compile.rc From dafa90ab7391dfb644e2290e2d53212701b27f8e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:22:21 +0000 Subject: [PATCH 18/91] Followup fix [SVN r35702] --- v2/tools/msvc.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index da83dff0a..5d51d4292 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -703,7 +703,7 @@ quote = "\"" ; actions compile-c-c++-pch { - $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(quote)$(>[1]:D)$(quote))" + $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(quote)$(>[1]:D=)$(quote))" } rule compile.c.pch ( targets + : sources * : properties * ) From 7c84cfaebb9b66d2609269b10095eec815e4ec16 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:25:02 +0000 Subject: [PATCH 19/91] Adjust example [SVN r35704] --- v2/example/pch/Jamroot | 2 +- v2/example/pch/source/pch.cpp | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 v2/example/pch/source/pch.cpp diff --git a/v2/example/pch/Jamroot b/v2/example/pch/Jamroot index 509de203a..115164aae 100644 --- a/v2/example/pch/Jamroot +++ b/v2/example/pch/Jamroot @@ -13,8 +13,8 @@ cpp-pch pch include/pch.hpp : # requirements include - msvc:source/pch.cpp ; +explicit pch ; # exe ########################################################################## diff --git a/v2/example/pch/source/pch.cpp b/v2/example/pch/source/pch.cpp deleted file mode 100644 index 995e1f803..000000000 --- a/v2/example/pch/source/pch.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 2006 Ilya Sokolov - - Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -#include From e8cd1766868fe76e6d67f466ac4b82fc116bfd00 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:47:43 +0000 Subject: [PATCH 20/91] Set BOOST_BUILD_PCH_ENABLED when compiling PCH itself. [SVN r35709] --- v2/tools/pch.jam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/tools/pch.jam b/v2/tools/pch.jam index e06a92143..15f9e293b 100644 --- a/v2/tools/pch.jam +++ b/v2/tools/pch.jam @@ -75,7 +75,8 @@ class pch-generator : generator } else { - local r = [ run-pch $(project) $(name) : $(property-set) + local r = [ run-pch $(project) $(name) + : [ $(property-set).add-raw BOOST_BUILD_PCH_ENABLED ] : $(sources) ] ; return [ generators.add-usage-requirements $(r) : BOOST_BUILD_PCH_ENABLED ] ; From 4c76b3426ae9ac34bb363e54d4f59bd9916c33c4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 19:02:12 +0000 Subject: [PATCH 21/91] Use -Winvalid-pch [SVN r35710] --- v2/tools/gcc.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 06dd7bcbd..f72b33723 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -199,7 +199,7 @@ class gcc-pch-generator : pch-generator # return result of base class and pch-file property as usage-requirements return - [ property-set.create $(pch-file) ] + [ property-set.create $(pch-file) -Winvalid-pch ] $(pch-file) ; } From 5b6bd00e4f10285dc2bb764bcc1e684f3061d590 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 23 Oct 2006 23:57:42 +0000 Subject: [PATCH 22/91] Remove now outdated stage renaming of targets, moved to common.jam. [SVN r35713] --- v2/tools/stage.jam | 130 --------------------------------------------- 1 file changed, 130 deletions(-) diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index 5d4793ed8..aa27dfcc9 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -468,133 +468,3 @@ rule install ( name : sources * : requirements * : default-build * ) IMPORT $(__name__) : install : : install ; IMPORT $(__name__) : install : : stage ; - -rule add-variant-and-compiler ( name : type ? : property-set ) -{ - return [ rename $(name) : $(type) : $(property-set) ] ; -} - -rule add-variant ( name : type ? : property-set ) -{ - return [ rename $(name) : $(type) : $(property-set) : unversioned ] ; -} - -rule rename ( name : type ? : property-set : unversioned ? ) -{ - if [ type.is-derived $(type) LIB ] - { - local properties = [ $(property-set).raw ] ; - - local tags = ; - - local thread-tag ; - if multi in $(properties) { thread-tag = mt ; } - - local runtime-tag = ; - if static in $(properties) { runtime-tag += s ; } - if on in $(properties) { runtime-tag += g ; } - - if debug-python in $(properties) { runtime-tag += y ; } - if debug in $(properties) { runtime-tag += d ; } - if stlport in $(properties) { runtime-tag += p ; } - if hostios in $(properties) { runtime-tag += n ; } - - local toolset-tag = ; - # 'unversioned' should be a parameter. - if ! $(unversioned) - { - switch [ $(property-set).get ] - { - case borland* : toolset-tag += bcb ; - case como* : toolset-tag += como ; - case cw : toolset-tag += cw ; - case darwin* : toolset-tag += ; - case edg* : toolset-tag += edg ; - case gcc* : toolset-tag += gcc ; - case intel : - if [ $(property-set).get ] = win - { - toolset-tag += iw ; - } - else - { - toolset-tag += il ; - } - 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 ; - case sun* : toolset-tag += sw ; - case tru64cxx* : toolset-tag += tru ; - case vacpp* : toolset-tag += xlc ; - } - local version = [ MATCH "([0123456789]+)[.]([0123456789]*)" : $(properties) ] ; - # For historical reasons, vc6.0 and vc7.0 use different - # naming. - if $(toolset-tag) = vc - { - if $(version[1]) = 6 - { - # Cancel minor version. - version = 6 ; - } - else if $(version[1]) = 7 && $(version[2]) = 0 - { - version = 7 ; - } - } - # On intel, version is not added, because it does not - # matter and it's the version of vc used as backend - # that matters. Ideally, we'd encode the backend - # version but that will break compatibility with - # V1. - if $(toolset-tag) = iw - { - version = ; - } - - # On borland, version is not added for compatibility - # with V1. - if $(toolset-tag) = bcb - { - version = ; - } - - toolset-tag += $(version) ; - } - - # Note yet clear if this should be added on Linux (where we have - # version in soname) and how it should be done on Windows. - #local version-tag = ; - #if ! $(gUNVERSIONED_VARIANT_TAG) - #{ - # local version-number = [ get-values : $(properties) ] ; - # version-number ?= $(BOOST_VERSION) ; - # version-tag = [ MATCH "^([^.]+)[.]([^.]+)" : $(version-number[1]) ] ; - # version-tag = $(version-tag:J="_") ; - #} - - tags += $(toolset-tag:J=) ; - tags += $(thread-tag:J=) ; - tags += $(runtime-tag:J=) ; - #tags += $(version-tag) ; - - local result ; - - if $(tags) - { - result = $(name)-$(tags:J=-) ; - } - else - { - result = $(name) ; - } - return [ virtual-target.add-prefix-and-suffix $(result) : $(type) - : $(property-set) ] ; - } -} - - - From b56d2d0b55875e47aca2850b86286f7e058d96f4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 04:15:26 +0000 Subject: [PATCH 23/91] Add MinGW tag from BBv1 (mgw) when the gcc flavor indicates it's the MinGW compiler. [SVN r35715] --- v2/tools/common.jam | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index df2a7bee5..f2cef95fb 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -674,7 +674,14 @@ local rule toolset-tag ( name : type ? : property-set ) case cw : tag += cw ; case darwin* : tag += ; case edg* : tag += edg ; - case gcc* : tag += gcc ; + case gcc* : + { + switch [ $(property-set).get ] + { + case *mingw* : tag += mgw ; + case * : tag += gcc ; + } + } case intel : if [ $(property-set).get ] = win { From 79ae334778458c6a763f87ba38f6928cbb3c0148 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 15:59:10 +0000 Subject: [PATCH 24/91] Add result-equal test which passes when the expected and result have the same elements. [SVN r35718] --- v2/util/assert.jam | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/v2/util/assert.jam b/v2/util/assert.jam index 24525d998..2c526d92a 100644 --- a/v2/util/assert.jam +++ b/v2/util/assert.jam @@ -36,6 +36,35 @@ rule result ( expected * : rule-name args * : * ) } } +rule .set.equal ( set1 * : set2 * ) +{ + if ( $(set1) in $(set2) ) && ( $(set2) in $(set1) ) + { + return true ; + } +} + +# assert that EXPECTED is equal to the result of calling RULE-NAME with the +# given arguments +rule result-equal ( expected * : rule-name args * : * ) +{ + local result ; + module [ CALLER_MODULE ] + { + modules.poke assert : result + : [ $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ; + } + + if ! [ .set.equal $(result) : $(expected) ] + { + error-skip-frames 3 assertion failure: "[" $(rule-name) + [ lol->list $(args) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] + "]" + : expected: \"$(expected)\" + : got: \"$(result)\" ; + } +} + # assert that the given variable is nonempty. rule nonempty-variable ( name ) { From b420e36c09abb14f1598f2682014da4482a8286b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 16:03:22 +0000 Subject: [PATCH 25/91] Adjust unit tests to pass, to account for some results not being order-stable. [SVN r35720] --- v2/build/property.jam | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/v2/build/property.jam b/v2/build/property.jam index 3ad0cd340..981a45680 100644 --- a/v2/build/property.jam +++ b/v2/build/property.jam @@ -555,28 +555,28 @@ local rule __test__ ( ) assert.true path-order $(test-space) on on ; assert.false path-order $(test-space) on on ; - assert.result gcc off FOO + assert.result-equal gcc off FOO : refine gcc off : FOO : $(test-space) ; - assert.result gcc on + assert.result-equal gcc on : refine gcc off : on : $(test-space) ; - assert.result gcc off + assert.result-equal gcc off : refine gcc : off : $(test-space) ; - assert.result gcc off off:FOO + assert.result-equal gcc off off:FOO : refine gcc : off off:FOO : $(test-space) ; - assert.result gcc:foo gcc:bar + assert.result-equal gcc:foo gcc:bar : refine gcc:foo : gcc:bar : $(test-space) ; @@ -617,19 +617,19 @@ local rule __test__ ( ) catch "value" is not a value of an implicit feature ; - assert.result on + assert.result-equal on : remove free implicit : gcc foo on : $(test-space) ; - assert.result a + assert.result-equal a : select include : a gcc ; - assert.result a + assert.result-equal a : select include bar : a gcc ; - assert.result a gcc + assert.result-equal a gcc : select include : a gcc ; - assert.result kylix a + assert.result-equal kylix a : change gcc a : kylix ; pm = [ new property-map ] ; @@ -658,7 +658,7 @@ local rule __test__ ( ) ; # Test conditional feature - assert.result gcc,3.0 FOO + assert.result-equal gcc,3.0 FOO : split-conditional gcc,3.0:FOO ; From 6af6757f163a1884504b7d971b4083e7a5a1a5f7 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 16:32:31 +0000 Subject: [PATCH 26/91] Adjust to make test pass on Windows. [SVN r35723] --- v2/test/module-actions/bootstrap.jam | 15 +++------------ v2/test/module_actions.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/v2/test/module-actions/bootstrap.jam b/v2/test/module-actions/bootstrap.jam index b2b752d06..ff52a60d3 100644 --- a/v2/test/module-actions/bootstrap.jam +++ b/v2/test/module-actions/bootstrap.jam @@ -39,10 +39,7 @@ module A ALWAYS $(target) ; } - actions act - { - echo A.act $(<): $(X1) $(X2) $(X3) - } + actions act { echo A.act $(<): $(X1) $(X2) $(X3) } make t1 : : A.act ; make t2 : : A.act ; @@ -53,20 +50,14 @@ module B { X2 = X2-B ; - actions act - { - echo B.act $(<): $(X1) $(X2) $(X3) - } + actions act { echo B.act $(<): $(X1) $(X2) $(X3) } make t1 : : B.act ; make t2 : : B.act ; make t3 : : B.act ; } -actions act -{ - echo act $(<): $(X1) $(X2) $(X3) -} +actions act { echo act $(<): $(X1) $(X2) $(X3) } make t1 : : act ; make t2 : : act ; diff --git a/v2/test/module_actions.py b/v2/test/module_actions.py index 93e6d1ccd..f0c4315f8 100644 --- a/v2/test/module_actions.py +++ b/v2/test/module_actions.py @@ -11,15 +11,15 @@ t = Tester(pass_toolset=0) t.set_tree('module-actions') -expected = r'''A.act t1: X1-t1 -B.act t1: X1-t1 X2-B -act t1: X1-t1 X2-global X3-global -A.act t2: X1-A X2-t2 -B.act t2: X2-t2 -act t2: X1-global X2-t2 X3-global -A.act t3: X1-A X3-t3 -B.act t3: X2-B X3-t3 -act t3: X1-global X2-global X3-t3 +expected = r'''A.act t1: X1-t1 +B.act t1: X1-t1 X2-B +act t1: X1-t1 X2-global X3-global +A.act t2: X1-A X2-t2 +B.act t2: X2-t2 +act t2: X1-global X2-t2 X3-global +A.act t3: X1-A X3-t3 +B.act t3: X2-B X3-t3 +act t3: X1-global X2-global X3-t3 ''' # On Unixes, call to 'echo 1 2 3' produces '1 2 3' (note spacing) From 5e4b178fa666e97f755c462a666a1bc83d836f3f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 18:07:50 +0000 Subject: [PATCH 27/91] Output the initialized toolsets when given "--show-configuration" option. [SVN r35726] --- v2/tools/common.jam | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index f2cef95fb..35fe34615 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -22,6 +22,10 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] { .debug-configuration = true ; } +if [ MATCH (--show-configuration) : [ modules.peek : ARGV ] ] +{ + .show-configuration = true ; +} # Configurations # @@ -212,6 +216,10 @@ rule check-init-parameters ( toolset : * ) .all-signatures += $(sig) ; .init-loc.$(sig) = [ errors.nearest-user-location ] ; + if $(.show-configuration) + { + ECHO notice: $(condition) ; + } return $(condition) ; } From 177744f40de0fefb6d67712fe86b907c1b0cda55 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 23:25:19 +0000 Subject: [PATCH 28/91] A variety of changes to make most tests pass on Windows (with mingw): * BoostBuild.py; Make the matching of content and files be more loose and use pattern globbing of toolset names. * glob.py/project_glob.py; Rename to avoid collision with builtin Python module. * all; Update copyrights and license info. [SVN r35729] --- v2/test/BoostBuild.py | 61 ++++++++++++++++++++------ v2/test/project-test3/project-root.jam | 12 +++-- v2/test/{glob.py => project_glob.py} | 8 ++-- v2/test/regression.py | 10 ++--- v2/test/test_all.py | 9 +++- 5 files changed, 73 insertions(+), 27 deletions(-) rename v2/test/{glob.py => project_glob.py} (87%) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 2aa2822f2..2e7c10ad8 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -1,16 +1,23 @@ +# Copyright 2002-2005 Vladimir Prus. +# Copyright 2002-2003 Dave Abrahams. +# Copyright 2006 Rene Rivera. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) import TestCmd from tree import build_tree, trees_difference import copy import fnmatch +import glob import os +import re import shutil import string import types import time import tempfile import sys -import re def get_toolset(): toolset = None; @@ -39,6 +46,17 @@ def prepare_suffix_map(toolset): if os.__dict__.has_key('uname') and os.uname()[0] == 'Darwin': suffixes['.dll'] = '.dylib' +def re_remove(sequence,regex): + me = re.compile(regex) + result = filter( lambda x: me.match(x), sequence ) + for r in result: + sequence.remove(r) + +def glob_remove(sequence,pattern): + result = fnmatch.filter(sequence,pattern) + for r in result: + sequence.remove(r) + lib_prefix = 1 if windows: lib_prefix = 0 @@ -255,10 +273,13 @@ class Tester(TestCmd.TestCmd): os.chdir(self.original_workdir) for name in names: n = self.native_file_name(name) - if os.path.isdir(n): - shutil.rmtree(n, ignore_errors=0) - else: - os.unlink(n) + n = glob.glob(n) + if n: + n = n[0] + if os.path.isdir(n): + shutil.rmtree(n, ignore_errors=0) + else: + os.unlink(n) # Create working dir root again, in case # we've removed it @@ -358,10 +379,10 @@ class Tester(TestCmd.TestCmd): self.last_build_time = time.time() def read(self, name): - return open(self.native_file_name(name), "rb").read() + return open(glob.glob(self.native_file_name(name))[0], "rb").read() def read_and_strip(self, name): - lines = open(self.native_file_name(name), "rb").readlines() + lines = open(glob.glob(self.native_file_name(name))[0], "rb").readlines() result = string.join(map(string.rstrip, lines), "\n") if lines and lines[-1][-1] == '\n': return result + '\n' @@ -399,7 +420,7 @@ class Tester(TestCmd.TestCmd): def expect_addition(self, names): for name in self.adjust_names(names): try: - self.unexpected_difference.added_files.remove(name) + glob_remove(self.unexpected_difference.added_files,name) except: print "File %s not added as expected" % (name,) self.fail_test(1) @@ -410,7 +431,7 @@ class Tester(TestCmd.TestCmd): def expect_removal(self, names): for name in self.adjust_names(names): try: - self.unexpected_difference.removed_files.remove(name) + glob_remove(self.unexpected_difference.removed_files,name) except: print "File %s not removed as expected" % (name,) self.fail_test(1) @@ -443,7 +464,7 @@ class Tester(TestCmd.TestCmd): while filesets: try: - filesets[-1].remove(name) + glob_remove(filesets[-1],name) break except ValueError: filesets.pop() @@ -509,9 +530,23 @@ class Tester(TestCmd.TestCmd): print "Note: could not open file", name self.fail_test(1) - content = string.replace(content, "$toolset", self.toolset) + content = string.replace(content, "$toolset", self.toolset+"*") + + if exact: + matched = fnmatch.fnmatch(actual,content) + else: + actual_ = map(lambda x: sorted(x.split()),actual.splitlines()) + content_ = map(lambda x: sorted(x.split()),content.splitlines()) + matched = map( + lambda x,y: map(lambda n,p: fnmatch.fnmatch(n,p),x,y), + actual_, content_ ) + matched = reduce( + lambda x,y: x and reduce( + lambda a,b: a and b, + y ), + matched ) - if actual != content: + if not matched: print "Expected:\n" print content print "Got:\n" @@ -596,7 +631,7 @@ class Tester(TestCmd.TestCmd): names = [names] r = map(self.adjust_lib_name, names) r = map(self.adjust_suffix, r) - r = map(lambda x, t=self.toolset: string.replace(x, "$toolset", t), r) + r = map(lambda x, t=self.toolset: string.replace(x, "$toolset", t+"*"), r) return r def native_file_name(self, name): diff --git a/v2/test/project-test3/project-root.jam b/v2/test/project-test3/project-root.jam index b660ceb52..8de43be51 100644 --- a/v2/test/project-test3/project-root.jam +++ b/v2/test/project-test3/project-root.jam @@ -1,3 +1,7 @@ +# Copyright 2002-2005 Vladimir Prus. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) import gcc ; import property ; @@ -7,10 +11,10 @@ rule properties-as-path ( properties * ) local r ; for local p in $(properties) { - if $(p:G) != - { - r += $(p) ; - } + if $(p:G) != + { + r += $(p) ; + } } return [ property.as-path [ property.remove incidental : $(r) ] ] ; diff --git a/v2/test/glob.py b/v2/test/project_glob.py similarity index 87% rename from v2/test/glob.py rename to v2/test/project_glob.py index 768c59a51..412bf77db 100644 --- a/v2/test/glob.py +++ b/v2/test/project_glob.py @@ -1,9 +1,9 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright (C) Vladimir Prus 2003. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) # Test the 'glob' rule in Jamfile context. from BoostBuild import Tester, List diff --git a/v2/test/regression.py b/v2/test/regression.py index 50a0ab477..d090314d7 100644 --- a/v2/test/regression.py +++ b/v2/test/regression.py @@ -1,9 +1,9 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright (C) Vladimir Prus 2003. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) # Test for the regression testing framework. from BoostBuild import Tester, List @@ -74,7 +74,7 @@ t.expect_addition("bin/r-f.test/$toolset/debug/r-f.test") # Make sure args are handled. t.expect_content("bin/r.test/$toolset/debug/r.output", - "foo\nbar\n\nEXIT STATUS: 0\n") + "foo\nbar\n\nEXIT STATUS: 0\n",True) # Test that input file is handled as well. t.write("r.cpp", """ diff --git a/v2/test/test_all.py b/v2/test/test_all.py index e89e10594..1ded06fee 100644 --- a/v2/test/test_all.py +++ b/v2/test/test_all.py @@ -1,4 +1,11 @@ #!/usr/bin/python + +# Copyright 2002-2005 Dave Abrahams. +# Copyright 2002-2006 Vladimir Prus. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + import os, sys, string from BoostBuild import get_toolset @@ -112,7 +119,7 @@ tests = [ "rebuilds", "suffix", "inherit_toolset", "skipping", - "glob", + "project_glob", "project_root_constants", "double_loading", "dll_path", From 840439f061a4962d74e0c37894411319b083bee2 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 23:43:08 +0000 Subject: [PATCH 29/91] Add detection of gcc compiler flavor so that we can correctly tag generated libraries to not conflict with each other. [SVN r35733] --- v2/tools/gcc.jam | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index f72b33723..779a8eeec 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -20,6 +20,7 @@ import common ; import errors ; import property-set ; import pch ; +import regex ; if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] { @@ -56,10 +57,45 @@ import rc ; # using gcc : 3.4 : : foo bar sun ; rule init ( version ? : command * : options * ) { - local condition = [ common.check-init-parameters gcc : version $(version) ] ; - + # Information about the gcc command... + # The command. local command = [ common.get-invocation-command gcc : g++ : $(command) ] ; + # The root directory of the tool install. + local root = [ feature.get-values : $(options) ] ; + # The bin directory where to find the command to execute. + local bin ; + # The flavor of compiler. + local flavor = [ feature.get-values : $(options) ] ; + # AUtodetect the root and bin dir if not given. + if $(command) + { + bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ; + root ?= $(bin:D) ; + } + # Autodetect the version and flavor if not given. + if $(bin) + { + local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" + : [ SHELL "$(bin)/gcc --version" ] ] ; + version ?= $(command-info[1]) ; + flavor ?= [ regex.replace $(command-info[2]:L) "[ .-:]" "_" ] ; + } + local condition ; + if $(flavor) + { + condition = [ common.check-init-parameters gcc + : version $(version) + : flavor $(flavor) + ] ; + } + else + { + condition = [ common.check-init-parameters gcc + : version $(version) + ] ; + } + common.handle-options gcc : $(condition) : $(command) : $(options) ; local linker = [ feature.get-values : $(options) ] ; @@ -76,13 +112,6 @@ rule init ( version ? : command * : options * ) } init-link-flags gcc $(linker) $(condition) ; - local root = [ feature.get-values : $(options) ] ; - local bin ; - if $(command) - { - bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ; - root ?= $(bin:D) ; - } # If gcc is installed in non-standard location, we'd need to # add LD_LIBRARY_PATH when running programs created with it From 4c423da9b66b7709669ff70cb24bda9333077207 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Oct 2006 12:51:05 +0000 Subject: [PATCH 30/91] Use the passed in command instead of a fixed one to account for custom and versioned commands. Thanks to Jurge Hunold for the report/patch. [SVN r35741] --- v2/tools/gcc.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 779a8eeec..e8e21e115 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -76,7 +76,7 @@ rule init ( version ? : command * : options * ) if $(bin) { local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" - : [ SHELL "$(bin)/gcc --version" ] ] ; + : [ SHELL "$(command) --version" ] ] ; version ?= $(command-info[1]) ; flavor ?= [ regex.replace $(command-info[2]:L) "[ .-:]" "_" ] ; } From 94e2af7680f1a94fbc487b83a18da7994fa4fbc0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Oct 2006 14:25:05 +0000 Subject: [PATCH 31/91] Fix guard for autodetect of command version and flavor. [SVN r35743] --- v2/tools/gcc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index e8e21e115..f903a920e 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -66,14 +66,14 @@ rule init ( version ? : command * : options * ) local bin ; # The flavor of compiler. local flavor = [ feature.get-values : $(options) ] ; - # AUtodetect the root and bin dir if not given. + # Autodetect the root and bin dir if not given. if $(command) { bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ; root ?= $(bin:D) ; } # Autodetect the version and flavor if not given. - if $(bin) + if $(command) { local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" : [ SHELL "$(command) --version" ] ] ; From ebab11cba0a16759c66b1eef55f8ea4cfcdf824b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Oct 2006 19:43:35 +0000 Subject: [PATCH 32/91] Limit the flavor to certain toolsets. For now only MinGW. [SVN r35745] --- v2/tools/gcc.jam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index f903a920e..d767436d6 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -78,7 +78,10 @@ rule init ( version ? : command * : options * ) local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" : [ SHELL "$(command) --version" ] ] ; version ?= $(command-info[1]) ; - flavor ?= [ regex.replace $(command-info[2]:L) "[ .-:]" "_" ] ; + switch $(command-info[2]:L) + { + case *mingw* : flavor ?= mingw ; + } } local condition ; From ad5521485b0050d6fd4611ce97dd3ab0d65fe52f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 26 Oct 2006 09:10:55 +0000 Subject: [PATCH 33/91] Unbreak compile.c++.pch: Use -TP not -TC [SVN r35750] --- v2/tools/msvc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index 5d51d4292..a629853d9 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -725,8 +725,8 @@ rule compile.c.pch ( targets + : sources * : properties * ) rule compile.c++.pch ( targets + : sources * : properties * ) { - get-rspline $(targets[1]) : -TC ; - get-rspline $(targets[2]) : -TC ; + get-rspline $(targets[1]) : -TP ; + get-rspline $(targets[2]) : -TP ; local pch-source = [ on $(<) return $(PCH_SOURCE) ] ; if $(pch-source) { From 025df84f89befee2eccd24bb3aa5304d7550b10a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 28 Oct 2006 15:22:17 +0000 Subject: [PATCH 34/91] Restore BBv1 install functionality of installing to c:/Boost by default. [SVN r35761] --- v2/tools/package.jam | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v2/tools/package.jam b/v2/tools/package.jam index e44f851bf..1bbf4a42d 100644 --- a/v2/tools/package.jam +++ b/v2/tools/package.jam @@ -1,4 +1,5 @@ # Copyright (c) 2005 Vladimir Prus. +# Copyright 2006 Rene Rivera. # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE_1_0.txt or @@ -53,9 +54,11 @@ rule install ( name : requirements * : binaries * : libraries * : headers * ) install-header-subdir ?= "" ; requirements = [ property.change $(requirements) : ] ; - # First, figure out all locations. - local prefix = [ option.get prefix : "" ] ; - + # First, figure out all locations. Use the default if no prefix option given. + local prefix = [ option.get prefix : + [ property.select : $(requirements) ] ] ; + requirements = [ property.change $(requirements) : ] ; + # Or some likely defaults if neither is given. if ! $(prefix) { if [ modules.peek : NT ] { prefix = C:\\$(name) ; } From 516aea6e37f0923143ffa454723972192de70ce6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 28 Oct 2006 19:23:12 +0000 Subject: [PATCH 35/91] Ugly trick to handle like in V1 [SVN r35769] --- v2/tools/common.jam | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index 35fe34615..2e188742b 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -762,8 +762,19 @@ local rule runtime-tag ( name : type ? : property-set ) local properties = [ $(property-set).raw ] ; if static in $(properties) { tag += s ; } - if on in $(properties) { tag += g ; } + # This is ugly thing. In V1, there's a code to automatically + # detect which properties affect a target. So, if + # does not affect gcc toolset, the + # tag rules won't even see . + # Similar functionality in V2 is not implemented yet, so we just + # check for toolsets which are know to care about runtime debug + if msvc in $(properties) + || stlport in $(properties) + { + if on in $(properties) { tag += g ; } + } + if debug-python in $(properties) { tag += y ; } if debug in $(properties) { tag += d ; } if stlport in $(properties) { tag += p ; } From 6a27d761b6f0988fdf96a435ec1a509244e255eb Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 30 Oct 2006 08:35:33 +0000 Subject: [PATCH 36/91] Unbreak multi-element gcc commands [SVN r35791] --- v2/tools/gcc.jam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index d767436d6..1870e6827 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -75,8 +75,11 @@ rule init ( version ? : command * : options * ) # Autodetect the version and flavor if not given. if $(command) { + # The 'command' variable can have multiple-element. When calling + # the SHELL builtin we need a single string. + local command-string = $(command:J=" ") ; local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" - : [ SHELL "$(command) --version" ] ] ; + : [ SHELL "$(command-string) --version" ] ] ; version ?= $(command-info[1]) ; switch $(command-info[2]:L) { From 1e5ec85587414a38727b33e517b7f80d87dd372c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Hunold?= Date: Thu, 2 Nov 2006 15:15:07 +0000 Subject: [PATCH 37/91] Upgrade to Qt-4.2: - Add support for QtDBus library. - Adjust to changes in Qt's build system: No parallel build of debug and release libraries on Unix anymore. - Remove explicit "release" requirements for release builds, enabling custom build variants. [SVN r35809] --- v2/tools/qt4.jam | 172 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 119 insertions(+), 53 deletions(-) diff --git a/v2/tools/qt4.jam b/v2/tools/qt4.jam index 7b3baa4fb..7da33dc20 100644 --- a/v2/tools/qt4.jam +++ b/v2/tools/qt4.jam @@ -114,7 +114,7 @@ rule init ( prefix ) if [ glob $(.prefix)/Jamroot ] { # Import all Qt Modules - local all-libraries = QtCore QtGui QtNetwork QtXml QtSql QtSvg QtOpenGL Qt3Support QtTest QtAssistantClient QtDesigner QtUiTools ; + local all-libraries = QtCore QtGui QtNetwork QtXml QtSql QtSvg QtOpenGL Qt3Support QtTest QtAssistantClient QtDesigner QtUiTools QtDBus ; for local l in $(all-libraries) { alias $(l) @@ -144,20 +144,32 @@ rule init ( prefix ) # Also, on NT we must link against qtmain library (for WinMain) suffix_version = "4" ; suffix_debug = "d" ; - lib qtmain : : qtmain$(suffix_debug) debug ; - lib qtmain : : qtmain release ; + lib qtmain + : # sources + : # requirements + qtmain$(suffix_debug) + debug + ; + + lib qtmain + : # sources + : # requirements + qtmain + ; main = qtmain ; } else { - # On X11, debug versions of libs have "_debug" suffix + # Since Qt-4.2, debug versions on unix have to be built separately + # and therefore have no suffix. suffix_version = "" ; - suffix_debug = "_debug" ; + suffix_debug = "" ; } lib QtCore : $(main) - : QtCore$(suffix_version) release - : + : # requirements + QtCore$(suffix_version) + : # default-build : # usage-requirements QT_CORE_LIB QT_NO_DEBUG @@ -165,8 +177,10 @@ rule init ( prefix ) $(usage-requirements) ; lib QtCore : $(main) - : QtCore$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtCore$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_CORE_LIB $(.prefix)/include/QtCore @@ -174,8 +188,9 @@ rule init ( prefix ) ; lib QtGui : QtCore - : QtGui$(suffix_version) release - : + : # requirements + QtGui$(suffix_version) + : # default-build : # usage-requirements QT_GUI_LIB $(.prefix)/include/QtGui @@ -183,8 +198,10 @@ rule init ( prefix ) ; lib QtGui : QtCore - : QtGui$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtGui$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_GUI_LIB $(.prefix)/include/QtGui @@ -192,53 +209,64 @@ rule init ( prefix ) ; lib QtNetwork : QtCore - : QtNetwork$(suffix_version) release - : + : # requirements + QtNetwork$(suffix_version) + : # default-build : # usage-requirements QT_NETWORK_LIB $(.prefix)/include/QtNetwork ; lib QtNetwork : QtCore - : QtNetwork$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtNetwork$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_NETWORK_LIB $(.prefix)/include/QtNetwork ; lib QtSql : QtCore - : QtSql$(suffix_version) release - : + : # requirements + QtSql$(suffix_version) + : # default-build : # usage-requirements QT_SQL_LIB $(.prefix)/include/QtSql ; lib QtSql : QtCore - : QtSql$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtSql$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_SQL_LIB $(.prefix)/include/QtSql ; lib QtXml : QtCore - : QtXml$(suffix_version) release - : + : # requirements + QtXml$(suffix_version) + : # default-build : # usage-requirements QT_XML_LIB $(.prefix)/include/QtXml ; lib QtXml : QtCore - : QtXml$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtXml$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_XML_LIB $(.prefix)/include/QtXml ; lib Qt3Support : QtGui QtNetwork QtXml QtSql - : Qt3Support$(suffix_version) release on - : + : # requirements + Qt3Support$(suffix_version) + on + : # default-build : # usage-requirements QT_QT3SUPPORT_LIB QT3_SUPPORT @@ -246,8 +274,11 @@ rule init ( prefix ) ; lib Qt3Support : QtGui QtNetwork QtXml QtSql - : Qt3Support$(suffix_debug)$(suffix_version) debug on - : + : # requirements + Qt3Support$(suffix_debug)$(suffix_version) + on + debug + : # default-build : # usage-requirements QT_QT3SUPPORT_LIB QT3_SUPPORT @@ -260,15 +291,18 @@ rule init ( prefix ) # OpenGl Support lib QtOpenGL : QtGui - : QtOpenGL$(suffix_version) release - : + : # requirements + QtOpenGL$(suffix_version) + : # default-build : # usage-requirements QT_OPENGL_LIB $(.prefix)/include/QtOpenGL ; lib QtOpenGL : QtGui - : QtOpenGL$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtOpenGL$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_OPENGL_LIB $(.prefix)/include/QtOpenGL @@ -276,15 +310,18 @@ rule init ( prefix ) # SVG-Support (Qt 4.1) lib QtSvg : QtXml QtOpenGL - : QtSvg$(suffix_version) release - : + : # requirements + QtSvg$(suffix_version) + : # default-build : # usage-requirements QT_SVG_LIB $(.prefix)/include/QtSvg ; lib QtSvg : QtXml QtOpenGL - : QtSvg$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtSvg$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements QT_SVG_LIB $(.prefix)/include/QtSvg @@ -292,60 +329,89 @@ rule init ( prefix ) # Test-Support (Qt 4.1) lib QtTest : QtCore - : QtTest$(suffix_version) release - : + : # requirements + QtTest$(suffix_version) + : # default-build : # usage-requirements $(.prefix)/include/QtTest ; lib QtTest : QtCore - : QtTest$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtTest$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements $(.prefix)/include/QtTest ; # AssistantClient Support lib QtAssistantClient : QtGui - : QtAssistantClient$(suffix_version) release - : + : # requirements + QtAssistantClient$(suffix_version) + : # default-build : # usage-requirements $(.prefix)/include/QtAssistant ; lib QtAssistantClient : QtGui - : QtAssistantClient$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtAssistantClient$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements $(.prefix)/include/QtAssistant ; # Qt designer library lib QtDesigner : QtGui QtXml - : QtDesigner$(suffix_version) release - : + : # requirements + QtDesigner$(suffix_version) + : # default-build : # usage-requirements $(.prefix)/include/QtDesigner ; lib QtDesigner : QtGui QtXml - : QtDesigner$(suffix_debug)$(suffix_version) debug - : + : # requirements + QtDesigner$(suffix_debug)$(suffix_version) + debug + : # default-build : # usage-requirements $(.prefix)/include/QtDesigner ; # Support for dynamic Widgets (Qt 4.1) lib QtUiTools : QtGui QtXml - : QtUiTools release - : + : # requirements + QtUiTools + : # default-build : # usage-requirements $(.prefix)/include/QtUiTools ; lib QtUiTools : QtGui QtXml - : QtUiTools$(suffix_debug) debug - : + : # requirements + QtUiTools$(suffix_debug) + debug + : # default-build : # usage-requirements $(.prefix)/include/QtUiTools ; + + # DBus-Support (Qt 4.2) + lib QtDBus : QtXml + : # requirements + QtDBus$(suffix_version) + : # default-build + : # usage-requirements + $(.prefix)/include/QtDBus + ; + lib QtDBus : QtXml + : # requirements + QtDBus$(suffix_debug)$(suffix_version) + debug + : # default-build + : # usage-requirements + $(.prefix)/include/QtDBus + ; } } From 1787e35156a7a5e2f4dea1734c02d2102cc9ae43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Hunold?= Date: Fri, 3 Nov 2006 07:54:52 +0000 Subject: [PATCH 38/91] Fix: enable "_debug" suffix for OSX again. [SVN r35820] --- v2/tools/qt4.jam | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v2/tools/qt4.jam b/v2/tools/qt4.jam index 7da33dc20..020456f25 100644 --- a/v2/tools/qt4.jam +++ b/v2/tools/qt4.jam @@ -158,6 +158,12 @@ rule init ( prefix ) ; main = qtmain ; } + else if [ os.name ] = MACOSX + { + # On MacOS X, both debug and release libraries are available. + suffix_version = "" ; + suffix_debug = "_debug" ; + } else { # Since Qt-4.2, debug versions on unix have to be built separately From b4a2b1fa2a908643aa26af3b693c42f44d92cc71 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 4 Nov 2006 17:37:35 +0000 Subject: [PATCH 39/91] Improve PCH example [SVN r35837] --- v2/example/pch/include/pch.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v2/example/pch/include/pch.hpp b/v2/example/pch/include/pch.hpp index 22df8443f..8f05cc43d 100644 --- a/v2/example/pch/include/pch.hpp +++ b/v2/example/pch/include/pch.hpp @@ -5,7 +5,15 @@ http://www.boost.org/LICENSE_1_0.txt) */ +#ifdef BOOST_BUILD_PCH_ENABLED + +#ifdef FOO2 +int bar(); +#endif + class TestClass { public: TestClass(int, int) {} }; + +#endif From 0f4e7d29c21e23df1705c768b3d2b2dae72eb74d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 4 Nov 2006 18:36:02 +0000 Subject: [PATCH 40/91] More docs [SVN r35839] --- v2/doc/src/advanced.xml | 28 +++++++++++++++ v2/doc/src/tasks.xml | 79 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/v2/doc/src/advanced.xml b/v2/doc/src/advanced.xml index ac7fb615c..b6377858c 100644 --- a/v2/doc/src/advanced.xml +++ b/v2/doc/src/advanced.xml @@ -766,6 +766,34 @@ rule my-rule ( properties * ) requirements can be easier to write and understand. + Requirements explicitly specified for a target are usually + combined with the requirements specified for the containing project. You + can cause a target to completely ignore specific project's requirement + using the syntax by adding minus sign before a property, for example: + +exe main : main.cpp : -<define>UNNECESSARY_DEFINE ; + + This syntax is the only way to ignore free properties from parent, + such as defines. It can be also useful for ordinary properties. Consider + this example: + +project test : requirements <threading;>multi ; +exe test1 : test1.cpp ; +exe test2 : test2.cpp : <threading;>single ; +exe test3 : test3.cpp : -<threading;>multi ; + + Here, test1 inherits project requirements and will always + be built in multi-threaded mode. The test2 target + overrides project's requirements and will + always be built in single-threaded mode. In contrast, the + test3 target removes a property + from project requirements and will be built either in single-threaded or + multi-threaded mode depending on which variant is requested by the + user. + + Note that removing of requirements is completely textual: + you need to specify exactly the same property to remove it. +
diff --git a/v2/doc/src/tasks.xml b/v2/doc/src/tasks.xml index d92ec2ebf..f9e6e444f 100644 --- a/v2/doc/src/tasks.xml +++ b/v2/doc/src/tasks.xml @@ -458,6 +458,63 @@ actions echo
+
+ Precompiled headers + + Precompiled headers is a mechanism to speed up compilation + by creating a partially processed version of some header files, + and then using that version during compilations rather then + repeatedly parsing the original headers. Boost.Build supports + precompiled headers with gcc and msvc toolsets. + + To use precompiled headers, follow these steps: + + Create a header that includes big headers used by your project. + It's better to include only headers that are sufficiently stable — + like headers from the compiler, and external libraries. Please wrap + the header in #ifdef BOOST_BUILD_PCH_ENABLED, so that + the potentially expensive inclusion of headers is not done + when PCH is not enabled. Include the new header at the top of your + source files. + + Declare new Boost.Build target for the precompiled header + and add that precompiled header to sources of the target whose compilation + you want to speed up: + +cpp-pch pch : header.hpp ; +exe main : main.cpp pch ; + You can use the c-pch if you want to use the precompiled + header in C programs. + + + + The pch example in Boost.Build distribution + can be used as reference. + + Please note the following: + + The inclusion of the precompiled header must be the + first thing in a source file, before any code or preprocessor directives. + + + The build properties used to build the sources and the + preprocessed must be the same. Consider using project requirements to + assure this. + + + Precompiled headers must be used purely as a way to + improve compilation time, not to save the number of include statements. + If a source file needs to include some header, explicitly include + it in the source file, even if the same header is included from + the precompiled header. This makes sure that your project will build + even if precompiled headers are not supported. + + + + +
+ +
Generated headers @@ -720,7 +777,29 @@ exe app : app.cpp : <implicit-dependency>parser ; + tag + The tag feature is used to customize + the name of the generated files. The value should have the form: +@rulename where + rulename should be a name of a rule with + the following signature: +rule tag ( name : type ? : property-set ) + The rule will be called for each target with the default name computed + by Boost.Build, the type of the target, and property set. The rule + can either return a string that must be used as the name of the + target, or empty string, in which case the default name will be used. + + + Most typical use of the tag feature is + to encode build properties, or library version in library target names. + You should take care to return non-empty string from the tag rule + only for types you care about — otherwise, you might + end up modifying names of object files, generated header file and + other targets for which changing names does not make sense. + + + From d3b9f49f782f0a2feed7778848d4af74bc7b338d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 00:06:35 +0000 Subject: [PATCH 41/91] Add "--default-bjam" option to force using bjam present in the system (ie the search path). [SVN r35845] --- v2/test/BoostBuild.py | 113 ++++++++++++++++++++++-------------------- v2/test/TestCmd.py | 18 +++++-- 2 files changed, 74 insertions(+), 57 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 2e7c10ad8..a1aff2cba 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -110,73 +110,77 @@ class Tester(TestCmd.TestCmd): self.toolset = get_toolset() self.pass_toolset = pass_toolset - + prepare_suffix_map(pass_toolset and self.toolset or 'gcc') - jam_build_dir = "" - if os.name == 'nt': - jam_build_dir = "bin.ntx86" - elif os.name == 'posix' and os.__dict__.has_key('uname'): - if os.uname()[0].lower().startswith('cygwin'): - jam_build_dir = "bin.cygwinx86" - if 'TMP' in os.environ and os.environ['TMP'].find('~') != -1: - print 'Setting $TMP to /tmp to get around problem with short path names' - os.environ['TMP'] = '/tmp' - elif os.uname()[0] == 'Linux': - cpu = os.uname()[4] - if re.match("i.86", cpu): - jam_build_dir = "bin.linuxx86"; + if not '--default-bjam' in sys.argv: + jam_build_dir = "" + if os.name == 'nt': + jam_build_dir = "bin.ntx86" + elif os.name == 'posix' and os.__dict__.has_key('uname'): + if os.uname()[0].lower().startswith('cygwin'): + jam_build_dir = "bin.cygwinx86" + if 'TMP' in os.environ and os.environ['TMP'].find('~') != -1: + print 'Setting $TMP to /tmp to get around problem with short path names' + os.environ['TMP'] = '/tmp' + elif os.uname()[0] == 'Linux': + cpu = os.uname()[4] + if re.match("i.86", cpu): + jam_build_dir = "bin.linuxx86"; + else: + jam_build_dir = "bin.linux" + os.uname()[4] + elif os.uname()[0] == 'SunOS': + jam_build_dir = "bin.solaris" + elif os.uname()[0] == 'Darwin': + jam_build_dir = "bin.macosxppc" + elif os.uname()[0] == "AIX": + jam_build_dir = "bin.aix" + elif os.uname()[0] == "IRIX64": + jam_build_dir = "bin.irix" + elif os.uname()[0] == "FreeBSD": + jam_build_dir = "bin.freebsd" + elif os.uname()[0] == "OSF1": + jam_build_dir = "bin.osf" else: - jam_build_dir = "bin.linux" + os.uname()[4] - elif os.uname()[0] == 'SunOS': - jam_build_dir = "bin.solaris" - elif os.uname()[0] == 'Darwin': - jam_build_dir = "bin.macosxppc" - elif os.uname()[0] == "AIX": - jam_build_dir = "bin.aix" - elif os.uname()[0] == "IRIX64": - jam_build_dir = "bin.irix" - elif os.uname()[0] == "FreeBSD": - jam_build_dir = "bin.freebsd" - elif os.uname()[0] == "OSF1": - jam_build_dir = "bin.osf" + raise "Don't know directory where jam is build for this system: " + os.name + "/" + os.uname()[0] else: - raise "Don't know directory where jam is build for this system: " + os.name + "/" + os.uname()[0] - else: - raise "Don't know directory where jam is build for this system: " + os.name + raise "Don't know directory where jam is build for this system: " + os.name - if boost_build_path is None: - boost_build_path = self.original_workdir - + # Find there jam_src is located. + # try for the debug version if it's lying around + + dirs = [os.path.join('../../../jam/src', jam_build_dir + '.debug'), + os.path.join('../../../jam/src', jam_build_dir), + os.path.join('../../jam_src', jam_build_dir + '.debug'), + os.path.join('../../jam_src', jam_build_dir), + os.path.join('../jam_src', jam_build_dir + '.debug'), + os.path.join('../jam_src', jam_build_dir), + ] + + for d in dirs: + if os.path.exists(d): + jam_build_dir = d + break + else: + print "Cannot find built Boost.Jam" + os.exit(1) verbosity = ['-d0', '--quiet'] if '--verbose' in sys.argv: keywords['verbose'] = 1 verbosity = ['-d+2'] + if boost_build_path is None: + boost_build_path = self.original_workdir + program_list = [] - - # Find there jam_src is located. - # try for the debug version if it's lying around - - dirs = [os.path.join('../../../jam/src', jam_build_dir + '.debug'), - os.path.join('../../../jam/src', jam_build_dir), - os.path.join('../../jam_src', jam_build_dir + '.debug'), - os.path.join('../../jam_src', jam_build_dir), - os.path.join('../jam_src', jam_build_dir + '.debug'), - os.path.join('../jam_src', jam_build_dir), - ] - - for d in dirs: - if os.path.exists(d): - jam_build_dir = d - break - else: - print "Cannot find built Boost.Jam" - os.exit(1) - - program_list.append(os.path.join(jam_build_dir, executable)) + if '--default-bjam' in sys.argv: + program_list.append(executable) + inpath_bjam = True + else: + program_list.append(os.path.join(jam_build_dir, executable)) + inpath_bjam = None program_list.append('-sBOOST_BUILD_PATH=' + boost_build_path) if verbosity: program_list += verbosity @@ -188,6 +192,7 @@ class Tester(TestCmd.TestCmd): , program=program_list , match=match , workdir = workdir + , inpath = inpath_bjam , **keywords) os.chdir(self.workdir) diff --git a/v2/test/TestCmd.py b/v2/test/TestCmd.py index 6ccafc911..6096e7122 100644 --- a/v2/test/TestCmd.py +++ b/v2/test/TestCmd.py @@ -41,6 +41,14 @@ or incorrect permissions). # AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +# Copyright 2002-2003 Vladimir Prus. +# Copyright 2002-2003 Dave Abrahams. +# Copyright 2006 Rene Rivera. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + from string import join, split __author__ = "Steven Knight " @@ -198,10 +206,14 @@ class TestCmd: workdir = None, subdir = None, verbose = 0, - match = None): + match = None, + inpath = None): self._cwd = os.getcwd() self.description_set(description) - self.program_set(program) + if inpath: + self.program = program + else: + self.program_set(program) self.interpreter_set(interpreter) self.verbose_set(verbose) if not match is None: @@ -392,7 +404,7 @@ class TestCmd: os.chdir(chdir) cmd = [] if program and program[0]: - if not os.path.isabs(program[0]): + if program[0] != self.program[0] and not os.path.isabs(program[0]): program[0] = os.path.join(self._cwd, program[0]) cmd += program # if interpreter: From d81505d014e6999af295fd78de92a79a666303f5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 06:24:05 +0000 Subject: [PATCH 42/91] Add copyrights+license (with help of a shell script). [SVN r35848] --- v2/boost-build.jam | 6 ++++++ v2/boost.css | 4 ++++ v2/build-system.jam | 10 +++++----- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/v2/boost-build.jam b/v2/boost-build.jam index 99ebee345..73db0497b 100644 --- a/v2/boost-build.jam +++ b/v2/boost-build.jam @@ -1,2 +1,8 @@ +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2002 Rene Rivera +# Copyright 2003 Vladimir Prus +# 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) + boost-build kernel ; diff --git a/v2/boost.css b/v2/boost.css index cf5c8a97f..8401b29c3 100644 --- a/v2/boost.css +++ b/v2/boost.css @@ -1,3 +1,7 @@ +/* Copyright 2002 Dave 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) */ + H1 { FONT-SIZE: 200% diff --git a/v2/build-system.jam b/v2/build-system.jam index e327d0b48..51f253bcd 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -1,8 +1,8 @@ -# (C) Copyright David Abrahams 2001-2003. 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. +# Copyright 2003, 2005 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # This file is part of Boost.Build version 2. You can think of it as # forming the main() routine. It is invoked by the bootstrapping code From 07da99458a00199147c9d79664d371a0fc80c07a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 06:40:20 +0000 Subject: [PATCH 43/91] Add/update copyrights+license (with help of a shell script). [SVN r35849] --- v2/build/alias.jam | 7 +++---- v2/build/feature.jam | 9 +++++---- v2/build/project.jam | 10 +++++----- v2/build/property-set.jam | 8 ++++---- v2/build/property.jam | 9 +++++---- v2/build/scanner.jam | 8 ++++---- v2/build/toolset.jam | 9 +++++---- v2/build/type.jam | 8 ++++---- v2/build/version.jam | 7 +++---- v2/build/virtual-target.jam | 9 +++++---- 10 files changed, 43 insertions(+), 41 deletions(-) diff --git a/v2/build/alias.jam b/v2/build/alias.jam index d7d68a376..993243b03 100644 --- a/v2/build/alias.jam +++ b/v2/build/alias.jam @@ -1,7 +1,6 @@ -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004, 2006 Vladimir Prus +# 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) # This module defines the 'alias' rule and associated class. # diff --git a/v2/build/feature.jam b/v2/build/feature.jam index e6ad37f35..b9b9e8822 100644 --- a/v2/build/feature.jam +++ b/v2/build/feature.jam @@ -1,7 +1,8 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2002, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) import "class" : * ; diff --git a/v2/build/project.jam b/v2/build/project.jam index 9041a2ade..f37161f88 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -1,8 +1,8 @@ -# Copyright (C) Vladimir Prus and Rene Rivera 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. +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2005, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Implements project representation and loading. # Each project is represented by diff --git a/v2/build/property-set.jam b/v2/build/property-set.jam index 00e8383e6..bed3b4b4f 100644 --- a/v2/build/property-set.jam +++ b/v2/build/property-set.jam @@ -1,7 +1,7 @@ -# Copyright (C) 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. +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) import "class" : new ; import feature ; diff --git a/v2/build/property.jam b/v2/build/property.jam index 981a45680..21b4e389b 100644 --- a/v2/build/property.jam +++ b/v2/build/property.jam @@ -1,7 +1,8 @@ -# Copyright (C) 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. +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) import utility : ungrist ; import sequence : unique ; diff --git a/v2/build/scanner.jam b/v2/build/scanner.jam index b070f0fa5..2dae65d29 100644 --- a/v2/build/scanner.jam +++ b/v2/build/scanner.jam @@ -1,7 +1,7 @@ -# Copyright (C) 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. +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) # Implements scanners: objects that compute implicit dependencies for # files, such as includes in C++. diff --git a/v2/build/toolset.jam b/v2/build/toolset.jam index db94c9bba..95996af6f 100644 --- a/v2/build/toolset.jam +++ b/v2/build/toolset.jam @@ -1,7 +1,8 @@ -# Copyright (C) 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. +# Copyright 2003 Dave Abrahams +# Copyright 2005 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Support for toolset definition. diff --git a/v2/build/type.jam b/v2/build/type.jam index 5c98b379c..2c40d89f4 100644 --- a/v2/build/type.jam +++ b/v2/build/type.jam @@ -1,7 +1,7 @@ -# Copyright (C) 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. +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Deals with target type declaration and defines target class which supports # typed targets. diff --git a/v2/build/version.jam b/v2/build/version.jam index 3eb71a172..62177b7f0 100644 --- a/v2/build/version.jam +++ b/v2/build/version.jam @@ -1,7 +1,6 @@ -# Copyright (C) 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. +# Copyright 2002, 2003, 2004, 2006 Vladimir Prus +# 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) rule boost-build ( ) { diff --git a/v2/build/virtual-target.jam b/v2/build/virtual-target.jam index fb30279d5..34ca0475f 100644 --- a/v2/build/virtual-target.jam +++ b/v2/build/virtual-target.jam @@ -1,7 +1,8 @@ -# Copyright (C) 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. +# Copyright 2003 Dave Abrahams +# Copyright 2005, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Implements virtual targets, which correspond to actual files created during # build, but are not yet targets in Jam sense. They are needed, for example, From 3b73c71ee558904dfa8c32e01cae7e767c623ca8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 07:13:39 +0000 Subject: [PATCH 44/91] Add/update copyrights+license (with help of a shell script). [SVN r35851] --- v2/example/boost-build.jam | 6 +++++- v2/example/customization/Jamfile | 6 +++++- v2/example/customization/inline_file.py | 7 +++---- v2/example/customization/project-root.jam | 6 +++++- v2/example/customization/verbatim.jam | 10 ++++------ v2/example/gettext/Jamfile | 4 ++++ v2/example/gettext/project-root.jam | 6 +++++- v2/example/libraries/app/Jamfile | 6 +++++- v2/example/libraries/util/foo/Jamfile | 6 +++++- v2/example/variant/Jamfile | 4 ++++ v2/example/variant/libs/Jamfile | 6 +++++- v2/example/variant/project-root.jam | 6 +++++- v2/example/versioned/jamfile.jam | 7 +++---- v2/example/versioned/project-root.jam | 8 ++++---- v2/generators_prototype.py | 8 +++----- v2/kernel/boost-build.jam | 11 +++++------ v2/kernel/bootstrap.jam | 10 +++++----- v2/kernel/class.jam | 11 ++++++----- v2/kernel/errors.jam | 8 ++++---- v2/kernel/modules.jam | 8 ++++---- v2/nightly.sh | 4 ++++ v2/options/help.jam | 10 +++++----- v2/roll.sh | 8 +++++++- v2/site-config.jam | 5 ++++- v2/tools/bison.jam | 9 ++++----- v2/tools/boostbook.jam | 11 ++++++----- v2/tools/borland.jam | 12 +++++------- v2/tools/builtin.jam | 11 +++++++---- v2/tools/common.jam | 10 ++++++---- v2/tools/como-linux.jam | 7 +++---- v2/tools/darwin.jam | 10 +++++----- v2/tools/doxygen.jam | 11 +++++------ v2/tools/gettext.jam | 9 ++++----- v2/tools/kylix.jam | 7 +++---- v2/tools/lex.jam | 9 ++++----- v2/tools/make.jam | 10 ++++++---- v2/tools/qt3.jam | 7 +++---- v2/tools/stage.jam | 9 +++++---- v2/tools/stlport.jam | 13 +++++-------- v2/tools/symlink.jam | 9 +++++---- v2/tools/testing.jam | 10 ++++------ v2/user-config.jam | 9 +++++---- v2/util/assert.jam | 11 ++++++----- v2/util/container.jam | 9 +++++---- v2/util/doc.jam | 9 +++++---- v2/util/indirect.jam | 12 ++++++------ v2/util/numbers.jam | 8 ++++---- v2/util/os.jam | 9 +++++---- v2/util/print.jam | 9 +++++---- v2/util/regex.jam | 10 ++++++---- v2/util/sequence.jam | 9 +++++---- v2/util/set.jam | 8 ++++---- v2/util/string.jam | 9 ++++----- v2/util/utility.jam | 8 ++++---- 54 files changed, 253 insertions(+), 202 deletions(-) diff --git a/v2/example/boost-build.jam b/v2/example/boost-build.jam index 776bf004a..efcc231fe 100644 --- a/v2/example/boost-build.jam +++ b/v2/example/boost-build.jam @@ -1,2 +1,6 @@ +# Copyright 2002, 2003 Vladimir Prus +# 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) -boost-build ../kernel ; \ No newline at end of file + +boost-build ../kernel ; diff --git a/v2/example/customization/Jamfile b/v2/example/customization/Jamfile index 08e0f8b8a..eee0f4f4c 100644 --- a/v2/example/customization/Jamfile +++ b/v2/example/customization/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2003, 2004 Vladimir Prus +# 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) + exe codegen : codegen.cpp class.verbatim usage.verbatim - t1.verbatim ; \ No newline at end of file + t1.verbatim ; diff --git a/v2/example/customization/inline_file.py b/v2/example/customization/inline_file.py index 4b8d82751..a48c5fc9d 100644 --- a/v2/example/customization/inline_file.py +++ b/v2/example/customization/inline_file.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) import sys from string import strip diff --git a/v2/example/customization/project-root.jam b/v2/example/customization/project-root.jam index b822c673d..ab8bbf880 100644 --- a/v2/example/customization/project-root.jam +++ b/v2/example/customization/project-root.jam @@ -1,2 +1,6 @@ +# Copyright 2003 Vladimir Prus +# 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) -import verbatim ; \ No newline at end of file + +import verbatim ; diff --git a/v2/example/customization/verbatim.jam b/v2/example/customization/verbatim.jam index a6bbf8b41..931fdce33 100644 --- a/v2/example/customization/verbatim.jam +++ b/v2/example/customization/verbatim.jam @@ -1,9 +1,7 @@ -# Copyright (C) Vladimir Prus 2003-2004. 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. +# Copyright 2003, 2004 Vladimir Prus +# 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) -# # This file shows some of the primary customization mechanisms in Boost.Build V2 # and should serve as a basic for your own customization. # Each part has a comment describing its purpose, and you can pick the parts @@ -50,4 +48,4 @@ generators.register-standard verbatim.inline-file : VERBATIM : CPP ; actions inline-file { "./inline_file.py" $(<) $(>) -} \ No newline at end of file +} diff --git a/v2/example/gettext/Jamfile b/v2/example/gettext/Jamfile index f937bcb4f..d5096df30 100644 --- a/v2/example/gettext/Jamfile +++ b/v2/example/gettext/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2003, 2006 Vladimir Prus +# 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) + # Declare a main target. exe main : main.cpp ; diff --git a/v2/example/gettext/project-root.jam b/v2/example/gettext/project-root.jam index ad03c4d23..862f8930c 100644 --- a/v2/example/gettext/project-root.jam +++ b/v2/example/gettext/project-root.jam @@ -1,2 +1,6 @@ +# Copyright 2003 Vladimir Prus +# 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) -using gettext ; \ No newline at end of file + +using gettext ; diff --git a/v2/example/libraries/app/Jamfile b/v2/example/libraries/app/Jamfile index 1d542039c..ed2054e13 100644 --- a/v2/example/libraries/app/Jamfile +++ b/v2/example/libraries/app/Jamfile @@ -1,5 +1,9 @@ +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + # Declare a executable file, which uses a library. Note that # includes that for library will be automatically used # when compiling 'app.cpp' -exe app : app.cpp /library-example/foo//bar ; \ No newline at end of file +exe app : app.cpp /library-example/foo//bar ; diff --git a/v2/example/libraries/util/foo/Jamfile b/v2/example/libraries/util/foo/Jamfile index c5a6e91d2..7b6359ea4 100644 --- a/v2/example/libraries/util/foo/Jamfile +++ b/v2/example/libraries/util/foo/Jamfile @@ -1,5 +1,9 @@ +# Copyright 2005 Vladimir Prus +# 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) + project : usage-requirements include ; -lib bar : bar.cpp ; \ No newline at end of file +lib bar : bar.cpp ; diff --git a/v2/example/variant/Jamfile b/v2/example/variant/Jamfile index a14fe282b..8ae5990d0 100644 --- a/v2/example/variant/Jamfile +++ b/v2/example/variant/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2004 Vladimir Prus +# 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) + # By default, build the project with two variants # we've defined in project-root.jam diff --git a/v2/example/variant/libs/Jamfile b/v2/example/variant/libs/Jamfile index e3749a26a..4366b7624 100644 --- a/v2/example/variant/libs/Jamfile +++ b/v2/example/variant/libs/Jamfile @@ -1,2 +1,6 @@ +# Copyright 2004 Vladimir Prus +# 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) -lib l : l.cpp ; \ No newline at end of file + +lib l : l.cpp ; diff --git a/v2/example/variant/project-root.jam b/v2/example/variant/project-root.jam index 0de93a8e7..e19476ccc 100644 --- a/v2/example/variant/project-root.jam +++ b/v2/example/variant/project-root.jam @@ -1,3 +1,7 @@ +# Copyright 2004 Vladimir Prus +# 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) + # Define a build variant which is just combination # of four properties. @@ -7,4 +11,4 @@ variant crazy : speed off # Define a built variant inherited from 'release'. # It defines one new property and get all properties # from parent variant. -variant super_release : release : USE_ASM ; \ No newline at end of file +variant super_release : release : USE_ASM ; diff --git a/v2/example/versioned/jamfile.jam b/v2/example/versioned/jamfile.jam index ef30354db..913cdf4d7 100644 --- a/v2/example/versioned/jamfile.jam +++ b/v2/example/versioned/jamfile.jam @@ -1,7 +1,6 @@ -# (C) Copyright Rene Rivera, 2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 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) #~ exe hello : hello.cpp : 1.0 ; lib hello : hello.cpp : 1.0 ; diff --git a/v2/example/versioned/project-root.jam b/v2/example/versioned/project-root.jam index dec7f8d33..981d3eb50 100644 --- a/v2/example/versioned/project-root.jam +++ b/v2/example/versioned/project-root.jam @@ -1,7 +1,7 @@ -# (C) Copyright Rene Rivera, 2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 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) + import gcc ; import toolset ; diff --git a/v2/generators_prototype.py b/v2/generators_prototype.py index 45f10c01e..80d910a09 100644 --- a/v2/generators_prototype.py +++ b/v2/generators_prototype.py @@ -1,8 +1,6 @@ -# Copyright David Abrahams 2003. 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. +# Copyright 2003 Dave 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) # Importing by a different name keeps PyChecker happy from __future__ import generators as generators_ diff --git a/v2/kernel/boost-build.jam b/v2/kernel/boost-build.jam index 561c362af..377f6ec02 100755 --- a/v2/kernel/boost-build.jam +++ b/v2/kernel/boost-build.jam @@ -1,6 +1,5 @@ -# Copyright David Abrahams 2003. 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. -boost-build . ; \ No newline at end of file +# Copyright 2003 Dave 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) + +boost-build . ; diff --git a/v2/kernel/bootstrap.jam b/v2/kernel/bootstrap.jam index 67b681449..59b46762d 100755 --- a/v2/kernel/bootstrap.jam +++ b/v2/kernel/bootstrap.jam @@ -1,8 +1,8 @@ -# (C) Copyright David Abrahams, 2001. -# (C) Copyright Rene Rivera, 2003 2006. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2005, 2006 Rene Rivera +# Copyright 2003, 2005, 2006 Vladimir Prus +# 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) # First of all, check the jam version diff --git a/v2/kernel/class.jam b/v2/kernel/class.jam index 92b970ad8..2857718ab 100644 --- a/v2/kernel/class.jam +++ b/v2/kernel/class.jam @@ -1,7 +1,8 @@ -# (C) Copyright David Abrahams 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. +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2002, 2005 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# 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) # Polymorphic class system built on top of core Jam facilities. # @@ -427,4 +428,4 @@ local rule __test__ ( ) assert.true is-a $(c) : derived2 ; assert.true is-a $(d) : myclass ; assert.false is-a literal : myclass ; -} \ No newline at end of file +} diff --git a/v2/kernel/errors.jam b/v2/kernel/errors.jam index 20e61092c..40bb7c94f 100755 --- a/v2/kernel/errors.jam +++ b/v2/kernel/errors.jam @@ -1,7 +1,7 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2003 Dave Abrahams +# Copyright 2004 Vladimir Prus +# 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) # Print a stack backtrace leading to this rule's caller. Each # argument represents a line of output to be printed after the first diff --git a/v2/kernel/modules.jam b/v2/kernel/modules.jam index 0ee2b27eb..580c1bac4 100755 --- a/v2/kernel/modules.jam +++ b/v2/kernel/modules.jam @@ -1,7 +1,7 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2005 Vladimir Prus +# 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) # Essentially an include guard; ensures that no module is loaded multiple times .loaded ?= ; diff --git a/v2/nightly.sh b/v2/nightly.sh index 8ccb1cda4..14298c13f 100644 --- a/v2/nightly.sh +++ b/v2/nightly.sh @@ -1,5 +1,9 @@ #!/bin/bash +# Copyright 2004, 2005, 2006 Vladimir Prus +# 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) + # This script create a nightly tarball of Boost.Build V2 # and updates the web site. diff --git a/v2/options/help.jam b/v2/options/help.jam index c087592ee..16e448457 100755 --- a/v2/options/help.jam +++ b/v2/options/help.jam @@ -1,8 +1,8 @@ -# (C) Copyright David Abrahams, 2003. -# (C) Copyright Rene Rivera, 2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2006 Rene Rivera +# Copyright 2003, 2006 Vladimir Prus +# 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) # This module is the plug-in handler for the --help and --help-.* # command-line options diff --git a/v2/roll.sh b/v2/roll.sh index eb0415b46..5fa840f0c 100644 --- a/v2/roll.sh +++ b/v2/roll.sh @@ -1,5 +1,11 @@ #!/bin/bash +# Copyright 2004 Aleksey Gurtovoy +# Copyright 2006 Rene Rivera +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) + set -e # Do some renames/rearrangments @@ -48,4 +54,4 @@ chmod -R u+w * # Upload docs to sourceforge perl -pi -e 's%%SourceForge.net Logo%' index.html doc/*.html scp -r doc example *.html hacking.txt vladimir_prus@shell.sourceforge.net:/home/groups/b/bo/boost/htdocs/boost-build2 -scp ../userman.pdf vladimir_prus@shell.sourceforge.net:/home/groups/b/bo/boost/htdocs/boost-build2/doc \ No newline at end of file +scp ../userman.pdf vladimir_prus@shell.sourceforge.net:/home/groups/b/bo/boost/htdocs/boost-build2/doc diff --git a/v2/site-config.jam b/v2/site-config.jam index f2734a111..ad22d6744 100644 --- a/v2/site-config.jam +++ b/v2/site-config.jam @@ -1 +1,4 @@ -# No copyright, since this file is empty +# Copyright 2002, 2003 Vladimir Prus +# 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) + diff --git a/v2/tools/bison.jam b/v2/tools/bison.jam index 4e6c8de9f..0689d4bd8 100644 --- a/v2/tools/bison.jam +++ b/v2/tools/bison.jam @@ -1,7 +1,6 @@ -# Copyright (C) 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. +# Copyright 2003 Vladimir Prus +# 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) import generators ; import feature ; @@ -30,4 +29,4 @@ rule bison ( dst dst_header : src : properties * ) actions bison { bison $(PREFIX_OPT) -d -o $(<[1]) $(>) -} \ No newline at end of file +} diff --git a/v2/tools/boostbook.jam b/v2/tools/boostbook.jam index c92dbce74..e1b5db19a 100644 --- a/v2/tools/boostbook.jam +++ b/v2/tools/boostbook.jam @@ -1,8 +1,9 @@ -# Copyright (C) 2003 Doug Gregor. 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. +# Copyright 2003, 2004, 2005 Dave Abrahams +# Copyright 2003, 2004, 2005 Douglas Gregor +# Copyright 2005 Rene Rivera +# Copyright 2003, 2004, 2005 Vladimir Prus +# 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) # This module defines rules to handle generation of documentation # from BoostBook sources. diff --git a/v2/tools/borland.jam b/v2/tools/borland.jam index e19c9005b..1c099d6d2 100644 --- a/v2/tools/borland.jam +++ b/v2/tools/borland.jam @@ -1,10 +1,8 @@ -# (C) Copyright David Abrahams 2001. -# (C) Copyright Vladimir Prus 2003. -# (C) Copyright Rene Rivera 2003. -# 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. +# Copyright 2005 Dave Abrahams +# Copyright 2003 Rene Rivera +# Copyright 2003, 2004, 2005 Vladimir Prus +# 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) # Support for the Borland's command line compiler diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index 8e63d2c53..e057567d8 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -1,7 +1,10 @@ -# Copyright (C) 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. +# Copyright 2002, 2003, 2004, 2005 Dave Abrahams +# Copyright 2002, 2005, 2006 Rene Rivera +# Copyright 2006 Juergen Hunold +# Copyright 2005 Toon Knapen +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Defines standard features and rules. diff --git a/v2/tools/common.jam b/v2/tools/common.jam index 2e188742b..fee26a2b2 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -1,7 +1,9 @@ -# Copyright (C) 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. +# Copyright 2003, 2005 Dave Abrahams +# Copyright 2005, 2006 Rene Rivera +# Copyright 2005 Toon Knapen +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Provides actions common to all toolsets, for as making directoies and # removing files. diff --git a/v2/tools/como-linux.jam b/v2/tools/como-linux.jam index c6e6a23fe..4af2628c3 100644 --- a/v2/tools/como-linux.jam +++ b/v2/tools/como-linux.jam @@ -1,7 +1,6 @@ -# 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. +# Copyright 2004, 2005, 2006 Vladimir Prus +# 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. diff --git a/v2/tools/darwin.jam b/v2/tools/darwin.jam index 14dd0008e..b14ff5407 100644 --- a/v2/tools/darwin.jam +++ b/v2/tools/darwin.jam @@ -1,8 +1,8 @@ -# Copyright (C) Christopher Currie 2003. 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. +# Copyright 2003 Christopher Currie +# Copyright 2006 Dave Abrahams +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Please see http://article.gmane.org/gmane.comp.lib.boost.build/3389/ # for explanation why it's a separate toolset. diff --git a/v2/tools/doxygen.jam b/v2/tools/doxygen.jam index 8acbea5ff..e471e99fe 100644 --- a/v2/tools/doxygen.jam +++ b/v2/tools/doxygen.jam @@ -1,8 +1,7 @@ -# Copyright (C) 2003 Doug Gregor. 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. +# Copyright 2003, 2004 Douglas Gregor +# Copyright 2003, 2004, 2005 Vladimir Prus +# 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) # This module defines rules to handle generation of BoostBook XML # from Doxygen XML output. @@ -186,4 +185,4 @@ rule doxygen ( target-name : sources * : requirements * : default-build * ) : [ targets.main-target-requirements $(requirements) . : $(project) ] : [ targets.main-target-default-build $(default-build) : $(project) ] ] ; -} \ No newline at end of file +} diff --git a/v2/tools/gettext.jam b/v2/tools/gettext.jam index 604fbc4fe..c72eb9e8b 100644 --- a/v2/tools/gettext.jam +++ b/v2/tools/gettext.jam @@ -1,7 +1,6 @@ -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # This module support GNU gettext internationalization utilities. # @@ -232,4 +231,4 @@ actions gettext.compile IMPORT $(__name__) : update : : gettext.update ; - \ No newline at end of file + diff --git a/v2/tools/kylix.jam b/v2/tools/kylix.jam index 2a4162593..342aee089 100644 --- a/v2/tools/kylix.jam +++ b/v2/tools/kylix.jam @@ -1,7 +1,6 @@ -# Copyright (C) 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. +# Copyright 2003 Vladimir Prus +# 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) # Support for the Borland's Kylix command line compiler diff --git a/v2/tools/lex.jam b/v2/tools/lex.jam index 1f0126901..75d641318 100644 --- a/v2/tools/lex.jam +++ b/v2/tools/lex.jam @@ -1,7 +1,6 @@ -# Copyright (C) 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. +# Copyright 2003 Vladimir Prus +# 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) import type ; import generators ; @@ -31,4 +30,4 @@ rule lex ( target : source : properties * ) actions lex { flex -P$(PREFIX) -o$(<) $(>) -} \ No newline at end of file +} diff --git a/v2/tools/make.jam b/v2/tools/make.jam index 4880eeee1..0328b6c1b 100644 --- a/v2/tools/make.jam +++ b/v2/tools/make.jam @@ -1,7 +1,9 @@ -# Copyright (C) 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. +# Copyright 2003 Dave Abrahams +# Copyright 2003 Douglas Gregor +# Copyright 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # This module defines the 'make' main target rule. diff --git a/v2/tools/qt3.jam b/v2/tools/qt3.jam index ba7c63928..bf8036631 100644 --- a/v2/tools/qt3.jam +++ b/v2/tools/qt3.jam @@ -1,7 +1,6 @@ -# Copyright (C) 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. +# Copyright 2006 Vladimir Prus +# 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) # Support for the Qt GUI library version 3 # (http://www.trolltech.com/products/qt3/index.html). diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index aa27dfcc9..d955f40b3 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -1,7 +1,8 @@ -# Copyright (C) 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. +# Copyright 2003 Dave Abrahams +# Copyright 2005, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # This module defines the 'install' rule, used to copy a set of targets to # a single location diff --git a/v2/tools/stlport.jam b/v2/tools/stlport.jam index ad1c1eb15..3e83d7365 100644 --- a/v2/tools/stlport.jam +++ b/v2/tools/stlport.jam @@ -1,11 +1,8 @@ -# (C) Copyright Gennadiy Rozental 2002. -# (C) Copyright Vladimir Prus 2003. -# (C) Copyright Rene Rivera 2006. -# 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. +# Copyright Gennadiy Rozental +# Copyright 2006 Rene Rivera +# Copyright 2003, 2004, 2006 Vladimir Prus +# 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 STLPort is usable by means of 'stdlib' feature. When # stdlib=stlport is specified, default version of STLPort will be used, diff --git a/v2/tools/symlink.jam b/v2/tools/symlink.jam index ae785d08c..deec452cb 100644 --- a/v2/tools/symlink.jam +++ b/v2/tools/symlink.jam @@ -1,7 +1,8 @@ -# (C) Copyright Rene Rivera, 2002-2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003 Rene Rivera +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) # Defines the "symlink" special target. 'symlink' targets make symbolic links # to the sources. diff --git a/v2/tools/testing.jam b/v2/tools/testing.jam index 542c9f525..e195c93d2 100644 --- a/v2/tools/testing.jam +++ b/v2/tools/testing.jam @@ -1,9 +1,7 @@ -# (C) Copyright David Abrahams 2002. -# (C) Copyright Vladimir Prus 2002-2003. -# 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. +# Copyright 2005 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # This module implements regression testing framework. It declares a number of # main target rules, which perform some action, and if the results are ok, diff --git a/v2/user-config.jam b/v2/user-config.jam index 2df39ab43..db327685c 100644 --- a/v2/user-config.jam +++ b/v2/user-config.jam @@ -1,7 +1,8 @@ -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2005 Douglas Gregor +# Copyright 2004 John Maddock +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) # This file is used to configure your Boost.Build installation. Please read # the user manual to find out where to put it. diff --git a/v2/util/assert.jam b/v2/util/assert.jam index 2c526d92a..d4eacc47d 100644 --- a/v2/util/assert.jam +++ b/v2/util/assert.jam @@ -1,7 +1,8 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# 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) import errors : error-skip-frames lol->list ; import modules ; @@ -138,4 +139,4 @@ rule not-in ( element : list * ) error-skip-frames 3 assertion failure: did not expect $(element) in "[" $(list) "]" ; } -} \ No newline at end of file +} diff --git a/v2/util/container.jam b/v2/util/container.jam index 6ad63d857..673f11ac6 100644 --- a/v2/util/container.jam +++ b/v2/util/container.jam @@ -1,7 +1,8 @@ -# (C) Copyright Rene Rivera, 2002. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003 Rene Rivera +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) # Various container classes. diff --git a/v2/util/doc.jam b/v2/util/doc.jam index 5f4829709..697bff487 100644 --- a/v2/util/doc.jam +++ b/v2/util/doc.jam @@ -1,7 +1,8 @@ -# (C) Copyright Rene Rivera, 2002-2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2002, 2005 Dave Abrahams +# Copyright 2002, 2003, 2006 Rene Rivera +# Copyright 2003 Vladimir Prus +# 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) # Documentation system, handles --help requests. # It defines rules that attach documentation to modules, rules, and variables. diff --git a/v2/util/indirect.jam b/v2/util/indirect.jam index 1ed0c9799..41fda47d1 100755 --- a/v2/util/indirect.jam +++ b/v2/util/indirect.jam @@ -1,8 +1,8 @@ -# Copyright David Abrahams 2003. 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. +# Copyright 2003 Dave Abrahams +# Copyright 2003 Vladimir Prus +# 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) + import modules ; import numbers ; @@ -100,4 +100,4 @@ rule __test__ call [ make foo-barr! : [ CALLER_MODULE ] ] x ; -} \ No newline at end of file +} diff --git a/v2/util/numbers.jam b/v2/util/numbers.jam index 2a23af698..1d3d68692 100644 --- a/v2/util/numbers.jam +++ b/v2/util/numbers.jam @@ -1,7 +1,7 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2002, 2003 Vladimir Prus +# 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) digits = 0 1 2 3 4 5 6 7 8 9 ; powers = 1 ; diff --git a/v2/util/os.jam b/v2/util/os.jam index 9e2ea1925..f95c69a24 100644 --- a/v2/util/os.jam +++ b/v2/util/os.jam @@ -1,7 +1,8 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002, 2003, 2005 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2003, 2005 Vladimir Prus +# 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) import modules ; diff --git a/v2/util/print.jam b/v2/util/print.jam index ceaeaace9..63ee70023 100644 --- a/v2/util/print.jam +++ b/v2/util/print.jam @@ -1,7 +1,8 @@ -# (C) Copyright Rene Rivera, 2002-2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2003 Douglas Gregor +# Copyright 2002, 2003, 2005 Rene Rivera +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) # Utilities for generating format independent output. Using these # will help in generation of documentation in at minimum plain/console diff --git a/v2/util/regex.jam b/v2/util/regex.jam index 1b9b885e9..c805abb2c 100644 --- a/v2/util/regex.jam +++ b/v2/util/regex.jam @@ -1,7 +1,9 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2003 Douglas Gregor +# Copyright 2003 Rene Rivera +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) # # Returns a list of the following substrings: diff --git a/v2/util/sequence.jam b/v2/util/sequence.jam index 4b2d4e935..00a60c5aa 100644 --- a/v2/util/sequence.jam +++ b/v2/util/sequence.jam @@ -1,7 +1,8 @@ -# (C) Copyright David Abrahams 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. +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# 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) import assert ; import numbers ; diff --git a/v2/util/set.jam b/v2/util/set.jam index af05cfa5b..6e75546be 100644 --- a/v2/util/set.jam +++ b/v2/util/set.jam @@ -1,7 +1,7 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2003 Vladimir Prus +# 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) # difference # returns the elements of B that are not in A diff --git a/v2/util/string.jam b/v2/util/string.jam index 153d8deec..dc19b2d13 100644 --- a/v2/util/string.jam +++ b/v2/util/string.jam @@ -1,8 +1,7 @@ -# (C) Copyright David Abrahams, 2002. -# (C) Copyright Rene Rivera, 2003. -# -# See accompanying license for terms and conditions of use. -# +# Copyright 2002 Dave Abrahams +# Copyright 2002, 2003 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) import regex ; diff --git a/v2/util/utility.jam b/v2/util/utility.jam index 8d2524931..01d100806 100644 --- a/v2/util/utility.jam +++ b/v2/util/utility.jam @@ -1,7 +1,7 @@ -# (C) Copyright David Abrahams 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" without express or implied -# warranty, and with no claim as to its suitability for any purpose. +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) import "class" : is-instance ; import errors ; From c4e55bb5c6da685bbf966c6098695236ec094783 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 18:13:42 +0000 Subject: [PATCH 45/91] Add/update copyrights+license (with help of a shell script). [SVN r35856] --- v2/test/Jamfile | 4 ++++ v2/test/absolute_sources.py | 4 ++++ v2/test/alias.py | 5 +++++ v2/test/alternatives.py | 5 +++++ v2/test/assert-equal.jam | 4 ++++ v2/test/bad_dirname.py | 8 +++----- v2/test/boost-build.jam | 4 ++++ v2/test/boostbook.py | 7 +++---- v2/test/build_dir.py | 5 +++++ v2/test/c_file.py | 7 +++---- v2/test/chain.py | 5 +++++ v2/test/check-arguments.jam | 8 +++----- v2/test/check-bindrule.jam | 6 +++++- v2/test/check-jam-patches.jam | 6 +++++- v2/test/check-test-tools.jam | 4 ++++ v2/test/composite.py | 7 +++---- v2/test/conditionals.py | 5 +++++ v2/test/conditionals2.py | 7 +++---- v2/test/conditionals3.py | 7 +++---- v2/test/core_d12.py | 4 ++++ v2/test/core_delete_module.py | 4 ++++ v2/test/core_dependencies.py | 4 ++++ v2/test/core_import_module.py | 7 +++---- v2/test/core_modifiers.py | 4 ++++ v2/test/core_typecheck.py | 4 ++++ v2/test/core_varnames.py | 4 ++++ v2/test/custom_generator.py | 7 +++---- v2/test/default_build.py | 5 +++++ v2/test/default_features.py | 7 +++---- v2/test/generators_test.py | 5 +++++ v2/test/inherit_toolset.py | 7 +++---- v2/test/inline.py | 7 +++---- v2/test/library_chain.py | 7 +++---- v2/test/library_order.py | 7 +++---- v2/test/library_property.py | 7 +++---- v2/test/loop.py | 7 +++---- v2/test/m1-01.py | 5 +++++ v2/test/m1-02.py | 4 ++++ v2/test/m1-03.py | 5 +++++ v2/test/make_rule.py | 5 +++++ v2/test/module_actions.py | 6 ++++++ v2/test/ndebug.py | 7 +++---- v2/test/no_type.py | 4 ++++ v2/test/ordered_properties.py | 7 +++---- v2/test/path_features.py | 5 +++++ v2/test/prebuilt.py | 4 ++++ v2/test/print.py | 5 +++++ v2/test/project-test1.jam | 6 ++++++ v2/test/project_dependencies.py | 5 +++++ v2/test/project_root_constants.py | 7 +++---- v2/test/project_test1.py | 5 +++++ v2/test/project_test3.py | 5 +++++ v2/test/project_test4.py | 5 +++++ v2/test/property_expansion.py | 7 +++---- v2/test/railsys.py | 7 +++---- v2/test/rebuilds.py | 4 ++++ v2/test/recursive.jam | 9 ++++----- v2/test/relative_sources.py | 5 +++++ v2/test/searched_lib.py | 5 +++++ v2/test/skipping.py | 7 +++---- v2/test/stage.py | 5 +++++ v2/test/standalone.py | 8 +++----- v2/test/startup_v1.py | 5 +++++ v2/test/startup_v2.py | 5 +++++ v2/test/suffix.py | 7 +++---- v2/test/symlink.py | 5 +++++ v2/test/test-config-example.jam | 6 +++++- v2/test/test.jam | 6 ++++++ v2/test/test1.py | 4 ++++ v2/test/test2.py | 5 +++++ v2/test/test_nt_line_length.jam | 8 +++----- v2/test/testing_primitives.py | 4 ++++ v2/test/tree.py | 9 ++++----- v2/test/unit-tests.jam | 10 ++++------ v2/test/unit_test.py | 7 +++---- v2/test/unit_tests.py | 4 ++++ v2/test/unused.py | 4 ++++ v2/test/use_requirements.py | 5 +++++ v2/test/v1_testing.py | 5 +++++ v2/test/wrapper.py | 7 +++---- 80 files changed, 327 insertions(+), 131 deletions(-) diff --git a/v2/test/Jamfile b/v2/test/Jamfile index 1b9a73df8..9d186f3c1 100644 --- a/v2/test/Jamfile +++ b/v2/test/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2001 Dave 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) + # establish a project root right here in the test directory, so that we can test # things independently of the boost jambase, etc. diff --git a/v2/test/absolute_sources.py b/v2/test/absolute_sources.py index a7664be0e..cd658765e 100644 --- a/v2/test/absolute_sources.py +++ b/v2/test/absolute_sources.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003, 2004 Vladimir Prus +# 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) + # Test that sources with absolute names are handled OK. from BoostBuild import Tester diff --git a/v2/test/alias.py b/v2/test/alias.py index 1a68ec559..a4f1be260 100644 --- a/v2/test/alias.py +++ b/v2/test/alias.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2003 Vladimir Prus +# 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) + from BoostBuild import Tester, List t = Tester() diff --git a/v2/test/alternatives.py b/v2/test/alternatives.py index 0c1d91abb..9d10c6f1d 100644 --- a/v2/test/alternatives.py +++ b/v2/test/alternatives.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2006 Vladimir Prus +# 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) + # Test main target alternatives. from BoostBuild import Tester diff --git a/v2/test/assert-equal.jam b/v2/test/assert-equal.jam index 0c1229f8a..6ed501e74 100644 --- a/v2/test/assert-equal.jam +++ b/v2/test/assert-equal.jam @@ -1,3 +1,7 @@ +# Copyright 2001 Dave 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) + # Evaluates [ rulename arg1... : arg2... : ... : argN... ] and compares the # result to expected-results. If there is a mismatch, prints an error message # and exits. diff --git a/v2/test/bad_dirname.py b/v2/test/bad_dirname.py index 57e43abd7..c6c2ead49 100644 --- a/v2/test/bad_dirname.py +++ b/v2/test/bad_dirname.py @@ -1,10 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. - +# Copyright 2003 Vladimir Prus +# 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) # Regression test: when directory of project root contained regex metacharacters, # Boost.Build failed to work. Bug reported by Michael Stevens diff --git a/v2/test/boost-build.jam b/v2/test/boost-build.jam index 63431b2a2..ad68a288e 100644 --- a/v2/test/boost-build.jam +++ b/v2/test/boost-build.jam @@ -1,3 +1,7 @@ +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2003 Vladimir Prus +# 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) # Assume BOOST_BUILD_PATH point to the 'test' directory. # We need to leave 'test' there, so that 'test-config.jam' diff --git a/v2/test/boostbook.py b/v2/test/boostbook.py index 5e07f1e09..17edc636c 100644 --- a/v2/test/boostbook.py +++ b/v2/test/boostbook.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2004. 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. +# Copyright 2004, 2006 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/build_dir.py b/v2/test/build_dir.py index 5bfe5b0df..578e498c3 100644 --- a/v2/test/build_dir.py +++ b/v2/test/build_dir.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + # Test that we can change build directory using # the 'build-dir' project attribute. diff --git a/v2/test/c_file.py b/v2/test/c_file.py index 0239673b2..cf6121e9d 100644 --- a/v2/test/c_file.py +++ b/v2/test/c_file.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Test that C files are compiled by C compiler from BoostBuild import Tester, List diff --git a/v2/test/chain.py b/v2/test/chain.py index 2cd8e17d9..b11979928 100644 --- a/v2/test/chain.py +++ b/v2/test/chain.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003 Vladimir Prus +# 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) + # This tests that # 1) the 'make' correctly assigns types to produced targets # 2) than if 'make' create targets of type CPP, they are diff --git a/v2/test/check-arguments.jam b/v2/test/check-arguments.jam index c87bf3a51..20e025074 100644 --- a/v2/test/check-arguments.jam +++ b/v2/test/check-arguments.jam @@ -1,8 +1,6 @@ -# (C) Copyright David Abrahams 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" without express or implied warranty, and with no claim as -# to its suitability for any purpose. +# Copyright 2001 Dave 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) # # Jam code for testing the named-argument patch. diff --git a/v2/test/check-bindrule.jam b/v2/test/check-bindrule.jam index aecc77592..f8eb986e3 100644 --- a/v2/test/check-bindrule.jam +++ b/v2/test/check-bindrule.jam @@ -1,3 +1,7 @@ +# Copyright 2001 Dave 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) + # This rule establishes a dependency, with no special build actions rule do-nothing ( target : source ) { @@ -22,4 +26,4 @@ rule bind-rule ( target : path ) ECHO found: $(target) at $(path) ; } -DEPENDS all : fake-target ; \ No newline at end of file +DEPENDS all : fake-target ; diff --git a/v2/test/check-jam-patches.jam b/v2/test/check-jam-patches.jam index 8f88ae254..7e00bec20 100644 --- a/v2/test/check-jam-patches.jam +++ b/v2/test/check-jam-patches.jam @@ -1,3 +1,7 @@ +# Copyright 2001, 2002 Dave 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) + # Get the recursive Jam invocation code include recursive.jam ; include assert-equal.jam ; @@ -286,4 +290,4 @@ assert-equal x y x-y } } module1.f ; -} \ No newline at end of file +} diff --git a/v2/test/check-test-tools.jam b/v2/test/check-test-tools.jam index ac03aa505..adf78cc3b 100644 --- a/v2/test/check-test-tools.jam +++ b/v2/test/check-test-tools.jam @@ -1,3 +1,7 @@ +# Copyright 2001 Dave 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) + include recursive.jam ; include assert-equal.jam ; diff --git a/v2/test/composite.py b/v2/test/composite.py index 7faeba419..d1a795be7 100644 --- a/v2/test/composite.py +++ b/v2/test/composite.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Test that composite properties are handled correctly. from BoostBuild import Tester, List diff --git a/v2/test/conditionals.py b/v2/test/conditionals.py index 63afe173e..ec31d4412 100644 --- a/v2/test/conditionals.py +++ b/v2/test/conditionals.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + # Test conditional properties from BoostBuild import Tester, List diff --git a/v2/test/conditionals2.py b/v2/test/conditionals2.py index 3145a14d2..88877573a 100644 --- a/v2/test/conditionals2.py +++ b/v2/test/conditionals2.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Regression test: it was possible that due to evaluation of conditional # requirements, two different values of non-free features were present in diff --git a/v2/test/conditionals3.py b/v2/test/conditionals3.py index 9e6c2b88b..fefb97798 100644 --- a/v2/test/conditionals3.py +++ b/v2/test/conditionals3.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Test that conditional properties work, even if property is free, and # value includes colon. diff --git a/v2/test/core_d12.py b/v2/test/core_d12.py index 72ec9de53..94f3cdb33 100644 --- a/v2/test/core_d12.py +++ b/v2/test/core_d12.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002, 2003 Vladimir Prus +# 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) + # This tests correct handling of "-d1" and "-d2" options. import BoostBuild diff --git a/v2/test/core_delete_module.py b/v2/test/core_delete_module.py index 92ac99906..6a5fa7c03 100644 --- a/v2/test/core_delete_module.py +++ b/v2/test/core_delete_module.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003 Dave 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) + # This tests the facilities for deleting modules. import BoostBuild diff --git a/v2/test/core_dependencies.py b/v2/test/core_dependencies.py index 24155e416..ee6de2aba 100644 --- a/v2/test/core_dependencies.py +++ b/v2/test/core_dependencies.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003 Vladimir Prus +# 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) + # This tests correct handling of dependencies, specifically, on # generated sources, and from generated sources. diff --git a/v2/test/core_import_module.py b/v2/test/core_import_module.py index d4a1d5426..0f1d6cea1 100644 --- a/v2/test/core_import_module.py +++ b/v2/test/core_import_module.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/core_modifiers.py b/v2/test/core_modifiers.py index 69b9f7b1f..bebcc5fde 100644 --- a/v2/test/core_modifiers.py +++ b/v2/test/core_modifiers.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003 Vladimir Prus +# 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) + # This tests the "existing" and "updated" modifiers on actions. import BoostBuild diff --git a/v2/test/core_typecheck.py b/v2/test/core_typecheck.py index 2de82e686..31f408356 100644 --- a/v2/test/core_typecheck.py +++ b/v2/test/core_typecheck.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003 Vladimir Prus +# 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) + # This tests the typechecking facilities. import BoostBuild diff --git a/v2/test/core_varnames.py b/v2/test/core_varnames.py index 82fcf3c91..8e48bb3b8 100644 --- a/v2/test/core_varnames.py +++ b/v2/test/core_varnames.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003 Dave 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) + # This tests the core rule for enumerating the variable names in a module import BoostBuild diff --git a/v2/test/custom_generator.py b/v2/test/custom_generator.py index 5a66daa35..7b73e2f22 100644 --- a/v2/test/custom_generator.py +++ b/v2/test/custom_generator.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004, 2005 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/default_build.py b/v2/test/default_build.py index cde428e91..90a188aef 100644 --- a/v2/test/default_build.py +++ b/v2/test/default_build.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003 Vladimir Prus +# 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) + # Test that default build clause actually has any effect. from BoostBuild import Tester, List diff --git a/v2/test/default_features.py b/v2/test/default_features.py index d01267ee6..2924d8dfc 100644 --- a/v2/test/default_features.py +++ b/v2/test/default_features.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Test that features with default values are always present # in build properties of any target. diff --git a/v2/test/generators_test.py b/v2/test/generators_test.py index ca5d29840..209960845 100644 --- a/v2/test/generators_test.py +++ b/v2/test/generators_test.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + from BoostBuild import Tester, List import os diff --git a/v2/test/inherit_toolset.py b/v2/test/inherit_toolset.py index 947af6e46..1c95df68b 100644 --- a/v2/test/inherit_toolset.py +++ b/v2/test/inherit_toolset.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) from BoostBuild import Tester, List from string import find diff --git a/v2/test/inline.py b/v2/test/inline.py index 45f0a5b8c..39bfecd75 100644 --- a/v2/test/inline.py +++ b/v2/test/inline.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2006 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/library_chain.py b/v2/test/library_chain.py index f98de9646..e211b9baf 100644 --- a/v2/test/library_chain.py +++ b/v2/test/library_chain.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) # Test that a chain of libraries work ok, not matter if we use static or # shared linking. diff --git a/v2/test/library_order.py b/v2/test/library_order.py index e6e4e2465..f5638a7ba 100644 --- a/v2/test/library_order.py +++ b/v2/test/library_order.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2004. 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. +# Copyright 2004 Vladimir Prus +# 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) from BoostBuild import Tester, List import string diff --git a/v2/test/library_property.py b/v2/test/library_property.py index 1b95f7415..933e25aa8 100644 --- a/v2/test/library_property.py +++ b/v2/test/library_property.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2004. 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. +# Copyright 2004 Vladimir Prus +# 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) # Test that the property has no effect on "obj" targets. # Previously, it affected all targets, so diff --git a/v2/test/loop.py b/v2/test/loop.py index 558e99cf8..f45ebea7c 100644 --- a/v2/test/loop.py +++ b/v2/test/loop.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) from BoostBuild import Tester, List from string import find diff --git a/v2/test/m1-01.py b/v2/test/m1-01.py index f9b0a3429..34d82db98 100644 --- a/v2/test/m1-01.py +++ b/v2/test/m1-01.py @@ -1,4 +1,9 @@ #!/usr/bin/python + +# Copyright 2002 Vladimir Prus +# 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) + # Test the very basic 'make' functionality. from BoostBuild import Tester, List diff --git a/v2/test/m1-02.py b/v2/test/m1-02.py index df5d66bc6..86e6312da 100644 --- a/v2/test/m1-02.py +++ b/v2/test/m1-02.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002 Vladimir Prus +# 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) + # Tests that 'make' accepts target from other directories and that # build request for those targets can be overriden. diff --git a/v2/test/m1-03.py b/v2/test/m1-03.py index 4dc9db372..15b0ff0ed 100644 --- a/v2/test/m1-03.py +++ b/v2/test/m1-03.py @@ -1,4 +1,9 @@ #!/usr/bin/python + +# Copyright 2002 Vladimir Prus +# 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) + # Tests that we can use objects from other projects # (i.e. with other project root) # Test also that we can refer to those target using project-id. diff --git a/v2/test/make_rule.py b/v2/test/make_rule.py index 6ee423774..c204d7a40 100644 --- a/v2/test/make_rule.py +++ b/v2/test/make_rule.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2006 Vladimir Prus +# 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) + # Test the 'make' rule from BoostBuild import Tester diff --git a/v2/test/module_actions.py b/v2/test/module_actions.py index f0c4315f8..c35fb0ba5 100644 --- a/v2/test/module_actions.py +++ b/v2/test/module_actions.py @@ -1,5 +1,11 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2003 Vladimir Prus +# 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) + from BoostBuild import Tester, List import os import re diff --git a/v2/test/ndebug.py b/v2/test/ndebug.py index 1d7179cbe..b4d071f80 100644 --- a/v2/test/ndebug.py +++ b/v2/test/ndebug.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Test that building with optimization brings NDEBUG define, and, more # importantly, that dependency targets are built with NDEBUG as well, diff --git a/v2/test/no_type.py b/v2/test/no_type.py index fbf6f6661..509e93538 100644 --- a/v2/test/no_type.py +++ b/v2/test/no_type.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002 Vladimir Prus +# 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) + # Test that we cannot specify targets of unknown type as sources. # This is based on the fact that Unix 'ar' will happily consume # just about anything. diff --git a/v2/test/ordered_properties.py b/v2/test/ordered_properties.py index 0fe448fb9..3025acfba 100644 --- a/v2/test/ordered_properties.py +++ b/v2/test/ordered_properties.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2004. 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. +# Copyright 2004 Vladimir Prus +# 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) # This file is template for Boost.Build tests. It creates a simple # project that builds one exe from one source, and checks that the exe diff --git a/v2/test/path_features.py b/v2/test/path_features.py index 7640e4a04..582b05e7e 100644 --- a/v2/test/path_features.py +++ b/v2/test/path_features.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + from BoostBuild import Tester t = Tester() diff --git a/v2/test/prebuilt.py b/v2/test/prebuilt.py index 5f367eb56..58590aae7 100644 --- a/v2/test/prebuilt.py +++ b/v2/test/prebuilt.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + # Test that we can use already built sources from BoostBuild import Tester diff --git a/v2/test/print.py b/v2/test/print.py index 77d83f619..62d2c7260 100644 --- a/v2/test/print.py +++ b/v2/test/print.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Douglas Gregor +# Copyright 2005 Vladimir Prus +# 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) + from BoostBuild import Tester, List t = Tester() diff --git a/v2/test/project-test1.jam b/v2/test/project-test1.jam index 9fe1ab988..c2d6ae576 100644 --- a/v2/test/project-test1.jam +++ b/v2/test/project-test1.jam @@ -1,3 +1,9 @@ +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# 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) + import project ; import targets ; import assert ; diff --git a/v2/test/project_dependencies.py b/v2/test/project_dependencies.py index a59a50bf5..e0cdcb686 100644 --- a/v2/test/project_dependencies.py +++ b/v2/test/project_dependencies.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + # Test that we can specify a dependency property # in project requirements, and that it won't # cause every main target in the project to diff --git a/v2/test/project_root_constants.py b/v2/test/project_root_constants.py index 8642eb335..1129ed801 100644 --- a/v2/test/project_root_constants.py +++ b/v2/test/project_root_constants.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004, 2005 Vladimir Prus +# 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) from BoostBuild import Tester, List from string import find diff --git a/v2/test/project_test1.py b/v2/test/project_test1.py index a0753c3e4..c4a3a8c2f 100644 --- a/v2/test/project_test1.py +++ b/v2/test/project_test1.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2002 Dave Abrahams +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + from BoostBuild import Tester import os diff --git a/v2/test/project_test3.py b/v2/test/project_test3.py index d8d4b57e0..cd1afadc7 100644 --- a/v2/test/project_test3.py +++ b/v2/test/project_test3.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2006 Vladimir Prus +# 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) + from BoostBuild import Tester, List import os from string import strip diff --git a/v2/test/project_test4.py b/v2/test/project_test4.py index 60ccb1220..ec735df0f 100644 --- a/v2/test/project_test4.py +++ b/v2/test/project_test4.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + from BoostBuild import Tester import os from string import strip, find diff --git a/v2/test/property_expansion.py b/v2/test/property_expansion.py index fce792b80..2371d87bd 100644 --- a/v2/test/property_expansion.py +++ b/v2/test/property_expansion.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/railsys.py b/v2/test/railsys.py index 1581a0e31..10db5c3a0 100644 --- a/v2/test/railsys.py +++ b/v2/test/railsys.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/rebuilds.py b/v2/test/rebuilds.py index ce63117f2..87c4d26da 100644 --- a/v2/test/rebuilds.py +++ b/v2/test/rebuilds.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2005 Dave 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) + # This tests the typechecking facilities. import BoostBuild diff --git a/v2/test/recursive.jam b/v2/test/recursive.jam index b83649e64..8087f7da7 100644 --- a/v2/test/recursive.jam +++ b/v2/test/recursive.jam @@ -1,8 +1,7 @@ -# (C) Copyright David Abrahams 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" without express or implied warranty, and with no claim as -# to its suitability for any purpose. +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2005 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) ############################################################## # Rules and actions that test Jam by invoking it recursively # diff --git a/v2/test/relative_sources.py b/v2/test/relative_sources.py index 8bab211ad..e03f999bc 100644 --- a/v2/test/relative_sources.py +++ b/v2/test/relative_sources.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2006 Vladimir Prus +# 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) + # Test that we can specify sources using relative names. from BoostBuild import Tester diff --git a/v2/test/searched_lib.py b/v2/test/searched_lib.py index 353d21dea..9e3ea7f48 100644 --- a/v2/test/searched_lib.py +++ b/v2/test/searched_lib.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# 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) + # Test usage of searched-libs: one which are found via -l # switch to the linker/compiler. diff --git a/v2/test/skipping.py b/v2/test/skipping.py index 34e41066c..0c74a89f4 100644 --- a/v2/test/skipping.py +++ b/v2/test/skipping.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003 Vladimir Prus +# 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) # Test that V2 does not fail gracelessy when any target is skipped. from BoostBuild import Tester, List diff --git a/v2/test/stage.py b/v2/test/stage.py index e116baffd..ba7ff693f 100644 --- a/v2/test/stage.py +++ b/v2/test/stage.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# 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) + # Test staging from BoostBuild import Tester diff --git a/v2/test/standalone.py b/v2/test/standalone.py index 94e62593a..70a95ee88 100644 --- a/v2/test/standalone.py +++ b/v2/test/standalone.py @@ -1,10 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. - +# Copyright 2003 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/startup_v1.py b/v2/test/startup_v1.py index 2d80c8a02..3598c9351 100644 --- a/v2/test/startup_v1.py +++ b/v2/test/startup_v1.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2002 Dave Abrahams +# Copyright 2003, 2004, 2005 Vladimir Prus +# 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) + from BoostBuild import Tester import os import re diff --git a/v2/test/startup_v2.py b/v2/test/startup_v2.py index cdf31026a..abffbb828 100644 --- a/v2/test/startup_v2.py +++ b/v2/test/startup_v2.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2002 Dave Abrahams +# Copyright 2003, 2004 Vladimir Prus +# 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) + from BoostBuild import Tester import os import re diff --git a/v2/test/suffix.py b/v2/test/suffix.py index 7a73feb1d..38b8ad2a3 100644 --- a/v2/test/suffix.py +++ b/v2/test/suffix.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004 Vladimir Prus +# 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) from BoostBuild import Tester, List diff --git a/v2/test/symlink.py b/v2/test/symlink.py index 86fa0a06a..92c06248f 100644 --- a/v2/test/symlink.py +++ b/v2/test/symlink.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2003 Vladimir Prus +# 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) + # Test the 'symlink' rule from BoostBuild import Tester, List diff --git a/v2/test/test-config-example.jam b/v2/test/test-config-example.jam index 4e4822aab..b2f3170c5 100644 --- a/v2/test/test-config-example.jam +++ b/v2/test/test-config-example.jam @@ -1,3 +1,7 @@ +# Copyright 2004, 2005, 2006 Vladimir Prus +# 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) + # Skeleton for test configuration. If your local configuration # interferes with testing, rename this files to 'test-system.jam' @@ -12,4 +16,4 @@ using boostbook : /home/ghost/Store/docbook/dtd : /home/ghost/Work/boost-rc/tools/boostbook ; -using doxygen ; \ No newline at end of file +using doxygen ; diff --git a/v2/test/test.jam b/v2/test/test.jam index b3aa7bf89..5e1aae9bc 100644 --- a/v2/test/test.jam +++ b/v2/test/test.jam @@ -1,3 +1,9 @@ +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2002 Rene Rivera +# Copyright 2002, 2003, 2004 Vladimir Prus +# 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) + import indirect ; import string ; import numbers ; diff --git a/v2/test/test1.py b/v2/test/test1.py index d02ea29aa..9253269a9 100644 --- a/v2/test/test1.py +++ b/v2/test/test1.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002 Vladimir Prus +# 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) + import BoostBuild t = BoostBuild.Tester() diff --git a/v2/test/test2.py b/v2/test/test2.py index cb74b851f..b982d4001 100644 --- a/v2/test/test2.py +++ b/v2/test/test2.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2003 Vladimir Prus +# 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) + from BoostBuild import Tester, List from time import sleep diff --git a/v2/test/test_nt_line_length.jam b/v2/test/test_nt_line_length.jam index 9fce71b97..bc003964e 100644 --- a/v2/test/test_nt_line_length.jam +++ b/v2/test/test_nt_line_length.jam @@ -1,8 +1,6 @@ -# (C) Copyright David Abrahams 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" without express or implied warranty, and with no claim as -# to its suitability for any purpose. +# Copyright 2001 Dave 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) # Test that the patch which allows long command-lines in actions on NT is # working. For reasons of backward-compatibility, this patch requires that the diff --git a/v2/test/testing_primitives.py b/v2/test/testing_primitives.py index 8e8c04490..b2607390b 100644 --- a/v2/test/testing_primitives.py +++ b/v2/test/testing_primitives.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002 Dave 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) + from BoostBuild import Tester, List import os from string import strip diff --git a/v2/test/tree.py b/v2/test/tree.py index ade46718f..561f8e4f8 100644 --- a/v2/test/tree.py +++ b/v2/test/tree.py @@ -1,8 +1,7 @@ -# Copyright (C) 2001 Vladimir Prus. Permission to copy, use, modify, sell and -# distribute this software is granted, provided this copyright notice appears -# in all copies and modified versions are clearly marked as such. This software -# is provided "as is" without express or implied warranty, and with no claim as -# to is suitability for any purpose. +# Copyright 2003 Dave Abrahams +# Copyright 2001, 2002 Vladimir Prus +# 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) # This file is based in part on the content of svn_tree.py. diff --git a/v2/test/unit-tests.jam b/v2/test/unit-tests.jam index 67fdf5d8b..212f4c388 100644 --- a/v2/test/unit-tests.jam +++ b/v2/test/unit-tests.jam @@ -1,8 +1,6 @@ -# (C) Copyright David Abrahams 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" without express or implied warranty, and with no claim as -# to its suitability for any purpose. +# Copyright 2001 Dave 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) # assert_equal a : b # @@ -261,4 +259,4 @@ assert_equal [ strip-initial a b c : ] : ; $(gTOP)_TOKENS = .. .. ; assert_equal [ simplify-path-tokens .. .. d e : xxx ] : xxx ; assert_equal [ simplify-path-tokens .. .. d e f g : xxx ] : f g ; -} \ No newline at end of file +} diff --git a/v2/test/unit_test.py b/v2/test/unit_test.py index 7184dc3a8..bb0d0474f 100644 --- a/v2/test/unit_test.py +++ b/v2/test/unit_test.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2003, 2004 Vladimir Prus +# 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) # Test the unit_test rule from BoostBuild import Tester, List diff --git a/v2/test/unit_tests.py b/v2/test/unit_tests.py index a5e2af4e1..7da89f609 100644 --- a/v2/test/unit_tests.py +++ b/v2/test/unit_tests.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2002, 2003 Vladimir Prus +# 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) + from BoostBuild import Tester t = Tester(pass_toolset=0) diff --git a/v2/test/unused.py b/v2/test/unused.py index c369983c1..976efed89 100644 --- a/v2/test/unused.py +++ b/v2/test/unused.py @@ -1,5 +1,9 @@ #!/usr/bin/python +# Copyright 2003 Vladimir Prus +# 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) + # Test that unused sources are at least reported. from BoostBuild import Tester diff --git a/v2/test/use_requirements.py b/v2/test/use_requirements.py index fb40573af..679436e1a 100644 --- a/v2/test/use_requirements.py +++ b/v2/test/use_requirements.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2006 Vladimir Prus +# 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) + from BoostBuild import Tester t = Tester() diff --git a/v2/test/v1_testing.py b/v2/test/v1_testing.py index 77ffc47bf..b1de60fb1 100644 --- a/v2/test/v1_testing.py +++ b/v2/test/v1_testing.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2002 Dave Abrahams +# Copyright 2004 Vladimir Prus +# 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) + from BoostBuild import Tester, List import os from string import strip diff --git a/v2/test/wrapper.py b/v2/test/wrapper.py index 345034f91..74e8516f0 100644 --- a/v2/test/wrapper.py +++ b/v2/test/wrapper.py @@ -1,9 +1,8 @@ #!/usr/bin/python -# Copyright (C) Vladimir Prus 2003. 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. +# Copyright 2004 Vladimir Prus +# 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) # Test that the user can define his own rule that will call builtin main # target rule and that this will work. From 7bd0201fd3bc221f518ee50d582def719368bc34 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 6 Nov 2006 01:44:13 +0000 Subject: [PATCH 46/91] Add copyrights+license (with help of a shell script). [SVN r35861] --- v2/build/readme.txt | 5 +++++ v2/changes.txt | 4 ++++ v2/doc/development_plan.html | 5 +++++ v2/doc/src/tasks.xml | 4 ++++ v2/doc/src/v1_vs_v2.xml | 4 ++++ v2/doc/tools.html | 5 +++++ v2/example/customization/readme.txt | 4 ++++ v2/example/gettext/readme.txt | 4 ++++ v2/example/make/readme.txt | 4 ++++ v2/example/python_modules/readme.txt | 6 +++++- v2/example/qt/README.txt | 4 ++++ v2/example/variant/readme.txt | 6 +++++- v2/hacking.txt | 4 ++++ v2/index.html | 5 +++++ v2/notes/README.txt | 4 ++++ v2/notes/build_dir_option.txt | 4 ++++ v2/notes/relative_source_paths.txt | 4 ++++ v2/release_procedure.txt | 4 ++++ v2/test/boostbook/a.hpp | 6 +++++- v2/test/boostbook/docs.xml | 5 +++++ v2/test/dependency-test/Jamfile | 4 ++++ v2/test/dependency-test/foo.jam | 5 +++++ v2/test/dependency-test/project-root.jam | 4 ++++ v2/test/dependency-test/src1/z.h | 4 ++++ v2/test/direct-request-test/Jamfile | 6 +++++- v2/test/direct-request-test/project-root.jam | 4 ++++ v2/test/generators-test/Jamfile | 4 ++++ v2/test/generators-test/extra.jam | 4 ++++ v2/test/generators-test/lex.jam | 9 ++++----- v2/test/generators-test/lib/Jamfile | 7 ++++++- v2/test/generators-test/nm.jam | 5 +++++ v2/test/generators-test/project-root.jam | 4 ++++ v2/test/generators-test/qt.jam | 5 +++++ v2/test/module-actions/boost-build.jam | 4 ++++ v2/test/module-actions/bootstrap.jam | 5 +++++ v2/test/prebuilt/Jamfile | 4 ++++ v2/test/prebuilt/ext/Jamfile | 6 +++++- v2/test/prebuilt/ext/project-root.jam | 4 ++++ v2/test/prebuilt/project-root.jam | 4 ++++ v2/test/project-test1/Jamfile | 5 +++++ v2/test/project-test1/dir/Jamfile | 7 ++++++- v2/test/project-test1/dir2/Jamfile | 5 +++++ v2/test/project-test1/dir2/project-root.jam | 4 ++++ v2/test/project-test1/project-root.jam | 6 +++++- v2/test/project-test1/project-test1.jam | 5 +++++ v2/test/project-test1/readme.txt | 7 ++++++- v2/test/project-test1/standalone-project.jam | 6 +++++- v2/test/project-test3/Jamfile | 6 +++++- v2/test/project-test3/lib/Jamfile | 6 +++++- v2/test/project-test3/lib2/Jamfile | 4 ++++ v2/test/project-test3/lib2/helper/Jamfile | 4 ++++ v2/test/project-test3/lib3/project-root.jam | 5 +++++ v2/test/project-test3/readme.txt | 4 ++++ v2/test/project-test4/Jamfile | 5 +++++ v2/test/project-test4/lib/Jamfile | 4 ++++ v2/test/project-test4/lib2/Jamfile | 4 ++++ v2/test/project-test4/project-root.jam | 4 ++++ v2/test/project-test4/readme.txt | 6 +++++- v2/test/startup/boost-root/boost-build.jam | 5 +++++ v2/test/startup/boost-root/build/boost-build.jam | 4 ++++ v2/test/startup/boost-root/build/bootstrap.jam | 4 ++++ v2/test/startup/bootstrap-env/boost-build.jam | 6 +++++- v2/test/startup/bootstrap-explicit/boost-build.jam | 7 ++++++- v2/test/startup/bootstrap-implicit/readme.txt | 6 +++++- v2/test/startup/no-bootstrap1/boost-build.jam | 4 ++++ v2/test/startup/no-bootstrap1/subdir/readme.txt | 6 +++++- v2/test/startup/no-bootstrap2/boost-build.jam | 6 +++++- v2/test/startup/no-bootstrap3/boost-build.jam | 6 +++++- v2/test/test2/Jamfile | 6 +++++- v2/test/testing-primitives/boost-build.jam | 4 ++++ v2/test/testing-primitives/bootstrap.jam | 4 ++++ v2/test/unused/Jamfile | 6 +++++- v2/test/unused/b.cpp | 4 ++++ v2/test/unused/project-root.jam | 4 ++++ v2/test/v1-testing/Jamfile | 6 +++++- v2/test/v1-testing/boost-build.jam | 4 ++++ v2/test/v1_testing/Jamfile | 6 +++++- v2/test/v1_testing/boost-build.jam | 6 +++++- v2/test/v1_testing/project-root.jam | 6 +++++- 79 files changed, 360 insertions(+), 30 deletions(-) diff --git a/v2/build/readme.txt b/v2/build/readme.txt index 85a7e8341..c3dddd8d7 100644 --- a/v2/build/readme.txt +++ b/v2/build/readme.txt @@ -1,3 +1,8 @@ +Copyright 2001, 2002 Dave Abrahams +Copyright 2002 Vladimir Prus +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) + Development code for new build system. To run unit tests for jam code, execute: bjam --debug --build-system=test diff --git a/v2/changes.txt b/v2/changes.txt index 5f6f02f4b..f6c9ddaff 100644 --- a/v2/changes.txt +++ b/v2/changes.txt @@ -1,3 +1,7 @@ +Copyright 2004, 2006 Vladimir Prus +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) + Milestone 11 (Jule 20, 2006) diff --git a/v2/doc/development_plan.html b/v2/doc/development_plan.html index b18aa1e95..598c23dae 100644 --- a/v2/doc/development_plan.html +++ b/v2/doc/development_plan.html @@ -1,5 +1,10 @@ + + + + + + + + + Common tasks diff --git a/v2/doc/src/v1_vs_v2.xml b/v2/doc/src/v1_vs_v2.xml index 7223175e7..8b77b8f01 100644 --- a/v2/doc/src/v1_vs_v2.xml +++ b/v2/doc/src/v1_vs_v2.xml @@ -2,6 +2,10 @@ + + + + Differences to Boost.Build V1 + + + + + + + + + + + + + + src1 diff --git a/v2/test/dependency-test/foo.jam b/v2/test/dependency-test/foo.jam index 56e406822..1cf44681d 100644 --- a/v2/test/dependency-test/foo.jam +++ b/v2/test/dependency-test/foo.jam @@ -1,3 +1,8 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + import type ; import generators ; import os ; diff --git a/v2/test/dependency-test/project-root.jam b/v2/test/dependency-test/project-root.jam index 3ff7e59bf..e779ecc91 100644 --- a/v2/test/dependency-test/project-root.jam +++ b/v2/test/dependency-test/project-root.jam @@ -1,3 +1,7 @@ +# Copyright 2002 Vladimir Prus +# 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) + import gcc ; import foo ; diff --git a/v2/test/dependency-test/src1/z.h b/v2/test/dependency-test/src1/z.h index 57084f4a9..7b8ca34e6 100644 --- a/v2/test/dependency-test/src1/z.h +++ b/v2/test/dependency-test/src1/z.h @@ -1 +1,5 @@ +/* Copyright 2003, 2004, 2006 Vladimir Prus */ +/* 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) */ + extern int dummy_variabled_need_to_suppress_empty_file_warning_on_hp_cxx_compiler; diff --git a/v2/test/direct-request-test/Jamfile b/v2/test/direct-request-test/Jamfile index 48541ca30..f57874d3f 100644 --- a/v2/test/direct-request-test/Jamfile +++ b/v2/test/direct-request-test/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002 Vladimir Prus +# 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) + # This will link correctly only if symbol MACROS is defined when compiling # b.cpp. However, this is only possible if that symbol is requested @@ -6,4 +10,4 @@ exe a : a.cpp b ; -lib b : b.cpp ; \ No newline at end of file +lib b : b.cpp ; diff --git a/v2/test/direct-request-test/project-root.jam b/v2/test/direct-request-test/project-root.jam index 487eef980..845aca854 100644 --- a/v2/test/direct-request-test/project-root.jam +++ b/v2/test/direct-request-test/project-root.jam @@ -1,2 +1,6 @@ +# Copyright 2002 Vladimir Prus +# 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) + import gcc ; diff --git a/v2/test/generators-test/Jamfile b/v2/test/generators-test/Jamfile index 8091b2264..e5d9242d3 100644 --- a/v2/test/generators-test/Jamfile +++ b/v2/test/generators-test/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + project # This is needed to supress gcc warning on flex output, which otherwise diff --git a/v2/test/generators-test/extra.jam b/v2/test/generators-test/extra.jam index ef639e1ef..01f086a88 100644 --- a/v2/test/generators-test/extra.jam +++ b/v2/test/generators-test/extra.jam @@ -1,3 +1,7 @@ +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + import type ; import generators ; diff --git a/v2/test/generators-test/lex.jam b/v2/test/generators-test/lex.jam index 80fc651e8..4ae5422e9 100644 --- a/v2/test/generators-test/lex.jam +++ b/v2/test/generators-test/lex.jam @@ -1,7 +1,6 @@ -# Copyright (C) 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. +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) import type ; import generators ; @@ -24,4 +23,4 @@ rule lex ( targets * : sources * : properties * ) actions lex { -} \ No newline at end of file +} diff --git a/v2/test/generators-test/lib/Jamfile b/v2/test/generators-test/lib/Jamfile index 5f9c7ade0..48ff90fd2 100644 --- a/v2/test/generators-test/lib/Jamfile +++ b/v2/test/generators-test/lib/Jamfile @@ -1,4 +1,9 @@ +# Copyright 2002 Dave Abrahams +# Copyright 2002 Vladimir Prus +# 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) + static-lib auxilliary : c.cpp ; -lib auxilliary2 : c.cpp ; \ No newline at end of file +lib auxilliary2 : c.cpp ; diff --git a/v2/test/generators-test/nm.jam b/v2/test/generators-test/nm.jam index a3044add0..ae5cda8a5 100644 --- a/v2/test/generators-test/nm.jam +++ b/v2/test/generators-test/nm.jam @@ -1,3 +1,8 @@ +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002 Vladimir Prus +# 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) + import modules ; rule target-source ( targets * : sources * : properties * ) diff --git a/v2/test/generators-test/project-root.jam b/v2/test/generators-test/project-root.jam index 7878cf2d2..abe08bc43 100644 --- a/v2/test/generators-test/project-root.jam +++ b/v2/test/generators-test/project-root.jam @@ -1,3 +1,7 @@ +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# 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) + import "class" : new ; diff --git a/v2/test/generators-test/qt.jam b/v2/test/generators-test/qt.jam index 1a4450791..ec0ee3374 100644 --- a/v2/test/generators-test/qt.jam +++ b/v2/test/generators-test/qt.jam @@ -1,3 +1,8 @@ +# Copyright 2002 Dave Abrahams +# Copyright 2002 Vladimir Prus +# 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) + import modules ; if [ modules.peek : NT ] diff --git a/v2/test/module-actions/boost-build.jam b/v2/test/module-actions/boost-build.jam index d3ce8b45b..377f6ec02 100644 --- a/v2/test/module-actions/boost-build.jam +++ b/v2/test/module-actions/boost-build.jam @@ -1 +1,5 @@ +# Copyright 2003 Dave 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) + boost-build . ; diff --git a/v2/test/module-actions/bootstrap.jam b/v2/test/module-actions/bootstrap.jam index ff52a60d3..9ea9e738c 100644 --- a/v2/test/module-actions/bootstrap.jam +++ b/v2/test/module-actions/bootstrap.jam @@ -1,3 +1,8 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2006 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) + # Demonstration that module variables have the right effect in actions # Set a variable which says how to dump a file to stdout diff --git a/v2/test/prebuilt/Jamfile b/v2/test/prebuilt/Jamfile index 02c8e5899..18b731ae1 100644 --- a/v2/test/prebuilt/Jamfile +++ b/v2/test/prebuilt/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002, 2003 Vladimir Prus +# 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) + project test : requirements release:RELEASE diff --git a/v2/test/prebuilt/ext/Jamfile b/v2/test/prebuilt/ext/Jamfile index 3393bbea9..6ae423514 100644 --- a/v2/test/prebuilt/ext/Jamfile +++ b/v2/test/prebuilt/ext/Jamfile @@ -1,6 +1,10 @@ +# Copyright 2002 Vladimir Prus +# 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) + project ext : requirements release:RELEASE ; -lib a : a.cpp ; \ No newline at end of file +lib a : a.cpp ; diff --git a/v2/test/prebuilt/ext/project-root.jam b/v2/test/prebuilt/ext/project-root.jam index 8b1378917..c7617d5d3 100644 --- a/v2/test/prebuilt/ext/project-root.jam +++ b/v2/test/prebuilt/ext/project-root.jam @@ -1 +1,5 @@ +# Copyright 2002, 2004 Vladimir Prus +# 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) + diff --git a/v2/test/prebuilt/project-root.jam b/v2/test/prebuilt/project-root.jam index e69de29bb..f022c0d64 100644 --- a/v2/test/prebuilt/project-root.jam +++ b/v2/test/prebuilt/project-root.jam @@ -0,0 +1,4 @@ +# Copyright 2002, 2004 Vladimir Prus +# 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) + diff --git a/v2/test/project-test1/Jamfile b/v2/test/project-test1/Jamfile index 34bca8fdb..d343ba6df 100644 --- a/v2/test/project-test1/Jamfile +++ b/v2/test/project-test1/Jamfile @@ -1,3 +1,8 @@ +# Copyright 2002 Dave Abrahams +# Copyright 2002 Vladimir Prus +# 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) + project /boost-build-test-project-1 : requirements multi /home/ghost/local/include ; diff --git a/v2/test/project-test1/dir/Jamfile b/v2/test/project-test1/dir/Jamfile index 6d989cd4d..3434eb791 100644 --- a/v2/test/project-test1/dir/Jamfile +++ b/v2/test/project-test1/dir/Jamfile @@ -1,5 +1,10 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2002 Vladimir Prus +# 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) + project /boost-build-test-project-1/dir : source-location src : default-build release - ; \ No newline at end of file + ; diff --git a/v2/test/project-test1/dir2/Jamfile b/v2/test/project-test1/dir2/Jamfile index cce0e26dc..8d1c48b65 100644 --- a/v2/test/project-test1/dir2/Jamfile +++ b/v2/test/project-test1/dir2/Jamfile @@ -1,3 +1,8 @@ +# Copyright 2004 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# 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) + project /cool-library : requirements /home/ghost/build/boost-cvs diff --git a/v2/test/project-test1/dir2/project-root.jam b/v2/test/project-test1/dir2/project-root.jam index e69de29bb..8cfc3a28e 100644 --- a/v2/test/project-test1/dir2/project-root.jam +++ b/v2/test/project-test1/dir2/project-root.jam @@ -0,0 +1,4 @@ +# Copyright 2002 Vladimir Prus +# 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) + diff --git a/v2/test/project-test1/project-root.jam b/v2/test/project-test1/project-root.jam index 2c2f84a4f..a61a11c1d 100644 --- a/v2/test/project-test1/project-root.jam +++ b/v2/test/project-test1/project-root.jam @@ -1,2 +1,6 @@ +# Copyright 2002 Vladimir Prus +# 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) -import builtin ; \ No newline at end of file + +import builtin ; diff --git a/v2/test/project-test1/project-test1.jam b/v2/test/project-test1/project-test1.jam index e09e6750c..2f2aad25c 100644 --- a/v2/test/project-test1/project-test1.jam +++ b/v2/test/project-test1/project-test1.jam @@ -1,3 +1,8 @@ +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2003 Vladimir Prus +# 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) + import project ; import targets ; import assert ; diff --git a/v2/test/project-test1/readme.txt b/v2/test/project-test1/readme.txt index b92e93208..000179924 100644 --- a/v2/test/project-test1/readme.txt +++ b/v2/test/project-test1/readme.txt @@ -1,3 +1,8 @@ +Copyright 2003 Dave Abrahams +Copyright 2002 Vladimir Prus +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) + This tests for basic project handling -- declaring subprojects, finding -parent projects and project roots and for working project-ids. \ No newline at end of file +parent projects and project roots and for working project-ids. diff --git a/v2/test/project-test1/standalone-project.jam b/v2/test/project-test1/standalone-project.jam index 6e630015e..48249b561 100644 --- a/v2/test/project-test1/standalone-project.jam +++ b/v2/test/project-test1/standalone-project.jam @@ -1,3 +1,7 @@ +# Copyright 2003 Vladimir Prus +# 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) + import project ; @@ -5,4 +9,4 @@ import project ; project.initialize $(__name__) ; # Now we can identify ourselfs. -project /teeest ; \ No newline at end of file +project /teeest ; diff --git a/v2/test/project-test3/Jamfile b/v2/test/project-test3/Jamfile index 3bb01cd07..f07960770 100644 --- a/v2/test/project-test3/Jamfile +++ b/v2/test/project-test3/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002, 2003 Vladimir Prus +# 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) + use-project /lib2 : lib2 ; use-project /lib3 : lib3 ; @@ -6,4 +10,4 @@ make a.exe : a.obj lib//b.obj /lib2//c.obj lib2//d.obj lib2/helper//e.obj /lib3/ make a.obj : a.cpp : yfc-compile ; build-project lib2 ; -build-project lib ; \ No newline at end of file +build-project lib ; diff --git a/v2/test/project-test3/lib/Jamfile b/v2/test/project-test3/lib/Jamfile index 2c8bf97af..76b0829a9 100644 --- a/v2/test/project-test3/lib/Jamfile +++ b/v2/test/project-test3/lib/Jamfile @@ -1,5 +1,9 @@ +# Copyright 2002, 2003 Vladimir Prus +# 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) + use-project /lib2 : ../lib2 ; make b.obj : b.cpp : yfc-compile ; -make m.exe : b.obj /lib2//c.obj : yfc-link ; \ No newline at end of file +make m.exe : b.obj /lib2//c.obj : yfc-link ; diff --git a/v2/test/project-test3/lib2/Jamfile b/v2/test/project-test3/lib2/Jamfile index 409f9e6ba..b6b0abc44 100644 --- a/v2/test/project-test3/lib2/Jamfile +++ b/v2/test/project-test3/lib2/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002, 2003 Vladimir Prus +# 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) + project lib2 ; use-project /lib2/helper : helper ; diff --git a/v2/test/project-test3/lib2/helper/Jamfile b/v2/test/project-test3/lib2/helper/Jamfile index 8480d4361..0c82f9248 100644 --- a/v2/test/project-test3/lib2/helper/Jamfile +++ b/v2/test/project-test3/lib2/helper/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002 Vladimir Prus +# 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) + project lib2/helper ; diff --git a/v2/test/project-test3/lib3/project-root.jam b/v2/test/project-test3/lib3/project-root.jam index e69de29bb..971f03096 100644 --- a/v2/test/project-test3/lib3/project-root.jam +++ b/v2/test/project-test3/lib3/project-root.jam @@ -0,0 +1,5 @@ +# Copyright 2002 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# 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) + diff --git a/v2/test/project-test3/readme.txt b/v2/test/project-test3/readme.txt index 296c50155..da27e54b2 100644 --- a/v2/test/project-test3/readme.txt +++ b/v2/test/project-test3/readme.txt @@ -1,3 +1,7 @@ +Copyright 2002 Vladimir Prus +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) + This test checks that we have minimally working 'make' rule and that we can use target from different project with different project roots. diff --git a/v2/test/project-test4/Jamfile b/v2/test/project-test4/Jamfile index f82de659f..a34d5f2db 100644 --- a/v2/test/project-test4/Jamfile +++ b/v2/test/project-test4/Jamfile @@ -1,3 +1,8 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003 Vladimir Prus +# 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) + project test : requirements everything single ; diff --git a/v2/test/project-test4/lib/Jamfile b/v2/test/project-test4/lib/Jamfile index be2c3649a..1bdb7c122 100644 --- a/v2/test/project-test4/lib/Jamfile +++ b/v2/test/project-test4/lib/Jamfile @@ -1,2 +1,6 @@ +# Copyright 2002 Vladimir Prus +# 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) + make b.obj : b.cpp : yfc-compile ; diff --git a/v2/test/project-test4/lib2/Jamfile b/v2/test/project-test4/lib2/Jamfile index 71360d959..389492bf0 100644 --- a/v2/test/project-test4/lib2/Jamfile +++ b/v2/test/project-test4/lib2/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002 Vladimir Prus +# 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) + project : requirements off diff --git a/v2/test/project-test4/project-root.jam b/v2/test/project-test4/project-root.jam index 99e62cf69..801f0afb2 100644 --- a/v2/test/project-test4/project-root.jam +++ b/v2/test/project-test4/project-root.jam @@ -1,3 +1,7 @@ +# Copyright 2002, 2003, 2005 Vladimir Prus +# 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) + import gcc ; import property ; diff --git a/v2/test/project-test4/readme.txt b/v2/test/project-test4/readme.txt index ec68724af..0c0ba2ca4 100644 --- a/v2/test/project-test4/readme.txt +++ b/v2/test/project-test4/readme.txt @@ -1,2 +1,6 @@ +Copyright 2002 Vladimir Prus +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) -This test checks for correct properties of generated and used targets. \ No newline at end of file + +This test checks for correct properties of generated and used targets. diff --git a/v2/test/startup/boost-root/boost-build.jam b/v2/test/startup/boost-root/boost-build.jam index ad718c3b0..098889f7b 100644 --- a/v2/test/startup/boost-root/boost-build.jam +++ b/v2/test/startup/boost-root/boost-build.jam @@ -1,2 +1,7 @@ +# Copyright 2002 Dave Abrahams +# Copyright 2004 Vladimir Prus +# 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) + # Emulate v1 behavior; with the boost-build file in the boost root directory. boost-build build ; diff --git a/v2/test/startup/boost-root/build/boost-build.jam b/v2/test/startup/boost-root/build/boost-build.jam index 4bd1f6fe4..610ec79ee 100644 --- a/v2/test/startup/boost-root/build/boost-build.jam +++ b/v2/test/startup/boost-root/build/boost-build.jam @@ -1,2 +1,6 @@ +# Copyright 2004 Vladimir Prus +# 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 presence of this file emulates the Boost 1.27.0 release include $(BOOST_ROOT)/tools/build/bootstrap.jam ; diff --git a/v2/test/startup/boost-root/build/bootstrap.jam b/v2/test/startup/boost-root/build/bootstrap.jam index 7cc467bf5..2ee3507c3 100644 --- a/v2/test/startup/boost-root/build/bootstrap.jam +++ b/v2/test/startup/boost-root/build/bootstrap.jam @@ -1,3 +1,7 @@ +# Copyright 2004 Vladimir Prus +# 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) + ECHO build system bootstrapped ; DEPENDS all : nothing ; NOTFILE nothing ; diff --git a/v2/test/startup/bootstrap-env/boost-build.jam b/v2/test/startup/bootstrap-env/boost-build.jam index 4a1856ed6..67a285e7c 100644 --- a/v2/test/startup/bootstrap-env/boost-build.jam +++ b/v2/test/startup/bootstrap-env/boost-build.jam @@ -1 +1,5 @@ -boost-build ; \ No newline at end of file +# Copyright 2002 Dave 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) + +boost-build ; diff --git a/v2/test/startup/bootstrap-explicit/boost-build.jam b/v2/test/startup/bootstrap-explicit/boost-build.jam index 3c7be1b7b..27d9108b7 100644 --- a/v2/test/startup/bootstrap-explicit/boost-build.jam +++ b/v2/test/startup/bootstrap-explicit/boost-build.jam @@ -1 +1,6 @@ -boost-build ../boost-root/build ; \ No newline at end of file +# Copyright 2002 Dave Abrahams +# Copyright 2004 Vladimir Prus +# 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) + +boost-build ../boost-root/build ; diff --git a/v2/test/startup/bootstrap-implicit/readme.txt b/v2/test/startup/bootstrap-implicit/readme.txt index 9191721c2..0278716e5 100644 --- a/v2/test/startup/bootstrap-implicit/readme.txt +++ b/v2/test/startup/bootstrap-implicit/readme.txt @@ -1 +1,5 @@ -This file is only here so that cvs update -P won't fail to create a directory \ No newline at end of file +Copyright 2002 Dave 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) + +This file is only here so that cvs update -P won't fail to create a directory diff --git a/v2/test/startup/no-bootstrap1/boost-build.jam b/v2/test/startup/no-bootstrap1/boost-build.jam index d1c56d659..b1b4dc696 100644 --- a/v2/test/startup/no-bootstrap1/boost-build.jam +++ b/v2/test/startup/no-bootstrap1/boost-build.jam @@ -1,2 +1,6 @@ +# Copyright 2002 Dave 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) + # Bootstrap file not found via implicit lookup in BOOST_BUILD_PATH boost-build ; diff --git a/v2/test/startup/no-bootstrap1/subdir/readme.txt b/v2/test/startup/no-bootstrap1/subdir/readme.txt index 84703f408..00f428d44 100644 --- a/v2/test/startup/no-bootstrap1/subdir/readme.txt +++ b/v2/test/startup/no-bootstrap1/subdir/readme.txt @@ -1 +1,5 @@ -This file is only here so cvs update -P will create the directory. \ No newline at end of file +Copyright 2002 Dave 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) + +This file is only here so cvs update -P will create the directory. diff --git a/v2/test/startup/no-bootstrap2/boost-build.jam b/v2/test/startup/no-bootstrap2/boost-build.jam index b306ec7d4..505dcd775 100644 --- a/v2/test/startup/no-bootstrap2/boost-build.jam +++ b/v2/test/startup/no-bootstrap2/boost-build.jam @@ -1,2 +1,6 @@ +# Copyright 2002 Dave 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) + # Bootstrap file not found via explicit lookup in . -boost-build . ; \ No newline at end of file +boost-build . ; diff --git a/v2/test/startup/no-bootstrap3/boost-build.jam b/v2/test/startup/no-bootstrap3/boost-build.jam index bbf25baa0..252a3993c 100644 --- a/v2/test/startup/no-bootstrap3/boost-build.jam +++ b/v2/test/startup/no-bootstrap3/boost-build.jam @@ -1 +1,5 @@ -# Call to boost-build is intentionally missing \ No newline at end of file +# Copyright 2002 Dave 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) + +# Call to boost-build is intentionally missing diff --git a/v2/test/test2/Jamfile b/v2/test/test2/Jamfile index ca3adadbc..670583964 100644 --- a/v2/test/test2/Jamfile +++ b/v2/test/test2/Jamfile @@ -1,4 +1,8 @@ +# Copyright 2002 Vladimir Prus +# 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) + project-root ; -exe foo : foo.cpp ; \ No newline at end of file +exe foo : foo.cpp ; diff --git a/v2/test/testing-primitives/boost-build.jam b/v2/test/testing-primitives/boost-build.jam index d3ce8b45b..667355a16 100644 --- a/v2/test/testing-primitives/boost-build.jam +++ b/v2/test/testing-primitives/boost-build.jam @@ -1 +1,5 @@ +# Copyright 2002 Dave 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) + boost-build . ; diff --git a/v2/test/testing-primitives/bootstrap.jam b/v2/test/testing-primitives/bootstrap.jam index 15a3b96ba..2b1ad4854 100644 --- a/v2/test/testing-primitives/bootstrap.jam +++ b/v2/test/testing-primitives/bootstrap.jam @@ -1,3 +1,7 @@ +# Copyright 2002 Dave 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) + # Proof-of-concept for bjam-based testing mechanism. This file should # work on NT, Cygwin, and Linux. No promises for other platforms. diff --git a/v2/test/unused/Jamfile b/v2/test/unused/Jamfile index ad0c38425..58ef45605 100644 --- a/v2/test/unused/Jamfile +++ b/v2/test/unused/Jamfile @@ -1,7 +1,11 @@ +# Copyright 2003 Vladimir Prus +# 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) + exe a : a.cpp b c ; make-b-main-target ; # Expands to nothing, intentionally. -alias c ; \ No newline at end of file +alias c ; diff --git a/v2/test/unused/b.cpp b/v2/test/unused/b.cpp index e69de29bb..5551e35f6 100644 --- a/v2/test/unused/b.cpp +++ b/v2/test/unused/b.cpp @@ -0,0 +1,4 @@ +/* Copyright 2003 Vladimir Prus */ +/* 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) */ + diff --git a/v2/test/unused/project-root.jam b/v2/test/unused/project-root.jam index b3dd5ebc9..75832afd2 100644 --- a/v2/test/unused/project-root.jam +++ b/v2/test/unused/project-root.jam @@ -1,3 +1,7 @@ +# Copyright 2003 Vladimir Prus +# 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) + import type ; import generators ; diff --git a/v2/test/v1-testing/Jamfile b/v2/test/v1-testing/Jamfile index c9f12b688..011940f8a 100644 --- a/v2/test/v1-testing/Jamfile +++ b/v2/test/v1-testing/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002, 2003 Dave 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) + import testing ; # A number of tests which should succeed @@ -19,4 +23,4 @@ run c.cpp : : : RESULTCODE=1 : fail-run-yes ; # Make sure we still fail if a dependency of an expected-failure test # fails. -link-fail b.cpp : : fail-link-no-dependency ; \ No newline at end of file +link-fail b.cpp : : fail-link-no-dependency ; diff --git a/v2/test/v1-testing/boost-build.jam b/v2/test/v1-testing/boost-build.jam index f84e8619d..d9e748ec2 100644 --- a/v2/test/v1-testing/boost-build.jam +++ b/v2/test/v1-testing/boost-build.jam @@ -1,2 +1,6 @@ +# Copyright 2002 Dave 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) + TOOLS = gcc ; boost-build ../.. ; diff --git a/v2/test/v1_testing/Jamfile b/v2/test/v1_testing/Jamfile index 601bba762..2e0bedac7 100644 --- a/v2/test/v1_testing/Jamfile +++ b/v2/test/v1_testing/Jamfile @@ -1,3 +1,7 @@ +# Copyright 2002, 2003 Dave 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) + TOOLS = $(TOOLS[1]) ; project-root ; @@ -16,4 +20,4 @@ run foo.cpp mylib : # args : # input-files : RUN - : run ; \ No newline at end of file + : run ; diff --git a/v2/test/v1_testing/boost-build.jam b/v2/test/v1_testing/boost-build.jam index 371d6272a..d9e748ec2 100644 --- a/v2/test/v1_testing/boost-build.jam +++ b/v2/test/v1_testing/boost-build.jam @@ -1,2 +1,6 @@ +# Copyright 2002 Dave 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) + TOOLS = gcc ; -boost-build ../.. ; \ No newline at end of file +boost-build ../.. ; diff --git a/v2/test/v1_testing/project-root.jam b/v2/test/v1_testing/project-root.jam index be364c892..fe6942458 100644 --- a/v2/test/v1_testing/project-root.jam +++ b/v2/test/v1_testing/project-root.jam @@ -1 +1,5 @@ -# just label the project root \ No newline at end of file +# Copyright 2002 Dave 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) + +# just label the project root From b7e23a23b514c47148b3555a5b13d17312f6ffe4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 06:16:24 +0000 Subject: [PATCH 47/91] Corrections to PCH docs from Charles Brockman. Documentation for the debug-symbols feature. [SVN r35912] --- v2/doc/src/tasks.xml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/v2/doc/src/tasks.xml b/v2/doc/src/tasks.xml index 929c57e06..5189e277a 100644 --- a/v2/doc/src/tasks.xml +++ b/v2/doc/src/tasks.xml @@ -463,7 +463,7 @@ actions echo
- Precompiled headers + Precompiled Headers Precompiled headers is a mechanism to speed up compilation by creating a partially processed version of some header files, @@ -481,8 +481,8 @@ actions echo when PCH is not enabled. Include the new header at the top of your source files. - Declare new Boost.Build target for the precompiled header - and add that precompiled header to sources of the target whose compilation + Declare a new Boost.Build target for the precompiled header + and add that precompiled header to the sources of the target whose compilation you want to speed up: cpp-pch pch : header.hpp ; @@ -501,14 +501,14 @@ exe main : main.cpp pch ; first thing in a source file, before any code or preprocessor directives. - The build properties used to build the sources and the - preprocessed must be the same. Consider using project requirements to - assure this. + The build properties used to compile the source files + and the precompiled header must be the same. Consider using + project requirements to assure this. Precompiled headers must be used purely as a way to - improve compilation time, not to save the number of include statements. - If a source file needs to include some header, explicitly include + improve compilation time, not to save the number of #include + statements. If a source file needs to include some header, explicitly include it in the source file, even if the same header is included from the precompiled header. This makes sure that your project will build even if precompiled headers are not supported. @@ -805,6 +805,21 @@ exe app : app.cpp : <implicit-dependency>parser ; + debug-symbols + + + Allowed values: on, off. + + The debug-symbols feature specifies if + produced object files, executables and libraries should include + debug information. + Typically, the value of this feature is implicitly set by the + variant feature, but it can be explicitly + specified by the user. The most common usage is to build + release variant with debugging information. + + + From a04c7bcc9740d0ed67d46467d178ef419196a5c9 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 07:18:00 +0000 Subject: [PATCH 48/91] Corrections to target docs from Charles Brockman. Created a new section with a list of main target rules. [SVN r35914] --- v2/doc/src/advanced.xml | 30 +++++++++++----------- v2/doc/src/reference.xml | 54 ++++++++++++++++++++++++++++++++++++++++ v2/doc/src/tasks.xml | 8 +++--- 3 files changed, 74 insertions(+), 18 deletions(-) diff --git a/v2/doc/src/advanced.xml b/v2/doc/src/advanced.xml index b6377858c..0e1e49961 100644 --- a/v2/doc/src/advanced.xml +++ b/v2/doc/src/advanced.xml @@ -543,7 +543,7 @@ bjam optimization=space entity that can be built, for example an executable file. Declaring a main target is usually done using one of the main target rules described in . The user can also declare + "bbv2.reference.target-rules"/>. The user can also declare custom main target rules as shown in . @@ -603,7 +603,7 @@ rule rule-name ( default-build is the list of properties that will be used unless some other value of the same feature is already - specified, e.g. on the command line or by propogation from a dependent target. + specified, e.g. on the command line or by propagation from a dependent target. @@ -617,8 +617,8 @@ rule rule-name ( - Some main target rules have a different list of parameters, their - documentation explicitly says so. + Some main target rules have a different list of parameters as explicitly + stated in their documentation. The actual requirements for a target are obtained by refining @@ -637,7 +637,8 @@ rule rule-name ( prefixes. - Name of main target can contain alphanumeral characters, dash, undescore and dot. The entire + THe name of a main target can contain alphanumeral characters, + dashes, undescores and dots. The entire name is significant when resolving references from other targets. For determining filenames, only the part before the first dot is taken. For example: @@ -676,9 +677,9 @@ exe b : [ glob *.cpp ] ; # all .cpp files in this directory are sources Targets in the same project can be referred to by name, while targets in other projects must be qualified with a directory or a symbolic project name. The directory/project name is separated from - the target name by double slash. There's no special syntax to - distinguish directory name from project name—the part before - double slash is first looked up as project name, and then as directory + the target name by a double forward slash. There's no special syntax to + distinguish the directory name from the project name—the part before + the double slash is first looked up as project name, and then as directory name. For example: lib helper : helper.cpp ; @@ -745,7 +746,8 @@ lib network : network.cpp - More powerfull variant of conditional requirements is indirect conditional requiremens. + A more powerful variant of conditional requirements + is indirect conditional requirements. You can provide a rule that will be called with the current build properties and can compute additional properties to be added. For example: @@ -769,11 +771,11 @@ rule my-rule ( properties * ) Requirements explicitly specified for a target are usually combined with the requirements specified for the containing project. You can cause a target to completely ignore specific project's requirement - using the syntax by adding minus sign before a property, for example: + using the syntax by adding a minus sign before a property, for example: exe main : main.cpp : -<define>UNNECESSARY_DEFINE ; - This syntax is the only way to ignore free properties from parent, + This syntax is the only way to ignore free properties from a parent, such as defines. It can be also useful for ordinary properties. Consider this example: @@ -791,7 +793,7 @@ exe test3 : test3.cpp : -<threading;>multi ; multi-threaded mode depending on which variant is requested by the user. - Note that removing of requirements is completely textual: + Note that the removal of requirements is completely textual: you need to specify exactly the same property to remove it.
@@ -805,10 +807,10 @@ exe test3 : test3.cpp : -<threading;>multi ; exe hello : hello.cpp : : <threading>multi ; - would build a multi-threaded target in unless the user + would build a multi-threaded target unless the user explicitly requests a single-threaded version. The difference between requirements and default-build is that requirements cannot be - overriden in any way. + overridden in any way. diff --git a/v2/doc/src/reference.xml b/v2/doc/src/reference.xml index d3c6796f6..3d9e79522 100644 --- a/v2/doc/src/reference.xml +++ b/v2/doc/src/reference.xml @@ -228,6 +228,60 @@ target1 debug gcc/runtime-link=dynamic,static +
+ Builtin targets + + This section contains the list of all target types defined + in Boost.Build. + + + + exe + + Creates an executable file. See + . + + + + lib + + Creates an library file. See + . + + + + install + + Installs built targets and other files. See + . + + + + alias + + Creates an alias for other targets. See + . + + + + unit-test + + Creates an executable that will be automatically run. See + . + + + + obj + + Creates an object file. Useful when a single source + file must be compiled with special properties. + + + + +
+ +
Jamfile Utility Rules diff --git a/v2/doc/src/tasks.xml b/v2/doc/src/tasks.xml index 5189e277a..9932b35c2 100644 --- a/v2/doc/src/tasks.xml +++ b/v2/doc/src/tasks.xml @@ -15,7 +15,7 @@ linkend="bbv2.main-target-rule-syntax"/>. -
+
Programs Builtin @@ -52,7 +52,7 @@ exe hello : hello.cpp some_library.lib /some_project//library
-
+
Libraries Libraries are created using the lib rule, which @@ -190,7 +190,7 @@ lib a : a.cpp : <use>b : : <library>b ;
-
+
Alias @@ -238,7 +238,7 @@ exe main : main.cpp lib_alias ;
-
+
Installing This section describes various ways to install built target From 61b0d8581fc7ce4ef7d8edfcaf34c3045934aceb Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:36:02 +0000 Subject: [PATCH 49/91] Unbreak notfile.py [SVN r35916] --- v2/test/BoostBuild.py | 17 ++++++++++++++++- v2/test/notfile.py | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index a1aff2cba..846034344 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -522,7 +522,22 @@ class Tester(TestCmd.TestCmd): print 'FAILED' print '------- The following changes were unexpected ------- ' self.unexpected_difference.pprint() - self.fail_test(1) + self.fail_test(1) + + def expect_output_line(self, expected): + expected = expected.strip() + lines = self.stdout().splitlines() + found = 0 + for line in lines: + line = line.strip() + if fnmatch.fnmatch(line, expected): + found = 1 + break + + if not found: + print "Did not found expected line in output:" + print expected + self.fail_test(1) def expect_content(self, name, content, exact=0): name = self.adjust_names(name)[0] diff --git a/v2/test/notfile.py b/v2/test/notfile.py index a50a0c8fa..02b1ee238 100644 --- a/v2/test/notfile.py +++ b/v2/test/notfile.py @@ -10,6 +10,7 @@ from BoostBuild import Tester, List import string import os +import fnmatch t = Tester() @@ -48,7 +49,7 @@ t.fail_test(string.find(t.stdout(), "echo hi") == -1) name = t.adjust_names(["bin/$toolset/debug/hello.exe"])[0] name = apply(os.path.join, string.split(name, "/")); c = "valgrind " + name -t.fail_test(string.find(t.stdout(), c) == -1) +t.expect_output_line(c) t.cleanup() From 316ecd82a11afb1562803388ea5c9f3273cd5200 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:37:28 +0000 Subject: [PATCH 50/91] Robustify Tester.expect_content [SVN r35917] --- v2/test/BoostBuild.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 846034344..18920c743 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -551,20 +551,22 @@ class Tester(TestCmd.TestCmd): self.fail_test(1) content = string.replace(content, "$toolset", self.toolset+"*") - + + matched = 0 if exact: matched = fnmatch.fnmatch(actual,content) else: - actual_ = map(lambda x: sorted(x.split()),actual.splitlines()) - content_ = map(lambda x: sorted(x.split()),content.splitlines()) - matched = map( - lambda x,y: map(lambda n,p: fnmatch.fnmatch(n,p),x,y), - actual_, content_ ) - matched = reduce( - lambda x,y: x and reduce( - lambda a,b: a and b, + if len(actual_) == len(content_): + actual_ = map(lambda x: sorted(x.split()),actual.splitlines()) + content_ = map(lambda x: sorted(x.split()),content.splitlines()) + matched = map( + lambda x,y: map(lambda n,p: fnmatch.fnmatch(n,p),x,y), + actual_, content_ ) + matched = reduce( + lambda x,y: x and reduce( + lambda a,b: a and b, y ), - matched ) + matched ) if not matched: print "Expected:\n" From 409b16c1d5d6142d82029a1b05fbab1bc0e82d5e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:42:12 +0000 Subject: [PATCH 51/91] Unbreak rebuilds.py [SVN r35918] --- v2/test/rebuilds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/test/rebuilds.py b/v2/test/rebuilds.py index 87c4d26da..60df62f1d 100644 --- a/v2/test/rebuilds.py +++ b/v2/test/rebuilds.py @@ -19,7 +19,7 @@ rule make actions make { echo "******" making $(<) from $(>) "******" - echo made from $(>) >> $(<) + echo made from $(>) > $(<) } make aux1 : bar ; From aaed235d79d75fbef1c5f5fcde234b6272b5be6a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:42:55 +0000 Subject: [PATCH 52/91] Fix thinko [SVN r35919] --- v2/test/BoostBuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 18920c743..209ab0219 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -556,9 +556,9 @@ class Tester(TestCmd.TestCmd): if exact: matched = fnmatch.fnmatch(actual,content) else: + actual_ = map(lambda x: sorted(x.split()),actual.splitlines()) + content_ = map(lambda x: sorted(x.split()),content.splitlines()) if len(actual_) == len(content_): - actual_ = map(lambda x: sorted(x.split()),actual.splitlines()) - content_ = map(lambda x: sorted(x.split()),content.splitlines()) matched = map( lambda x,y: map(lambda n,p: fnmatch.fnmatch(n,p),x,y), actual_, content_ ) From 785ff1614e6552fc10ea215dea0f0e9f045efc0c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 09:07:01 +0000 Subject: [PATCH 53/91] Don't emit any messages when no is in properties. [SVN r35921] --- v2/build/targets.jam | 9 ++++----- v2/test/build_no.py | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 533845511..23962a258 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1217,12 +1217,11 @@ class basic-target : abstract-target } else { + # We're here either because there's error computing + # properties, or there's no in properties. + # In the latter case we don't want any diagnostic. + # In the former case, we need diagnostics. FIXME. self.generated.$(property-set) = $(rproperties) ; - - if $(rproperties[1]) != "@error" - { - ECHO "Skipping build of" [ full-name ] "-- no in properties." ; - } } } else diff --git a/v2/test/build_no.py b/v2/test/build_no.py index f10daeaed..ce5c51e46 100644 --- a/v2/test/build_no.py +++ b/v2/test/build_no.py @@ -28,8 +28,6 @@ int main() t.run_build_system() t.expect_nothing_more() -t.fail_test(string.find(t.stdout(), "Skipping build of ./hello -- no in properties.") == -1) - t.run_build_system("release") t.expect_addition("bin/$toolset/release/hello.exe") From 48423881f3795f792eaf7a5bd22c3d4b2d5f136c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 09:59:42 +0000 Subject: [PATCH 54/91] Test that project's path requirements can be removed by a main target. [SVN r35923] --- v2/test/remove_requirement.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/v2/test/remove_requirement.py b/v2/test/remove_requirement.py index 5f49baeb0..6bbc20938 100644 --- a/v2/test/remove_requirement.py +++ b/v2/test/remove_requirement.py @@ -78,5 +78,38 @@ t.expect_addition("sub2/bin/$toolset/debug/link-static/hello.exe") t.expect_addition("sub3/bin/$toolset/debug/threading-multi/hello.exe") t.expect_addition("sub4/bin/$toolset/debug/threading-multi/hello.exe") +t.rm(".") + +# No test that path requirements can be removed as well. +t.write("Jamroot", """ +build-project sub ; + +""") + +t.write("sub/Jamfile", """ +project : requirements broken ; + +exe hello : hello.cpp : -broken ; +""") + +t.write("sub/hello.cpp", """ +#include "math.h" + +int main() +{ + return 0; +} + +""") + +t.write("sub/broken/math.h", """ +Broken +""") + + +t.run_build_system() + +t.expect_addition("bin/$toolset/debug/hello.exe") + t.cleanup() From 197452b70f9299ac6a6fffe05ecc69612518e58f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 10:01:35 +0000 Subject: [PATCH 55/91] Fix removing of path features. [SVN r35924] --- v2/build/property-set.jam | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v2/build/property-set.jam b/v2/build/property-set.jam index bed3b4b4f..0dd7d958c 100644 --- a/v2/build/property-set.jam +++ b/v2/build/property-set.jam @@ -425,9 +425,15 @@ rule refine-from-user-input ( parent-requirements : specification * if $(remove-requirements) { + # Need to create property set, so that path features + # and indirect features are translated just like they + # are in project requirements. + local ps = [ property-set.create-from-user-input + $(remove-requirements) : $(project-module) $(location) ] ; + parent-requirements = [ property-set.create [ set.difference [ $(parent-requirements).raw ] - : $(remove-requirements) ] ] ; + : [ $(ps).raw ] ] ] ; specification = $(add-requirements) ; } From b465fea87f7d83eed3618c43704d6e671f90aea8 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 07:40:42 +0000 Subject: [PATCH 56/91] Revive some more tests [SVN r35968] --- v2/test/BoostBuild.py | 24 +++++++++++++++++++----- v2/test/dll_path.py | 5 ++--- v2/test/library_chain.py | 7 ++++--- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 209ab0219..1779455e9 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -524,9 +524,9 @@ class Tester(TestCmd.TestCmd): self.unexpected_difference.pprint() self.fail_test(1) - def expect_output_line(self, expected): + def _expect_line(self, content, expected): expected = expected.strip() - lines = self.stdout().splitlines() + lines = content.splitlines() found = 0 for line in lines: line = line.strip() @@ -537,19 +537,33 @@ class Tester(TestCmd.TestCmd): if not found: print "Did not found expected line in output:" print expected + print "The output was:" + print content self.fail_test(1) - def expect_content(self, name, content, exact=0): + def expect_output_line(self, expected): + self._expect_line(self.stdout(), expected) + + def expect_content_line(self, name, expected): + content = self._read_file(name) + self._expect_line(content, expected) + + def _read_file(self, name, exact=0): name = self.adjust_names(name)[0] + result = "" try: if exact: - actual = self.read(name) + result = self.read(name) else: - actual = string.replace(self.read_and_strip(name), "\\", "/") + result = string.replace(self.read_and_strip(name), "\\", "/") except IOError: print "Note: could not open file", name self.fail_test(1) + return result + + def expect_content(self, name, content, exact=0): + actual = self._read_file(name, exact) content = string.replace(content, "$toolset", self.toolset+"*") matched = 0 diff --git a/v2/test/dll_path.py b/v2/test/dll_path.py index 4e37363a0..cdf640e20 100644 --- a/v2/test/dll_path.py +++ b/v2/test/dll_path.py @@ -119,10 +119,9 @@ t.expect_addition("bin/$toolset/debug/mp.pathlist") es1 = t.adjust_names(["a/bin/$toolset/debug"])[0] es2 = t.adjust_names(["b/bin/$toolset/debug"])[0] -content = t.read("bin/$toolset/debug/mp.pathlist") -t.fail_test(find(content, es1) == -1) -t.fail_test(find(content, es2) == -1) +t.expect_content_line("bin/$toolset/debug/mp.pathlist", "*" + es1); +t.expect_content_line("bin/$toolset/debug/mp.pathlist", "*" + es2); t.cleanup() diff --git a/v2/test/library_chain.py b/v2/test/library_chain.py index e211b9baf..958609027 100644 --- a/v2/test/library_chain.py +++ b/v2/test/library_chain.py @@ -114,6 +114,7 @@ t.rm(".") t.write("Jamroot", "") t.write("a/Jamfile", """ lib a : a.cpp ; +install dist : a ; """) t.write("a/a.cpp", """ #if defined(_WIN32) @@ -122,12 +123,12 @@ __declspec(dllexport) void a() {} """) t.run_build_system(subdir="a") -t.expect_addition("a/bin/$toolset/debug/a.dll") +t.expect_addition("a/dist/a.dll") if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc': - file = t.adjust_names(["a/bin/$toolset/debug/a.lib"])[0] + file = t.adjust_names(["a/dist/a.lib"])[0] else: - file = t.adjust_names(["a/bin/$toolset/debug/a.dll"])[0] + file = t.adjust_names(["a/dist/a.dll"])[0] t.write("b/Jamfile", """ lib b : b.cpp ../%s ; From 1541ad67d46d19b45e31641a727db1fa8f1816ce Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 08:35:39 +0000 Subject: [PATCH 57/91] Summarize some changes [SVN r35970] --- v2/changes.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/v2/changes.txt b/v2/changes.txt index f6c9ddaff..8346d03d4 100644 --- a/v2/changes.txt +++ b/v2/changes.txt @@ -3,6 +3,36 @@ 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) +Milestone 12 (in development) + +Changes in this release: + + - Support for precompiled headers for gcc toolset, + and improvements for msvc. + - Mechanism for removing inherited requirements. + - The 'make' rule support specifying usage-requirements. + - New 'project.extension' rule for declaring standalone + projects. + - New 'conditional' convenience rule. + - New 'path.glob-tree' rule. + - Inline targets are now marked explicit automatically. + +Documentation changes: + + - Installation instructions for Linux distributors. + +The following bugs were fixed: + + - The 'cflags' and 'linkflags' features not working for Darwin. + - The intel toolset not working on Windows. + - Fix library search options for CodeWarriour toolset. + - The could cause duplicate + mkdir commands. + - Numerious fixes in Boost autolink support + - Numerious fixes in Boost.Python support. + + + Milestone 11 (Jule 20, 2006) Changes in this release: From 4797d12c0b1f61cb1a2f1074317fdb9809942621 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 08:45:03 +0000 Subject: [PATCH 58/91] New rule common.hard-link [SVN r35972] --- v2/tools/common.jam | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/v2/tools/common.jam b/v2/tools/common.jam index fee26a2b2..e737a907a 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -411,11 +411,13 @@ if [ os.name ] = NT RM = del /f /q ; CP = copy ; IGNORE = "2>nul >nul & setlocal" ; + LN ?= $(CP) ; } else { RM = rm -f ; CP = cp ; + LN = ln ; } nl = " @@ -576,6 +578,13 @@ actions quietly updated piecemeal together RmTemps $(RM) "$(>)" $(IGNORE) } +actions hard-link +{ + $(RM) "$(<)" 2$(NULL_OUT) $(NULL_OUT) + $(LN) "$(>)" "$(<)" $(NULL_OUT) +} + + # Given a target, as given to a custom tag rule, returns a string formatted # according to the passed format. Format is a list of properties that is # represented in the result. For each element of format the corresponding From bf9418bb6a1789e2edfcfcbff6606f707e3d0aa2 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 17:18:55 +0000 Subject: [PATCH 59/91] Make it possible to suppress generation of version symlinks [SVN r35979] --- v2/tools/stage.jam | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index d955f40b3..ddded70ed 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -24,6 +24,9 @@ import path ; feature.feature : off on : incidental ; feature.feature : : free incidental ; feature.feature : : free path ; +# If 'on', version symblinks for shared libraries won't be created +# This feature has effect only on Unix. +feature.feature : on : optional incidental ; feature.feature : : free incidental ; class install-target-class : basic-target @@ -95,6 +98,9 @@ class install-target-class : basic-target local d = [ $(build-property-set).get ] ; ps-raw += $(d:G=) ; + local ns = [ $(build-property-set).get ] ; + ps-raw += $(ns:G=) ; + local d = [ $(build-property-set).get ] ; # Make the path absolute: we'll use it to compute relative # paths and making the path absolute will help. @@ -425,12 +431,28 @@ class installed-shared-lib-generator : generator : [ $(copied).name ] ] ; if $(m) { - result += [ stage.symlink $(m[1]).$(m[2]) : $(project) - : $(copied) : $(property-set) ] ; - result += [ stage.symlink $(m[1]).$(m[2]).$(m[3]) : $(project) - : $(copied) : $(property-set) ] ; + # Symlink without version at all is used to make + # -lsome_library work. + result += [ stage.symlink $(m[1]) : $(project) + : $(copied) : $(property-set) ] ; + + # Symlinks of some libfoo.N and libfoo.N.M are used + # so that library can found at runtime, if libfoo.N.M.X + # has soname of libfoo.N. That happens when the library + # makes some binary compatibility guarantees. If not, + # it's possible to skip those symlinks. + local suppress = + [ $(property-set).get ] ; + + if $(suppress) != "on" + { + result += [ stage.symlink $(m[1]).$(m[2]) : $(project) + : $(copied) : $(property-set) ] ; + result += [ stage.symlink $(m[1]).$(m[2]).$(m[3]) : $(project) + : $(copied) : $(property-set) ] ; + } } - + return $(result) ; } } From 37fecef749936477eb917635d215419caec105aa Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 17:24:16 +0000 Subject: [PATCH 60/91] New main target rule 'generate' [SVN r35983] --- v2/tools/builtin.jam | 1 + v2/tools/generate.jam | 108 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 v2/tools/generate.jam diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index e057567d8..5ccd02eed 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -25,6 +25,7 @@ import property ; import print ; import utility ; import project ; +import generate ; # This feature is used to determine which OS we're on. # In future, this may become and diff --git a/v2/tools/generate.jam b/v2/tools/generate.jam new file mode 100644 index 000000000..2bbce8062 --- /dev/null +++ b/v2/tools/generate.jam @@ -0,0 +1,108 @@ +# Copyright 2006 Vladimir Prus +# 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) + +# Declares main target 'generate' that can be used to produce targets +# by calling a user-provides rule, that takes virtual target and produces +# virtual target. + +import targets ; +import "class" : new ; +import property ; +import errors : error ; +import type : type ; +import regex ; +import property-set ; +import project ; +import feature ; + +feature.feature generating-rule : : free ; + + +class generated-target-class : basic-target +{ + import errors ; + import indirect ; + import virtual-target ; + + rule __init__ ( name : project : sources * : requirements * + : default-build * : usage-requirements * ) + { + basic-target.__init__ $(name) : $(project) : $(sources) + : $(requirements) : $(default-build) : $(usage-requirements) ; + + local r = [ $(self.requirements).get ] ; + if ! $(r) + { + errors.user-error + "The generate rule requires property to be set" ; + } + } + + rule construct ( name : sources * : property-set ) + { + local result ; + local gr = [ $(property-set).get ] ; + + # FIXME: this is copy-paste from virtual-target.jam. Must + # have an utilty rule to call a rule like this. + local rule-name = [ MATCH ^@(.*) : $(gr) ] ; + if $(rule-name) + { + if $(tag[2]) + { + errors.error "@rulename is present but is not the only feature" ; + } + + + result = [ indirect.call $(rule-name) $(self.project) $(name) + : $(property-set) : $(sources) ] ; + + if ! $(result) + { + ECHO "warning: Unable to construct" [ full-name ] ; + } + } + + local ur ; + local targets ; + + if $(result) + { + if [ class.is-a $(result[1]) : property-set ] + { + ur = $(result[1]) ; + targets = $(result[2-]) ; + } + else + { + ur = [ property-set.empty ] ; + targets = $(result) ; + } + } + local rt ; + for t in $(targets) + { + rt += [ virtual-target.register $(t) ] ; + } + return $(ur) $(rt) ; + } +} + +rule generate ( name : sources * : requirements * : default-build * + : usage-requirements * ) +{ + local project = [ project.current ] ; + + targets.main-target-alternative + [ new generated-target-class $(name) : $(project) + : [ 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__) : generate : : generate ; + + From bf9a5bc0c3457cc241bee60ffca99fbde0b5c15c Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 11 Nov 2006 22:33:15 +0000 Subject: [PATCH 61/91] tools/build/v2/build-system.jam: Added support for toolset autoconfiguration, both from the command-line, with toolset=xxx or --toolset=xxx, and by default when no tooset is specified. tools/build/v2/build/feature.jam: added public is-subvalue rule and factored out guts into local rule. tools/build/index.html: changed redirect to point at v2 docs [SVN r36007] --- index.html | 4 +- v2/build-system.jam | 165 +++++++++++++++++++++++++++++++------------ v2/build/feature.jam | 69 +++++++++++++++--- 3 files changed, 179 insertions(+), 59 deletions(-) diff --git a/index.html b/index.html index 6272221c8..12f22e413 100644 --- a/index.html +++ b/index.html @@ -9,13 +9,13 @@ - + Automatic redirection failed, please go to v1/build_system.htm. + "v2/index.html">v2/index.html. diff --git a/v2/build-system.jam b/v2/build-system.jam index 51f253bcd..0c9cbf481 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -22,6 +22,7 @@ import build-request ; import errors : error ; import virtual-target ; import "class" : new ; +import toolset ; import builtin ; import make ; @@ -44,9 +45,12 @@ rule location ( ) # ignore user configs. local test-config = [ GLOB [ os.environ BOOST_BUILD_PATH ] : test-config.jam ] ; + +local debug-config = [ MATCH ^(--debug-configuration)$ : [ modules.peek : ARGV ] ] ; + if $(test-config) { - if --debug-configuration in [ modules.peek : ARGV ] + if $(debug-config) { ECHO "notice: loading test-config.jam from" [ NORMALIZE_PATH $(test-config[1]) ] ; @@ -68,65 +72,123 @@ if $(test-config) || --ignore-config in [ modules.peek : ARGV ] local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ; +# Unless ignore-config is set, load the configuration file in +# $(path)/$(basename).jam +local rule load-config ( basename : path + ) +{ + if ! $(ignore-config) + { + if $(debug-config) + { + local where = [ GLOB $(path) : $(basename).jam ] ; + if $(where) + { + ECHO notice: loading $(basename).jam from + [ NORMALIZE_PATH $(where[1]) ] ; + } + } + + modules.load $(basename) : : $(path) ; + project.load-used-projects $(basename) ; + } +} + +# # Load site-config. +# module site-config { import project : initialize ; initialize site-config ; } - -if ! $(ignore-config) -{ - local path ; - if [ os.name ] in NT CYGWIN - { - path = [ modules.peek : SystemRoot ] $(user-path) ; - } - else - { - path = /etc $(user-path) ; - } - - - if --debug-configuration in [ modules.peek : ARGV ] - { - local where = [ GLOB $(path) : site-config.jam ] ; - if $(where) - { - ECHO "notice: loading site-config.jam from" - [ NORMALIZE_PATH $(where[1]) ] ; - } - } - - modules.load site-config : : $(path) ; - project.load-used-projects site-config ; + +local site-path = /etc $(user-path) ; + +if [ os.name ] in NT CYGWIN +{ + site-path = [ modules.peek : SystemRoot ] $(user-path) ; } +load-config site-config : $(site-path) ; +# # Load user-config. +# module user-config { import project : initialize ; initialize user-config ; } -if ! $(ignore-config) -{ - if --debug-configuration in [ modules.peek : ARGV ] +load-config user-config : $(user-path) ; + +# +# Autoconfigure toolsets based on any instances of --toolset=xxx or +# toolset=xxx in the command line +# +local argv = [ modules.peek : ARGV ] ; +local x-toolset-version = [ MATCH ^(--)?toolset=(.*) : $(argv) ] ; + +if $(x-toolset-version) +{ + local toolset-version = $(x-toolset-version[2]) ; + local toolset = [ MATCH ([^-]+).* : $(toolset-version) ] ; + local version = [ MATCH [^-]+-(.+) : $(toolset-version) ] ; + + if $(debug-config) { - local where = [ GLOB $(user-path) : user-config.jam ] ; - if $(where) + ECHO notice: [cmdline-cfg] Detected command-line request for + $(toolset-version): toolset= \"$(toolset)\" "version= \""$(version)\" ; + } + + local known ; + + # if the toolset isn't known, configure it now. + if $(toolset) in [ feature.values ] + { + known = true ; + } + + if $(known) && $(version) + && ! [ feature.is-subvalue toolset : $(toolset) : version : $(version) ] + { + known = ; + } + + if ! $(known) + { + if $(debug-config) { - ECHO "notice: loading user-config.jam from" - [ NORMALIZE_PATH $(where[1]) ] ; - } - } + ECHO notice: [cmdline-cfg] toolset $(toolset-version) + not previously configured; configuring now ; + } + toolset.using $(toolset) : $(version) ; + } + else + { + if $(debug-config) + { + ECHO notice: [cmdline-cfg] toolset $(toolset-version) already configured ; + } + } + + # make sure we get an appropriate property in the build request into + # case the user used the "--toolset=..." form + local toolset-option = [ MATCH ^--toolset=(.*) : $(argv) ] ; + if $(toolset-option) + && ! $(toolset-option) in $(argv) + && ! toolset=$(toolset-option) in $(argv) + { + if $(debug-config) + { + ECHO notice: [cmdline-cfg] adding toolset=$(toolset-option) "to build request." ; + } - modules.load user-config : : $(user-path) ; - project.load-used-projects user-config ; -} - - + argv += $(toolset-option) ; + modules.poke : ARGV : $(argv) ; + } +} + if USER_MODULE in [ RULENAMES ] { USER_MODULE site-config user-config ; @@ -152,11 +214,22 @@ if [ project.find "." : "." ] if ! [ feature.values ] { - ECHO "warning: no toolsets are configured." ; - ECHO "warning: you won't be able to build C++ programs." ; - ECHO "warning: please consult the documentation at" ; - ECHO "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; - ECHO ; + local default-toolset = gcc ; + if [ os.name ] = NT + { + default-toolset = msvc ; + } + + ECHO "warning: * No toolsets are configured." ; + ECHO "warning: * Configuring default toolset" \"$(default-toolset)\". ; + ECHO "warning: * If the default is wrong, you may not be able to" ; + ECHO "warning: build C++ programs." ; + ECHO "warning: * Use the \"--toolset=xxxxx\" option to override our guess." ; + ECHO "warning: * Please consult the documentation at" ; + ECHO "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; + ECHO "warning: for more configuration options" ; + + toolset.using $(default-toolset) ; } diff --git a/v2/build/feature.jam b/v2/build/feature.jam index b9b9e8822..2e0f91a78 100644 --- a/v2/build/feature.jam +++ b/v2/build/feature.jam @@ -439,6 +439,38 @@ rule validate-value-string ( feature value-string ) } } +# A helper that computes: +# * the name(s) of the module-local variable(s) used to record the +# correspondence between subvalue(s) and a subfeature +# +# * the value of that variable when such a subfeature/subvalue has +# been defined +# +# Returns a list consisting of the latter followed by the former +local rule subvalue-var ( + feature # Main feature name + + value-string ? # If supplied, specifies a specific value of the + # main feature for which the subfeature values + # are valid + + : subfeature # The name of the subfeature + : subvalues * # The subfeature values +) +{ + feature = [ grist $(feature) ] ; + validate-feature $(feature) ; + if $(value-string) + { + validate-value-string $(feature) $(value-string) ; + } + + local subfeature-name = [ get-subfeature-name $(subfeature) $(value-string) ] ; + + return $(subfeature-name) + $(feature)$(value-string:E="")<>$(subvalues).subfeature ; +} + # Extends the given subfeature with the subvalues. If the optional # value-string is provided, the subvalues are only valid for the given # value of the feature. Thus, you could say that @@ -457,21 +489,29 @@ rule extend-subfeature ( : subvalues * # The additional values of the subfeature being defined. ) { - feature = [ grist $(feature) ] ; - validate-feature $(feature) ; - if $(value-string) - { - validate-value-string $(feature) $(value-string) ; - } - - local subfeature-name = [ get-subfeature-name $(subfeature) $(value-string) ] ; + local subfeature-vars = [ + subvalue-var $(feature) $(value-string) : $(subfeature) : $(subvalues) ] ; - local f = [ utility.ungrist $(feature) ] ; - extend $(f)-$(subfeature-name) : $(subvalues) ; + local f = [ utility.ungrist [ grist $(feature) ] ] ; + extend $(f)-$(subfeature-vars[1]) : $(subvalues) ; # provide a way to get from the given feature or property and # subfeature value to the subfeature name. - $(feature)$(value-string:E="")<>$(subvalues).subfeature = $(subfeature-name) ; + $(subfeature-vars[2-]) = $(subfeature-vars[1]) ; +} + +# Returns true iff the subvalues are valid for the feature. When the +# optional value-string is provided, returns true iff the subvalues +# are valid for the given value of the feature. +rule is-subvalue ( feature : value-string ? : subfeature : subvalue ) +{ + local subfeature-vars = [ + subvalue-var $(feature) $(value-string) : $(subfeature) : $(subvalues) ] ; + + if $($(subfeature-vars[2])) = $(subfeature-vars[1]) + { + return true ; + } } # Can be called three ways: @@ -1021,6 +1061,13 @@ local rule __test__ ( ) subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 3.0 3.0.1 3.0.2 ; + assert.true is-subvalue toolset : gcc : version : 2.95.3 ; + assert.false is-subvalue toolset : gcc : version : 1.1 ; + + assert.false is-subvalue toolset : notool : version : 2.95.3 ; + assert.true is-subvalue toolset : : version : 2.95.3 ; + assert.false is-subvalue toolset : : version : yabba ; + subfeature toolset gcc : platform : linux cygwin : optional ; assert.result From 623528584c9276f603eacd3798ef8673fa699777 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 11 Nov 2006 22:58:18 +0000 Subject: [PATCH 62/91] Fixed various bugs in my last checkin, and one old one in assert.jam. [SVN r36008] --- v2/build-system.jam | 7 +++++-- v2/build/feature.jam | 12 ++++++++---- v2/util/assert.jam | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/v2/build-system.jam b/v2/build-system.jam index 0c9cbf481..f99da9456 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -129,7 +129,7 @@ load-config user-config : $(user-path) ; local argv = [ modules.peek : ARGV ] ; local x-toolset-version = [ MATCH ^(--)?toolset=(.*) : $(argv) ] ; -if $(x-toolset-version) +if $(x-toolset-version) && ! $(ignore-config) { local toolset-version = $(x-toolset-version[2]) ; local toolset = [ MATCH ([^-]+).* : $(toolset-version) ] ; @@ -229,7 +229,10 @@ if ! [ feature.values ] ECHO "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; ECHO "warning: for more configuration options" ; - toolset.using $(default-toolset) ; + if ! $(ignore-config) + { + toolset.using $(default-toolset) ; + } } diff --git a/v2/build/feature.jam b/v2/build/feature.jam index 2e0f91a78..83d928cdc 100644 --- a/v2/build/feature.jam +++ b/v2/build/feature.jam @@ -466,7 +466,7 @@ local rule subvalue-var ( } local subfeature-name = [ get-subfeature-name $(subfeature) $(value-string) ] ; - + return $(subfeature-name) $(feature)$(value-string:E="")<>$(subvalues).subfeature ; } @@ -506,7 +506,7 @@ rule extend-subfeature ( rule is-subvalue ( feature : value-string ? : subfeature : subvalue ) { local subfeature-vars = [ - subvalue-var $(feature) $(value-string) : $(subfeature) : $(subvalues) ] ; + subvalue-var $(feature) $(value-string) : $(subfeature) : $(subvalue) ] ; if $($(subfeature-vars[2])) = $(subfeature-vars[1]) { @@ -1064,10 +1064,14 @@ local rule __test__ ( ) assert.true is-subvalue toolset : gcc : version : 2.95.3 ; assert.false is-subvalue toolset : gcc : version : 1.1 ; - assert.false is-subvalue toolset : notool : version : 2.95.3 ; - assert.true is-subvalue toolset : : version : 2.95.3 ; + assert.false is-subvalue toolset : msvc : version : 2.95.3 ; assert.false is-subvalue toolset : : version : yabba ; + feature yabba ; + subfeature yabba : version : dabba ; + assert.true is-subvalue yabba : : version : dabba ; + + subfeature toolset gcc : platform : linux cygwin : optional ; assert.result diff --git a/v2/util/assert.jam b/v2/util/assert.jam index d4eacc47d..3fa52dfe2 100644 --- a/v2/util/assert.jam +++ b/v2/util/assert.jam @@ -86,7 +86,7 @@ rule true ( rule-name args * : * ) module [ CALLER_MODULE ] { modules.poke assert : result - : [ $(1) : $(2) $(3) : $(4) + : [ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ; } @@ -108,7 +108,7 @@ rule false ( rule-name args * : * ) module [ CALLER_MODULE ] { modules.poke assert : result - : [ $(1) : $(2) $(3) : $(4) + : [ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ; } From 28d815e843b1b5c1e076ae82f330293e550f5052 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 12 Nov 2006 06:25:09 +0000 Subject: [PATCH 63/91] build.jam; enable gc debug info with debug build. mem.c; only enable gc debug mode with debug build, and fix compiling boehm gc with gcc/linux. [SVN r36010] --- historic/jam/src/build.jam | 4 ++++ historic/jam/src/mem.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/historic/jam/src/build.jam b/historic/jam/src/build.jam index 49af13c5a..e3693bba9 100644 --- a/historic/jam/src/build.jam +++ b/historic/jam/src/build.jam @@ -451,6 +451,10 @@ if ! $(debug) || --noassert in $(ARGV) if $(--boehm-gc) { --defs += OPT_BOEHM_GC ; + if $(debug) + { + --defs += GC_DEBUG ; + } } if $(--duma) diff --git a/historic/jam/src/mem.c b/historic/jam/src/mem.c index 44c0e5a84..da20acf8c 100644 --- a/historic/jam/src/mem.c +++ b/historic/jam/src/mem.c @@ -19,7 +19,13 @@ http://www.boost.org/LICENSE_1_0.txt) #define SILENT #define ALL_INTERIOR_POINTERS #define LARGE_CONFIG + #ifndef GC_DEBUG #define NO_DEBUGGING + #endif + + #ifdef __GLIBC__ + #define __USE_GNU + #endif #include "boehm_gc/reclaim.c" #include "boehm_gc/allchblk.c" From 9162963fd4f05d1de7ad251f9785870644b161f5 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 12 Nov 2006 15:16:28 +0000 Subject: [PATCH 64/91] Slightly less hack-y: stop poke-ing the toolset into argv just to get it into the build request. [SVN r36012] --- v2/build-system.jam | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/v2/build-system.jam b/v2/build-system.jam index f99da9456..d2f8306dc 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -127,11 +127,14 @@ load-config user-config : $(user-path) ; # toolset=xxx in the command line # local argv = [ modules.peek : ARGV ] ; -local x-toolset-version = [ MATCH ^(--)?toolset=(.*) : $(argv) ] ; +local toolset-version = [ MATCH ^-?-?toolset=(.*) : $(argv) ] ; -if $(x-toolset-version) && ! $(ignore-config) +# if the user specified --toolset=..., we need to add toolset=... to +# the build request +local extra-build-request ; + +if $(toolset-version) && ! $(ignore-config) { - local toolset-version = $(x-toolset-version[2]) ; local toolset = [ MATCH ([^-]+).* : $(toolset-version) ] ; local version = [ MATCH [^-]+-(.+) : $(toolset-version) ] ; @@ -174,18 +177,14 @@ if $(x-toolset-version) && ! $(ignore-config) # make sure we get an appropriate property in the build request into # case the user used the "--toolset=..." form - local toolset-option = [ MATCH ^--toolset=(.*) : $(argv) ] ; - if $(toolset-option) - && ! $(toolset-option) in $(argv) - && ! toolset=$(toolset-option) in $(argv) + if ! $(toolset-version) in $(argv) + && ! toolset=$(toolset-version) in $(argv) { if $(debug-config) { - ECHO notice: [cmdline-cfg] adding toolset=$(toolset-option) "to build request." ; + ECHO notice: [cmdline-cfg] adding toolset=$(toolset-version) "to build request." ; } - - argv += $(toolset-option) ; - modules.poke : ARGV : $(argv) ; + extra-build-request += toolset=$(toolset-version) ; } } @@ -235,9 +234,11 @@ if ! [ feature.values ] } } - - -build-request = [ build-request.from-command-line [ modules.peek : ARGV ] ] ; +build-request = [ + build-request.from-command-line [ + modules.peek : ARGV + ] $(extra-build-request) +] ; properties = [ $(build-request).get-at 2 ] ; From be59a5498ba9eba8b7d27ee8f6dd2691fbaff0c6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 14 Nov 2006 05:35:45 +0000 Subject: [PATCH 65/91] Add generic feature. Fix minor validation problem with boostbook. [SVN r36029] --- v2/tools/boostbook.jam | 27 +++++++-------------------- v2/tools/builtin.jam | 3 +++ v2/tools/xsltproc.jam | 7 ++++++- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/v2/tools/boostbook.jam b/v2/tools/boostbook.jam index e1b5db19a..e8d8217dc 100644 --- a/v2/tools/boostbook.jam +++ b/v2/tools/boostbook.jam @@ -1,6 +1,6 @@ # Copyright 2003, 2004, 2005 Dave Abrahams # Copyright 2003, 2004, 2005 Douglas Gregor -# Copyright 2005 Rene Rivera +# Copyright 2005, 2006 Rene Rivera # Copyright 2003, 2004, 2005 Vladimir Prus # 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) @@ -113,12 +113,6 @@ rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-dir ? ) : $(search-dirs:J=" ") ; } - # Add trailing slash since some other code - # uses :B modifier to add last element, and fails - # without trailing slash. The code really should be fixed, - # but not now. - .boostbook-xsl-dir = $(.boostbook-xsl-dir)/ ; - .boostbook-dtd-dir = $(.boostbook-dtd-dir)/ ; # Register generators only if we've were called via "using boostbook ; " generators.register-standard boostbook.dtdxml-to-boostbook : DTDXML : XML ; @@ -162,36 +156,31 @@ rule dtdxml-to-boostbook ( target : source : properties * ) rule boostbook-to-docbook ( target : source : properties * ) { - local native-path = [ path.native $(.boostbook-xsl-dir) ] ; - local stylesheet = $(native-path:B=docbook:S=.xsl) ; + local stylesheet = [ path.native $(.boostbook-xsl-dir)/docbook.xsl ] ; xslt $(target) : $(source) $(stylesheet) : $(properties) ; } rule docbook-to-onehtml ( target : source : properties * ) { - local native-path = [ path.native $(.boostbook-xsl-dir) ] ; - local stylesheet = $(native-path:B=html-single:S=.xsl) ; + local stylesheet = [ path.native $(.boostbook-xsl-dir)/html-single.xsl ] ; xslt $(target) : $(source) $(stylesheet) : $(properties) ; } rule docbook-to-htmldir ( target : source : properties * ) { - local native-path = [ path.native $(.boostbook-xsl-dir) ] ; - local stylesheet = $(native-path:B=html:S=.xsl) ; + local stylesheet = [ path.native $(.boostbook-xsl-dir)/html.xsl ] ; xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : html ; } rule docbook-to-manpages ( target : source : properties * ) { - local native-path = [ path.native $(.boostbook-xsl-dir) ] ; - local stylesheet = $(native-path:B=manpages:S=.xsl) ; + local stylesheet = [ path.native $(.boostbook-xsl-dir)/manpages.xsl ] ; xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : man ; } rule docbook-to-fo ( target : source : properties * ) { - local native-path = [ path.native $(.boostbook-xsl-dir) ] ; - local stylesheet = $(native-path:B=fo:S=.xsl) ; + local stylesheet = [ path.native $(.boostbook-xsl-dir)/fo.xsl ] ; xslt $(target) : $(source) $(stylesheet) : $(properties) ; } @@ -272,9 +261,7 @@ class boostbook-generator : generator # Add the catalog to the property set local catalog-path = [ $(catalog).path ] ; - catalog-path = "$(catalog-path)/" ; - local catalog-file = $(catalog-path:G=:B=catalog:S=.xml) ; - property-set = [ $(property-set).add-raw $(catalog-file) ] ; + property-set = [ $(property-set).add-raw $(catalog-path)/catalog.xml ] ; # local targets = $(catalog) ; diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index 5ccd02eed..e86d2e50f 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -116,6 +116,9 @@ feature linkflags : : free ; feature archiveflags : : free ; feature version : : free ; +# Generic, i.e. non-lanugage specific, flags for tools. +feature flags : : free ; + feature.feature location-prefix : : free ; diff --git a/v2/tools/xsltproc.jam b/v2/tools/xsltproc.jam index 021ef58ea..71e1b72ae 100644 --- a/v2/tools/xsltproc.jam +++ b/v2/tools/xsltproc.jam @@ -10,6 +10,7 @@ # Note: except for 'init', this modules does not provide any rules # for end users. +import toolset : flags ; import feature ; import regex ; import sequence ; @@ -38,6 +39,10 @@ rule init ( xsltproc ? ) rule compute-xslt-flags ( target : properties * ) { local flags ; + + # Raw flags. + flags += [ feature.get-values : $(properties) ] ; + # Translate into command line flags. for local param in [ feature.get-values : $(properties) ] { @@ -75,7 +80,7 @@ rule compute-xslt-flags ( target : properties * ) local rule .xsltproc ( target : source stylesheet : properties * : dirname ? : action ) { STYLESHEET on $(target) = $(stylesheet) ; - FLAGS on $(target) = [ compute-xslt-flags $(target) : $(properties) ] ; + FLAGS on $(target) += [ compute-xslt-flags $(target) : $(properties) ] ; NAME on $(target) = $(.xsltproc) ; for local catalog in [ feature.get-values : $(properties) ] From 108eecf3d4094d4bc85abaf1470afec4d9a07bd0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 14 Nov 2006 05:39:26 +0000 Subject: [PATCH 66/91] Add 6.5 as an alias to 6.0. [SVN r36031] --- v2/tools/msvc.jam | 1 + 1 file changed, 1 insertion(+) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index a629853d9..30d8843ef 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -893,6 +893,7 @@ actions compile.mc # Version aliases .version-alias-6 = 6.0 ; +.version-alias-6.5 = 6.0 ; .version-alias-7 = 7.0 ; .version-alias-8 = 8.0 ; From f4921e09ede8fb92c753c4f0fca2ebf7a9a27dc4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 15 Nov 2006 19:05:45 +0000 Subject: [PATCH 67/91] Implement automatic removal of test executables [SVN r36048] --- v2/tools/testing.jam | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/v2/tools/testing.jam b/v2/tools/testing.jam index e195c93d2..1416bcf55 100644 --- a/v2/tools/testing.jam +++ b/v2/tools/testing.jam @@ -333,6 +333,11 @@ rule run-path-setup ( target : source : properties * ) } } +local argv = [ modules.peek : ARGV ] ; +if --preserve-test-targets in $(argv) +{ + preserve-test-targets = true ; +} toolset.flags testing.capture-output ARGS ; toolset.flags testing.capture-output INPUT_FILES ; @@ -353,8 +358,14 @@ rule capture-output ( target : source : properties * ) # before target is created. Therefore, they are bound using SEARCH setting # on them and not LOCATE setting of $(target), as in other case (due to jam bug). DEPENDS $(target) : [ on $(target) return $(INPUT_FILES) ] ; - + run-path-setup $(target) : $(source) : $(properties) ; + + if ! $(preserve-test-targets) + { + TEMPORARY $(sources) ; + RmTemps $(target) : $(source) ; + } } @@ -396,6 +407,9 @@ else VERBOSE_TEST = 0 ; } + +RM = [ common.rm-command ] ; + actions capture-output bind INPUT_FILES output-file { $(PATH_SETUP) @@ -414,10 +428,15 @@ actions capture-output bind INPUT_FILES output-file echo ====== BEGIN OUTPUT ====== $(CATENATE) $(output-file) echo ====== END OUTPUT ====== - $(ENDIF) + $(ENDIF) exit $(STATUS) } +actions quietly updated piecemeal together RmTemps +{ + $(RM) "$(>)" +} + MAKE_FILE = [ common.file-creation-command ] ; toolset.flags testing.unit-test LAUNCHER ; From a46f365ed6e4418821e3e945c3301be8dee5343c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 17 Nov 2006 06:26:12 +0000 Subject: [PATCH 68/91] Fix typo that causes all run tests to be always relinked and rerun. Thanks to Juergen Hunold for the bug report. [SVN r36064] --- v2/tools/testing.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/tools/testing.jam b/v2/tools/testing.jam index 1416bcf55..f8d8b9076 100644 --- a/v2/tools/testing.jam +++ b/v2/tools/testing.jam @@ -363,7 +363,7 @@ rule capture-output ( target : source : properties * ) if ! $(preserve-test-targets) { - TEMPORARY $(sources) ; + TEMPORARY $(source) ; RmTemps $(target) : $(source) ; } } From c98a5494f81f4aa9743b63709fb1ddacb45f238b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 08:56:43 +0000 Subject: [PATCH 69/91] Don't remove python scripts for Python tests. [SVN r36073] --- v2/tools/python.jam | 5 ++++- v2/tools/testing.jam | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/v2/tools/python.jam b/v2/tools/python.jam index 66c05bb2b..e3cb287cc 100644 --- a/v2/tools/python.jam +++ b/v2/tools/python.jam @@ -613,7 +613,10 @@ rule capture-output ( target : sources * : properties * ) # over explicitly. RUN_PATH on $(sources[1]) = [ on $(sources[2]) return $(RUN_PATH) ] ; PYTHONPATH = [ on $(sources[2]) return $(LOCATE) ] ; - testing.capture-output $(target) : $(sources[1]) : $(properties) ; + # After test is run, we remove the Python module, but not the Python + # script. + testing.capture-output $(target) : $(sources[1]) : $(properties) + : $(sources[2]) ; local c = [ common.prepend-path-variable-command PYTHONPATH : $(PYTHONPATH) ] ; LAUNCHER on $(target) = $(c) [ on $(target) return $(PYTHON) ] ; } diff --git a/v2/tools/testing.jam b/v2/tools/testing.jam index f8d8b9076..53911b564 100644 --- a/v2/tools/testing.jam +++ b/v2/tools/testing.jam @@ -342,7 +342,14 @@ if --preserve-test-targets in $(argv) toolset.flags testing.capture-output ARGS ; toolset.flags testing.capture-output INPUT_FILES ; toolset.flags testing.capture-output LAUNCHER ; -rule capture-output ( target : source : properties * ) + +# Runs executable 'sources' and stores stdout in file 'target'. +# If --preserve-test-targets command line option, removes the executable. +# The 'target-to-remove' parameter controls what should be removed: +# - if 'none', does not remove anything, ever +# - if empty, removes 'source' +# - if non-empty and not 'none', contains a list of sources to remove. +rule capture-output ( target : source : properties * : targets-to-remove ? ) { output-file on $(target) = $(target:S=.output) ; LOCATE on $(target:S=.output) = [ on $(target) return $(LOCATE) ] ; @@ -358,13 +365,22 @@ rule capture-output ( target : source : properties * ) # before target is created. Therefore, they are bound using SEARCH setting # on them and not LOCATE setting of $(target), as in other case (due to jam bug). DEPENDS $(target) : [ on $(target) return $(INPUT_FILES) ] ; - + + if $(targets-to-remove) = none + { + targets-to-remove = ; + } + else if ! $(targets-to-remove) + { + targets-to-remove = $(source) ; + } + run-path-setup $(target) : $(source) : $(properties) ; if ! $(preserve-test-targets) { - TEMPORARY $(source) ; - RmTemps $(target) : $(source) ; + TEMPORARY $(targets-to-remove) ; + RmTemps $(target) : $(targets-to-remove) ; } } From 44dc085a7e330b758d925e3ad22f0c057a4b6b41 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 18:34:42 +0000 Subject: [PATCH 70/91] Introduce 'toolset requirements' [SVN r36076] --- v2/build/targets.jam | 3 +++ v2/build/toolset.jam | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 23962a258..8a1fbd632 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -82,6 +82,7 @@ import path ; import set ; import assert ; import indirect ; +import toolset ; # Base class for all abstract targets. class abstract-target @@ -1408,6 +1409,8 @@ rule main-target-requirements ( : project # Project where the main target is to be declared ) { + specification += [ toolset.requirements ] ; + local requirements = [ property-set.refine-from-user-input [ $(project).get requirements ] : $(specification) : [ $(project).project-module ] : [ $(project).get location ] ] ; diff --git a/v2/build/toolset.jam b/v2/build/toolset.jam index 95996af6f..36c0a21da 100644 --- a/v2/build/toolset.jam +++ b/v2/build/toolset.jam @@ -465,7 +465,23 @@ rule inherit-rules ( toolset : base ) IMPORT $(toolset) : $(rules) : : $(toolset).$(rules) ; } +# Return the list of global 'toolset requirements'. +# Those requirements will be automatically added to +# the requirements of any main target. +rule requirements ( ) +{ + return $(.requirements) ; +} +# Adds elements to the list of global 'toolset requirements'. +# The requirements will be automatically added to the requirements +# for all main targets, as if they were specified literally. +# For best results, all requirements added should be conditional or +# indirect conditional. +rule add-requirements ( requirements * ) +{ + .requirements += $(requirements) ; +} local rule __test__ ( ) { From 5fc2fd4d63310ed344b6bdb16d1c8b3ec278287a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 18:47:22 +0000 Subject: [PATCH 71/91] Add toolset requirements that specify that shared runtime is multithreaded, for most windows toolsets. [SVN r36077] --- v2/tools/cw.jam | 2 ++ v2/tools/intel-win.jam | 2 ++ v2/tools/msvc.jam | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/v2/tools/cw.jam b/v2/tools/cw.jam index 4c3a2f03a..07eec5a52 100644 --- a/v2/tools/cw.jam +++ b/v2/tools/cw.jam @@ -23,6 +23,8 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] feature.extend toolset : cw ; +toolset.add-requirements cw,shared:multi ; + nl = " " ; diff --git a/v2/tools/intel-win.jam b/v2/tools/intel-win.jam index 68d707298..8b8f110bc 100644 --- a/v2/tools/intel-win.jam +++ b/v2/tools/intel-win.jam @@ -22,6 +22,8 @@ toolset.inherit-generators intel-win intel win toolset.inherit-flags intel-win : msvc ; toolset.inherit-rules intel-win : msvc ; +toolset.add-requirements intel-win,shared:multi ; + # Initializes the intel toolset for windows rule init ( version ? : # the compiler version command * : # the command to invoke the compiler itself diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index 30d8843ef..1b7935380 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -47,6 +47,10 @@ toolset.inherit-flags msvc : midl ; # Inherit MC flags toolset.inherit-flags msvc : mc ; +# Dynamic runtime comes only in MT flavour. +toolset.add-requirements msvc,shared:multi ; + + RM = [ common.rm-command ] ; nl = " " ; From df8a9d9f5c59d97716fb4eec0a7a9474eb56de05 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 19:11:53 +0000 Subject: [PATCH 72/91] Robustify the test [SVN r36078] --- v2/test/prebuilt/ext/Jamfile | 3 +++ v2/test/prebuilt/ext/Jamfile2 | 4 ++-- v2/test/prebuilt/ext/Jamfile3 | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/v2/test/prebuilt/ext/Jamfile b/v2/test/prebuilt/ext/Jamfile index 6ae423514..e563f0d74 100644 --- a/v2/test/prebuilt/ext/Jamfile +++ b/v2/test/prebuilt/ext/Jamfile @@ -8,3 +8,6 @@ project ext ; lib a : a.cpp ; + +install dist : a : release:release + debug:debug ; diff --git a/v2/test/prebuilt/ext/Jamfile2 b/v2/test/prebuilt/ext/Jamfile2 index be29fb693..2030b6465 100644 --- a/v2/test/prebuilt/ext/Jamfile2 +++ b/v2/test/prebuilt/ext/Jamfile2 @@ -26,13 +26,13 @@ if $toolset = darwin project ext ; lib a : - : bin/$toolset/debug/$(prefix)a.$(dll-suffix) debug + : debug/$(prefix)a.$(dll-suffix) debug : : debug ; lib a : - : bin/$toolset/release/$(prefix)a.$(dll-suffix) release + : release/$(prefix)a.$(dll-suffix) release : : release ; diff --git a/v2/test/prebuilt/ext/Jamfile3 b/v2/test/prebuilt/ext/Jamfile3 index 071691dee..868761cb5 100644 --- a/v2/test/prebuilt/ext/Jamfile3 +++ b/v2/test/prebuilt/ext/Jamfile3 @@ -33,13 +33,13 @@ project ext ; local pwd = [ PWD ] ; lib a : - : $(pwd)/ext/bin/$toolset/debug/$(prefix)a.$(dll-suffix) debug + : $(pwd)/ext/debug/$(prefix)a.$(dll-suffix) debug : : debug ; lib a : - : $(pwd)/ext/bin/$toolset/release/$(prefix)a.$(dll-suffix) release + : $(pwd)/ext/release/$(prefix)a.$(dll-suffix) release : : release ; From c4a8e99594d7beedccf48cc7607efdae827f717d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 20 Nov 2006 17:14:52 +0000 Subject: [PATCH 73/91] Improved warning message Updated changelog [SVN r36114] --- v2/build-system.jam | 15 +++++++-------- v2/changes.txt | 5 ++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/v2/build-system.jam b/v2/build-system.jam index d2f8306dc..f32460469 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -219,14 +219,13 @@ if ! [ feature.values ] default-toolset = msvc ; } - ECHO "warning: * No toolsets are configured." ; - ECHO "warning: * Configuring default toolset" \"$(default-toolset)\". ; - ECHO "warning: * If the default is wrong, you may not be able to" ; - ECHO "warning: build C++ programs." ; - ECHO "warning: * Use the \"--toolset=xxxxx\" option to override our guess." ; - ECHO "warning: * Please consult the documentation at" ; - ECHO "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; - ECHO "warning: for more configuration options" ; + ECHO "warning: No toolsets are configured." ; + ECHO "warning: Configuring default toolset" \"$(default-toolset)\". ; + ECHO "warning: If the default is wrong, you may not be able to build C++ programs." ; + ECHO "warning: Use the \"--toolset=xxxxx\" option to override our guess." ; + ECHO "warning: For more configuration options, please consult" + ECHO "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; + if ! $(ignore-config) { diff --git a/v2/changes.txt b/v2/changes.txt index 8346d03d4..aaf9da07b 100644 --- a/v2/changes.txt +++ b/v2/changes.txt @@ -7,12 +7,15 @@ Milestone 12 (in development) Changes in this release: + - Support for autoconfiguration of toolset based on command-line + toolset=xxxx or --toolset=xxxx options, and for default toolset + configuration as a fallback. - Support for precompiled headers for gcc toolset, and improvements for msvc. - Mechanism for removing inherited requirements. - The 'make' rule support specifying usage-requirements. - New 'project.extension' rule for declaring standalone - projects. + projects. - New 'conditional' convenience rule. - New 'path.glob-tree' rule. - Inline targets are now marked explicit automatically. From 13c31bf0c229319012fc6c2c602bd2bafee8866f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 22 Nov 2006 09:33:07 +0000 Subject: [PATCH 74/91] Enable pch test on msvc [SVN r36143] --- v2/test/test_all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/test/test_all.py b/v2/test/test_all.py index 1ded06fee..234a17680 100644 --- a/v2/test/test_all.py +++ b/v2/test/test_all.py @@ -162,7 +162,7 @@ if os.name == 'posix': if string.find(os.uname()[0], "CYGWIN") == -1: tests.append("library_order") -if string.find(get_toolset(), 'gcc') == 0: +if string.find(get_toolset(), 'gcc') == 0 or string.find(get_toolset(), 'msvc') == 0: tests.append("gcc_runtime") tests.append("pch") From a507946736789bbe2e795ec7f47c37c1bea5b43b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 22 Nov 2006 09:36:45 +0000 Subject: [PATCH 75/91] Handle indirect conditional properties in usage requirements [SVN r36145] --- v2/build/targets.jam | 111 +++++++++++++++++++++++++----------- v2/test/use_requirements.py | 31 ++++++++++ 2 files changed, 110 insertions(+), 32 deletions(-) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 8a1fbd632..e737a9847 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -914,30 +914,38 @@ rule common-properties ( build-request requirements ) } result = [ $($(key)).add-raw $(free) ] ; } - -rule common-properties2 ( build-request requirements ) -{ - # This guarantees that default properties are present - # in result, unless they are overrided by some requirement. - # FIXME: There is possibility that we've added bar, which is composite - # and expands to bar2, but default value of is not bar2, - # in which case it's not clear what to do. - # - build-request = [ $(build-request).add-defaults ] ; - # Featured added by 'add-default' can be composite and expand - # to features without default values -- so they are not added yet. - # It could be clearer/faster to expand only newly added properties - # but that's not critical. - build-request = [ $(build-request).expand ] ; - + +# Given 'context' -- a set of already present properties, and 'requirements', +# decide which extra properties should be applied to 'context'. +# For conditional requirements, this means evaluating condition. For +# indirect conditional requirements, this means calling a rule. Ordinary +# requirements are always applied. +# +# Handles situation where evaluating one conditional requirements affects +# condition of another conditional requirements, for example: +# +# gcc:release release:RELEASE +# +# If 'what' is 'refined' returns context refined with new requirements. +# If 'what' is 'added' returns just the requirements that must be applied. +rule evaluate-requirements ( requirements : context : what ) +{ # Apply non-conditional requirements. - # There's a slight bug here: it's possible that conditional - # requirement change a value set by non-conditional requirements. This - # should be error, but we don't detect it yet. + # It's possible that that further conditional requirement change + # a value set by non-conditional requirements. For example: + # + # exe a : a.cpp : single foo:multi ; + # + # I'm not sure if this should be an error, or not, especially given that + # + # single + # + # might come from project's requirements. - local raw = [ $(build-request).raw ] ; - raw = [ property.refine $(raw) : - [ feature.expand [ $(requirements).non-conditional ] ] ] ; + local unconditional = [ feature.expand [ $(requirements).non-conditional ] ] ; + + local raw = [ $(context).raw ] ; + raw = [ property.refine $(raw) : $(unconditional) ] ; # We've collected properties that surely must be present in common # properties. We now try to figure out what other properties @@ -954,7 +962,8 @@ rule common-properties2 ( build-request requirements ) local count = $(conditionals) [ $(requirements).get ] and-once-more ; - local prev ; + + local added-requirements ; local current = $(raw) ; @@ -979,7 +988,7 @@ rule common-properties2 ( build-request requirements ) e += [ indirect.call $(i) $(current) ] ; } - if $(e) = $(prev) + if $(e) = $(added-requirements) { # If we got the same result, we've found final properties. count = ; @@ -987,11 +996,11 @@ rule common-properties2 ( build-request requirements ) } else { - # Oops, results of evaluation of conditionals has changes + # Oops, results of evaluation of conditionals has changed. # Also 'current' contains leftover from previous evaluation. # Recompute 'current' using initial properties and conditional # requirements. - prev = $(e) ; + added-requirements = $(e) ; current = [ property.refine $(raw) : [ feature.expand $(e) ] ] ; } count = $(count[2-]) ; @@ -1001,8 +1010,39 @@ rule common-properties2 ( build-request requirements ) errors.error "Can't evaluate conditional properties " $(conditionals) ; } + + if $(what) = added + { + return [ property-set.create $(unconditional) $(added-requirements) ] ; + } + else if $(what) = refined + { + return [ property-set.create $(current) ] ; + } + else + { + errors.error "Invalid value of the 'what' parameter" ; + } +} + - return [ property-set.create $(current) ] ; +rule common-properties2 ( build-request requirements ) +{ + # This guarantees that default properties are present + # in result, unless they are overrided by some requirement. + # FIXME: There is possibility that we've added bar, which is composite + # and expands to bar2, but default value of is not bar2, + # in which case it's not clear what to do. + # + build-request = [ $(build-request).add-defaults ] ; + # Featured added by 'add-default' can be composite and expand + # to features without default values -- so they are not added yet. + # It could be clearer/faster to expand only newly added properties + # but that's not critical. + build-request = [ $(build-request).expand ] ; + + return [ evaluate-requirements $(requirements) + : $(build-request) : refined ] ; } # Implements the most standard way of constructing main target @@ -1244,8 +1284,10 @@ class basic-target : abstract-target rule compute-usage-requirements ( subvariant ) { local rproperties = [ $(subvariant).build-properties ] ; - xusage-requirements = [ $(self.usage-requirements).evaluate-conditionals - $(rproperties) ] ; + xusage-requirements = [ targets.evaluate-requirements + $(self.usage-requirements) + : $(rproperties) + : added ] ; # We generate all dependency properties and add them, # as well as their usage requirements, to result. @@ -1433,10 +1475,15 @@ rule main-target-usage-requirements ( { local loc = [ $(project).get location ] ; local project-usage-requirements = [ $(project).get usage-requirements ] ; - - local usage-requirements = [ property-set.create - [ property.translate-paths $(specification) : $(loc) ] ] ; + # We don't use 'refine-from-user-input' because I'm not sure if: + # - removing of parent's usage requirements makes sense + # - refining of usage requirements is not needed, since usage requirements + # are always free. + local usage-requirements = [ property-set.create-from-user-input + $(specification) + : [ $(project).project-module ] [ $(project).get location ] ] ; + return [ $(project-usage-requirements).add $(usage-requirements) ] ; } diff --git a/v2/test/use_requirements.py b/v2/test/use_requirements.py index 679436e1a..546abde54 100644 --- a/v2/test/use_requirements.py +++ b/v2/test/use_requirements.py @@ -325,4 +325,35 @@ foo() {} t.run_build_system("link=static") t.expect_addition("libs/bin/$toolset/debug/link-static/a_d.obj") + +# Test that indirect conditionals are respected in +# usage requirements. +t.rm(".") + +t.write("Jamroot", """ +rule has-foo ( properties * ) +{ + return HAS_FOO ; +} + +exe a : a.cpp b ; +lib b : b.cpp : static : : @has-foo ; +""") +t.write("a.cpp", """ +#ifdef HAS_FOO +void foo(); +int main() { foo(); } +#endif +""") +t.write("b.cpp", """ +void +#if defined(_WIN32) && defined(SHARED_B) +__declspec(dllexport) +#endif +foo() {}\n +""") +t.run_build_system() +t.expect_addition("bin/$toolset/debug/a.exe") + + t.cleanup() From 8a3222a29d763689a77b10dfcc9500f9b9fbc68d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Nov 2006 09:01:47 +0000 Subject: [PATCH 76/91] Make the 'glob' rule accept the patterns to exclude. [SVN r36159] --- v2/build/project.jam | 7 ++++--- v2/test/project_glob.py | 10 ++++++++-- v2/util/path.jam | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/v2/build/project.jam b/v2/build/project.jam index f37161f88..4a3a2e96e 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -943,7 +943,7 @@ module project-rules } } - rule glob ( wildcards + ) + rule glob ( wildcards + : excludes * ) { import path ; import project ; @@ -954,8 +954,9 @@ module project-rules local location = [ $(current).get source-location ] ; local result ; - local paths = [ path.glob $(location) : - [ sequence.transform path.make : $(wildcards) ] ] ; + local paths = [ path.glob $(location) + : [ sequence.transform path.make : $(wildcards) ] + : [ sequence.transform path.make : $(excludes) ] ] ; if $(wildcards:D) { # The paths we've found are relative to current directory, diff --git a/v2/test/project_glob.py b/v2/test/project_glob.py index 412bf77db..a902ae1bc 100644 --- a/v2/test/project_glob.py +++ b/v2/test/project_glob.py @@ -76,7 +76,8 @@ exe a : [ glob *.cpp ] ../d2/d//l ; t.run_build_system(subdir="d1") t.expect_addition("d1/bin/$toolset/debug/a.exe") -# Test that wildcards can include directories +# Test that wildcards can include directories. Also +# test exclusion patterns. t.rm("d1") t.write("d1/src/foo/a.cpp", """ @@ -90,14 +91,19 @@ void bar() {} """) +t.write("d1/src/bar/bad.cpp", """ +very bad non-compilable file +""") + t.write("d1/Jamfile", """ project : source-location src ; -exe a : [ glob foo/*.cpp bar/*.cpp ] ../d2/d//l ; +exe a : [ glob foo/*.cpp bar/*.cpp : bar/bad* ] ../d2/d//l ; """) t.run_build_system(subdir="d1") t.expect_addition("d1/bin/$toolset/debug/a.exe") +t.rm("d1/src/bar/bad.cpp") # Test that 'glob' works with absolute names t.rm("d1/bin") diff --git a/v2/util/path.jam b/v2/util/path.jam index 33403887b..2f516347f 100644 --- a/v2/util/path.jam +++ b/v2/util/path.jam @@ -222,10 +222,11 @@ rule pwd ( ) # For example: # [ glob . : *.cpp ] # [ glob . : */build/Jamfile ] -rule glob ( dirs * : patterns + ) +rule glob ( dirs * : patterns + : exclude-patterns * ) { local result ; local real-patterns ; + local real-exclude-patterns ; for local d in $(dirs) { for local p in $(patterns) @@ -233,11 +234,19 @@ rule glob ( dirs * : patterns + ) local pattern = [ path.root $(p) $(d) ] ; real-patterns += [ path.native $(pattern) ] ; } + + for local p in $(exclude-patterns) + { + local pattern = [ path.root $(p) $(d) ] ; + real-exclude-patterns += [ path.native $(pattern) ] ; + } } + + local inc = [ GLOB-RECURSIVELY $(real-patterns) ] ; + local exc = [ GLOB-RECURSIVELY $(real-exclude-patterns) ] ; return [ sequence.transform path.make : - [ GLOB-RECURSIVELY $(real-patterns) ] ] ; - + [ set.difference $(inc) : $(exc) ] ] ; } # Recursive version of GLOB. Builds the glob of files while From f8e982463598640983d5c2147c5d53d387c72a97 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Nov 2006 09:16:51 +0000 Subject: [PATCH 77/91] Fix a bug that caused path.glob-tree to ignore exclude patterns except for top-level names. [SVN r36160] --- v2/util/path.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/util/path.jam b/v2/util/path.jam index 2f516347f..dbf153aec 100644 --- a/v2/util/path.jam +++ b/v2/util/path.jam @@ -282,7 +282,7 @@ local rule .glob-tree ( roots * : patterns * : exclude-patterns * ) } if $(subdirs) { - result += [ .glob-tree $(subdirs) : $(patterns) ] ; + result += [ .glob-tree $(subdirs) : $(patterns) : $(exclude-patterns) ] ; } return $(result) ; } From 280cd5a613d422764df5b4975bbd1ded7c4fdd27 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Nov 2006 09:25:16 +0000 Subject: [PATCH 78/91] New project rule 'glob-tree'. [SVN r36161] --- v2/build/project.jam | 78 ++++++++++++++++++++++++----------------- v2/test/project_glob.py | 22 ++++++++++++ 2 files changed, 68 insertions(+), 32 deletions(-) diff --git a/v2/build/project.jam b/v2/build/project.jam index 4a3a2e96e..e27791380 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -774,6 +774,37 @@ rule extension ( id : options * : * ) } } +rule glob-internal ( project : wildcards + : excludes * : rule-name ) +{ + local location = [ $(project).get source-location ] ; + + local result ; + local paths = [ path.$(rule-name) $(location) + : [ sequence.transform path.make : $(wildcards) ] + : [ sequence.transform path.make : $(excludes) ] ] ; + if $(wildcards:D) || $(rule-name) != glob + { + # The paths we've found are relative to current directory, + # but the names specified in sources list are assumed to + # be relative to source directory of the corresponding + # prject. So, just make the name absolute. + for local p in $(paths) + { + result += [ path.root $(p) [ path.pwd ] ] ; + } + } + else + { + # There were not directory in wildcard, so the files are all + # in the source directory of the project. Just drop the + # directory, instead of making paths absolute. + result = $(paths:D="") ; + } + + return $(result) ; +} + + # This module defines rules common to all projects module project-rules { @@ -945,40 +976,23 @@ module project-rules rule glob ( wildcards + : excludes * ) { - import path ; import project ; - import sequence ; - - local current = [ project.current ] ; - - local location = [ $(current).get source-location ] ; - - local result ; - local paths = [ path.glob $(location) - : [ sequence.transform path.make : $(wildcards) ] - : [ sequence.transform path.make : $(excludes) ] ] ; - if $(wildcards:D) - { - # The paths we've found are relative to current directory, - # but the names specified in sources list are assumed to - # be relative to source directory of the corresponding - # prject. So, just make the name absolute. - for local p in $(paths) - { - result += [ path.root $(p) [ path.pwd ] ] ; - } - } - else - { - # There were not directory in wildcard, so the files are all - # in the source directory of the project. Just drop the - # directory, instead of making paths absolute. - result = $(paths:D="") ; - } - - return $(result) ; + return [ project.glob-internal [ project.current ] + : $(wildcards) : $(excludes) : glob ] ; } - + + rule glob-tree ( wildcards + : excludes * ) + { + import project ; + + if $(wildcards:D) || $(excludes:D) + { + errors.user-error "The patterns to 'glob-tree' may not include directory" ; + } + return [ project.glob-internal [ project.current ] + : $(wildcards) : $(excludes) : glob-tree ] ; + } + # Calculates conditional requirements for multiple requirements # at once. This is a shorthand to be reduce duplication and to # keep an inline declarative syntax. For example: diff --git a/v2/test/project_glob.py b/v2/test/project_glob.py index a902ae1bc..39ec39305 100644 --- a/v2/test/project_glob.py +++ b/v2/test/project_glob.py @@ -103,6 +103,28 @@ exe a : [ glob foo/*.cpp bar/*.cpp : bar/bad* ] ../d2/d//l ; t.run_build_system(subdir="d1") t.expect_addition("d1/bin/$toolset/debug/a.exe") + + +# Test that 'glob-tree' works. +t.rm("d1/bin/$toolset/debug/a.exe") +t.write("d1/Jamfile", """ +project : source-location src ; +exe a : [ glob-tree *.cpp : bad* ] ../d2/d//l ; +""") +t.run_build_system(subdir="d1") +t.expect_addition("d1/bin/$toolset/debug/a.exe") + +# Test that directory names in patterns for +# 'glob-tree' are rejected. +t.write("d1/Jamfile", """ +project : source-location src ; +exe a : [ glob-tree foo/*.cpp bar/*.cpp : bad* ] ../d2/d//l ; +""") + +t.run_build_system(subdir="d1", status=1) +t.expect_output_line("error: The patterns * may not include directory") + + t.rm("d1/src/bar/bad.cpp") # Test that 'glob' works with absolute names From 52bbfeae31139ba87175653665b49754b60ae585 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 25 Nov 2006 17:20:23 +0000 Subject: [PATCH 79/91] Improve formatting of --debug-building output [SVN r36175] --- v2/build/targets.jam | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index e737a9847..e8bf7328b 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1181,10 +1181,11 @@ class basic-target : abstract-target { if [ modules.peek : .debug-building ] { + ECHO ; ECHO [ targets.indent ] "Building target '$(self.name)'" ; + targets.increase-indent ; ECHO [ targets.indent ] "Build request: " [ $(property-set).raw ] ; ECHO [ targets.indent ] "Target requirements: " [ $(self.requirements).raw ] ; - targets.increase-indent ; } if ! $(self.generated.$(property-set)) @@ -1194,7 +1195,8 @@ class basic-target : abstract-target if [ modules.peek : .debug-building ] { - ECHO [ targets.indent ] "Common properties are" [ $(rproperties).raw ] ; + ECHO ; + ECHO [ targets.indent ] "Common properties:" [ $(rproperties).raw ] ; } if $(rproperties[1]) != "@error" && [ $(rproperties).get ] != no @@ -1212,6 +1214,7 @@ class basic-target : abstract-target if [ modules.peek : .debug-building ] { + ECHO ; ECHO [ targets.indent ] "Usage requirements for $(self.name) are " $(usage-requirements) ; } @@ -1220,6 +1223,12 @@ class basic-target : abstract-target $(usage-requirements) ] ; usage-requirements = [ property-set.create $(usage-requirements) ] ; + if [ modules.peek : .debug-building ] + { + ECHO [ targets.indent ] + "Build properties: " [ $(rproperties).raw ] ; + } + local extra = [ $(rproperties).get ] ; source-targets += $(extra:G=) ; # We might get duplicate sources, for example if @@ -1272,8 +1281,7 @@ class basic-target : abstract-target ECHO [ targets.indent ] "Already built" ; } } - - + targets.decrease-indent ; return $(self.generated.$(property-set)) ; } From 244ebce5781d3b775c6087f999f42e89784b2643 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 25 Nov 2006 18:48:12 +0000 Subject: [PATCH 80/91] New example [SVN r36176] --- v2/example/generator/Jamroot | 3 ++ v2/example/generator/README.txt | 4 ++ v2/example/generator/foo.gci | 5 +++ v2/example/generator/soap.jam | 73 +++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 v2/example/generator/Jamroot create mode 100644 v2/example/generator/README.txt create mode 100644 v2/example/generator/foo.gci create mode 100644 v2/example/generator/soap.jam diff --git a/v2/example/generator/Jamroot b/v2/example/generator/Jamroot new file mode 100644 index 000000000..a67e24ca0 --- /dev/null +++ b/v2/example/generator/Jamroot @@ -0,0 +1,3 @@ + +import soap ; +exe foo : foo.gci : on ; \ No newline at end of file diff --git a/v2/example/generator/README.txt b/v2/example/generator/README.txt new file mode 100644 index 000000000..340b9a7bd --- /dev/null +++ b/v2/example/generator/README.txt @@ -0,0 +1,4 @@ + +This example shows how to declare a new generator class. It's necessary +when generator's logic is more complex that just running a single tool. + diff --git a/v2/example/generator/foo.gci b/v2/example/generator/foo.gci new file mode 100644 index 000000000..7d5f90dff --- /dev/null +++ b/v2/example/generator/foo.gci @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} \ No newline at end of file diff --git a/v2/example/generator/soap.jam b/v2/example/generator/soap.jam new file mode 100644 index 000000000..169a9a9da --- /dev/null +++ b/v2/example/generator/soap.jam @@ -0,0 +1,73 @@ + +# This is example of a fictional code generator tool. +# It accepts a single input of type '.gci' and produces +# either one or two outputs of type .cpp, depending +# on the value of the feature +# +# This example is loosely based on gSOAP code generator. + +import type ; +import generators ; +import feature ; +import common ; +import "class" : new ; + +type.register GCI : gci ; + +feature.feature server : off on : incidental ; + +class soap-generator : generator +{ + import "class" : new ; + + rule __init__ ( * : * ) + { + generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; + } + + rule run ( project name ? : property-set : sources * ) + { + if ! $(sources[2]) + { + # Accept only single source. + local t = [ $(sources[1]).type ] ; + if $(t) = GCI + { + # The type is correct. + + # If no output name is specified, guess it from sources. + if ! $(name) + { + name = [ generator.determine-output-name $(sources) ] ; + } + + # Produce one output, using just copy. + local a = [ new action $(sources[1]) + : common.copy : $(property-set) ] ; + local t = [ new file-target $(name) : CPP : $(project) + : $(a) ] ; + + # If in server mode, create another output -- an + # empty file. If this were a real SOAP generator, we + # might have created a single action, and two targets + # both using that action. + local t2 ; + if [ $(property-set).get ] = "on" + { + local a = [ new action : soap.touch : $(property-set) ] ; + t2 = [ new file-target $(name)_server : CPP : $(project) + : $(a) ] ; + } + return $(t) $(t2) ; + } + } + } +} + +generators.register [ new soap-generator soap.soap : GCI : CPP ] ; + +TOUCH = [ common.file-touch-command ] ; +actions touch +{ + $(TOUCH) $(<) +} From d8f04a464fe9bbe628a024ea27d338ceed47ad1f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 27 Nov 2006 05:53:05 +0000 Subject: [PATCH 81/91] Add 'to-boostbook' main target rule to allow generating only the boostbook xml. I.e. only running quickbook. [SVN r36183] --- v2/tools/quickbook.jam | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/v2/tools/quickbook.jam b/v2/tools/quickbook.jam index e794d085e..0402a7bcf 100644 --- a/v2/tools/quickbook.jam +++ b/v2/tools/quickbook.jam @@ -1,6 +1,7 @@ # # Copyright (c) 2005 João Abecasis # Copyright (c) 2005 Vladimir Prus +# Copyright (c) 2006 Rene Rivera # # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at @@ -109,6 +110,8 @@ import generators ; import toolset ; import type ; import scanner ; +import project ; +import targets ; # The one and only QUICKBOOK type! type.register QUICKBOOK : qbk ; @@ -296,3 +299,16 @@ actions quickbook-to-boostbook $(QB-COMMAND) --output-file=$(1) $(2) } +# Declare a main target to convert a quickbook source into a boostbook +# XML file. +rule to-boostbook ( target-name : sources * : requirements * : default-build * ) +{ + local project = [ project.current ] ; + + targets.main-target-alternative + [ new typed-target $(target-name) : $(project) : XML + : [ targets.main-target-sources $(sources) : $(target-name) ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; +} From a87a58b2565548ada3c1c47c066406d68de145a2 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 29 Nov 2006 21:14:20 +0000 Subject: [PATCH 82/91] In http://article.gmane.org/gmane.comp.lib.boost.build/14608 Misha reported that failed links were coming out as successes and offered this fix. [SVN r36203] --- v2/tools/msvc.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index 1b7935380..1597826e9 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -846,6 +846,7 @@ if [ os.name ] in NT actions link bind DEF_FILE { $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" + if errorlevel 1 exit %errorlevel% if exist "$(<[1]).manifest" ( $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1" ) @@ -854,6 +855,7 @@ if [ os.name ] in NT actions link.dll bind DEF_FILE { $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" + if errorlevel 1 exit %errorlevel% if exist "$(<[1]).manifest" ( $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2" ) From 3755500fcb19d0b6081fe858cbde98d0ddba5d0e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 30 Nov 2006 21:15:48 +0000 Subject: [PATCH 83/91] Doc edits [SVN r36217] --- v2/doc/src/advanced.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v2/doc/src/advanced.xml b/v2/doc/src/advanced.xml index 0e1e49961..7d2e8a9aa 100644 --- a/v2/doc/src/advanced.xml +++ b/v2/doc/src/advanced.xml @@ -631,13 +631,16 @@ rule rule-name (
Name + The name of main target has two purposes. First, it's used to refer to this target from other targets and from command line. Second, it's used to compute the names of the generated files. Typically, filenames are obtained from main target name by appending system-dependent suffixes and prefixes. - THe name of a main target can contain alphanumeral characters, + The name of a main target can contain alphanumeric characters, dashes, undescores and dots. The entire name is significant when resolving references from other targets. For determining filenames, only the part before the first dot is taken. For example: From 4203db3d58f3ec0402a0f919be37b3c7d1dd9cde Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 1 Dec 2006 20:30:58 +0000 Subject: [PATCH 84/91] Revive nightly [SVN r36235] --- v2/roll.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/roll.sh b/v2/roll.sh index 5fa840f0c..73fbf150b 100644 --- a/v2/roll.sh +++ b/v2/roll.sh @@ -25,7 +25,7 @@ echo -e "boost-build kernel ;\n" > boost-build.jam # Build the documentation touch doc/project-root.jam -export BOOST_ROOT=/home/ghost/Work/boost-rc +export BOOST_BUILD_PATH=/home/ghost/Work/boost-rc/tools/build/v2 cd doc /home/ghost/Work/boost-rc/tools/jam/src/bin.linuxx86/bjam --v2 /home/ghost/Work/boost-rc/tools/jam/src/bin.linuxx86/bjam --v2 pdf From 711d1a67fe3cad37b84fb55ba5221734b997f5f5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 7 Dec 2006 17:40:17 +0000 Subject: [PATCH 85/91] Add HTML generated directly from the Doxygen tool. Move autoconf into toolset proper. [SVN r36290] --- v2/tools/doxygen-config.jam | 46 +---- v2/tools/doxygen.jam | 364 ++++++++++++++++++++++++++---------- 2 files changed, 268 insertions(+), 142 deletions(-) diff --git a/v2/tools/doxygen-config.jam b/v2/tools/doxygen-config.jam index 8e9f151a5..2cd2ccaeb 100644 --- a/v2/tools/doxygen-config.jam +++ b/v2/tools/doxygen-config.jam @@ -1,47 +1,11 @@ -#~ Copyright 2005 Rene Rivera. +#~ Copyright 2005, 2006 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) -# Automatic configuration for Python tools and librries. To use, just import this module. +# Automatic configuration for Doxygen tools. To use, just import this module. -import os ; import toolset : using ; -if [ os.name ] = NT -{ - local ProgramFiles = [ modules.peek : ProgramFiles ] ; - if $(ProgramFiles) - { - ProgramFiles = "$(ProgramFiles:J= )" ; - } - else - { - ProgramFiles = "C:\\Program Files" ; - } - - local doxygen-path = [ GLOB [ modules.peek : PATH ] "$(ProgramFiles)\\doxygen\\bin" : doxygen\.exe ] ; - doxygen-path = $(doxygen-path[1]) ; - - if $(doxygen-path) - { - if --debug-configuration in [ modules.peek : ARGV ] - { - ECHO "notice:" using doxygen ":" $(doxygen-path) ; - } - using doxygen : $(doxygen-path) ; - } -} -else -{ - local doxygen-path = [ GLOB [ modules.peek : PATH ] : doxygen ] ; - doxygen-path = $(doxygen-path[1]) ; - - if $(xsltproc-path) - { - if --debug-configuration in [ modules.peek : ARGV ] - { - ECHO "notice:" using doxygen ":" $(doxygen-path) ; - } - using doxygen : $(doxygen-path) ; - } -} +ECHO "warning: doxygen-config.jam is deprecated. Use 'using doxygen ;' instead." ; + +using doxygen ; diff --git a/v2/tools/doxygen.jam b/v2/tools/doxygen.jam index e471e99fe..d8a47af62 100644 --- a/v2/tools/doxygen.jam +++ b/v2/tools/doxygen.jam @@ -1,10 +1,22 @@ -# Copyright 2003, 2004 Douglas Gregor -# Copyright 2003, 2004, 2005 Vladimir Prus -# 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) +# Copyright 2003, 2004 Douglas Gregor +# Copyright 2003, 2004, 2005 Vladimir Prus +# Copyright 2006 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) -# This module defines rules to handle generation of BoostBook XML -# from Doxygen XML output. +# This module defines rules to handle generation of various outputs +# from source files documented with doxygen comments. The supported +# transformations are: +# +# * Source -> Doxygen XML -> BoostBook XML +# * Source -> Doxygen HTML +# +# The type of transformation is selected based on the target requested. +# For BoostBook XML, the default, specifying a target with an ".xml" suffix, +# or an empty suffix, will produce a .xml and .boostbook. +# For Doxygen HTML specifying a target with an ".html" suffix will produce +# a directory with the Doxygen html files, and a .html file +# redirecting to that directory. import "class" : new ; import targets ; @@ -18,92 +30,164 @@ import print ; import regex ; import stage ; import project ; - import xsltproc ; +import make ; +import os ; +# Use to specify extra configuration paramters. These get translated +# into a doxyfile which configures the building of the docs. feature.feature doxygen:param : : free ; + +# Specify the "boost.doxygen.header.prefix" XSLT option. feature.feature prefix : : free ; + +# Specify the "boost.doxygen.reftitle" XSLT option. feature.feature reftitle : : free ; -type.register DOXYFILE : doxyfile ; # Doxygen input file -type.register DOXYGEN_XML_MULTIFILE : : XML ; # Doxygen XML multi-file output -type.register DOXYGEN_XML : doxygen : XML ; # Doxygen XML output +# Doxygen configuration input file. +type.register DOXYFILE : doxyfile ; + +# Doxygen XML multi-file output. +type.register DOXYGEN_XML_MULTIFILE : : XML ; + +# Doxygen XML coallesed output. +type.register DOXYGEN_XML : doxygen : XML ; + +# Doxygen HTML multifile directory. +type.register DOXYGEN_HTML_MULTIFILE : dir : HTML ; + +# Redirection HTML file to HTML multifile directory. +type.register DOXYGEN_HTML : : HTML ; # Initialize the Doxygen module. Parameters are: # name: the name of the 'doxygen' executable. If not specified, the name # 'doxygen' will be used rule init ( name ? ) { - if ! $(.initialized) - { - .initialized = true ; - - if $(name) + if ! $(.initialized) { - .doxygen = $(name) ; - } - - generators.register-composing doxygen.headers-to-doxyfile : H HPP : DOXYFILE ; - generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_XML_MULTIFILE ; - generators.register-standard doxygen.xml-to-boostbook : DOXYGEN_XML : BOOSTBOOK ; - generators.register-standard doxygen.collect : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ; - - IMPORT $(__name__) : doxygen : : doxygen ; - } + .initialized = true ; + + if ! $(name) + { + if [ os.name ] = NT + { + local ProgramFiles = [ modules.peek : ProgramFiles ] ; + if $(ProgramFiles) + { + ProgramFiles = "$(ProgramFiles:J= )" ; + } + else + { + ProgramFiles = "C:\\Program Files" ; + } + + local doxygen-path = + [ GLOB + [ modules.peek : PATH ] + "$(ProgramFiles)\\doxygen\\bin" + : doxygen\.exe ] ; + doxygen-path = $(doxygen-path[1]) ; + + if $(doxygen-path) + { + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using doxygen ":" $(doxygen-path) ; + } + .doxygen = $(doxygen-path) ; + } + } + else + { + local doxygen-path = + [ GLOB + [ modules.peek : PATH ] + : doxygen ] ; + doxygen-path = $(doxygen-path[1]) ; + + if $(doxygen-path) + { + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using doxygen ":" $(doxygen-path) ; + } + .doxygen = $(doxygen-path) ; + } + } + } + else + { + if --debug-configuration in [ modules.peek : ARGV ] + { + ECHO "notice:" using doxygen ":" $(name) ; + } + .doxygen = $(name) ; + } + .doxygen ?= doxygen ; + + generators.register-composing doxygen.headers-to-doxyfile : H HPP CPP : DOXYFILE ; + generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_XML_MULTIFILE ; + generators.register-standard doxygen.xml-to-boostbook : DOXYGEN_XML : BOOSTBOOK ; + generators.register-standard doxygen.collect : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ; + generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_HTML_MULTIFILE ; + generators.register-standard doxygen.html-redirect : DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ; + + IMPORT $(__name__) : doxygen : : doxygen ; + } } rule name ( ) { - return $(.doxygen) ; + return $(.doxygen) ; } # Runs Doxygen on the given Doxygen configuration file (the source) to -# generate Doxygen XML (in multiple files). The output is dumped -# according to the settings in the Doxygen configuration file, not -# according to the target! Because of this, we essentially "touch" the -# target file, in effect making it look like we've really written -# something useful to it. Anyone that uses this action must deal with -# this behavior. -actions doxygen-action +# generate the Doxygen files. The output is dumped according to the settings +# in the Doxygen configuration file, not according to the target! Because +# of this, we essentially "touch" the target file, in effect making it look +# like we've really written something useful to it. Anyone that uses this +# action must deal with this behavior. +actions doxygen-action { - "$(NAME:E=doxygen)" $(>) ; - echo "Stamped" > "$(<)" + "$(NAME:E=doxygen)" $(>) && echo "Stamped" > "$(<)" } # Generates a doxygen configuration file (doxyfile) given a set of C++ -# sources anda property list that may contain +# sources and a property list that may contain # features. rule headers-to-doxyfile ( target : sources * : properties * ) { - local text "# Generated by Boost.Build version 2" ; + local text "# Generated by Boost.Build version 2" ; - # Translate into command line flags. - for local param in [ feature.get-values : $(properties) ] - { - local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ; - text += "$(namevalue[1]) = $(namevalue[2])" ; - } - - local headers = "" ; - for local source in $(sources:G=) - { - headers = "$(headers) $(source)" ; - } + # Translate into command line flags. + for local param in [ feature.get-values : $(properties) ] + { + local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ; + text += "$(namevalue[1]) = $(namevalue[2])" ; + } - text += "GENERATE_HTML = NO" ; - text += "GENERATE_LATEX = NO" ; - text += "GENERATE_XML = YES" ; - text += "INPUT = $(headers) " ; - print.output $(target) plain ; - print.text $(text) : true ; + local headers = "" ; + for local source in $(sources:G=) + { + headers = "$(headers) $(source)" ; + } + + # Doxygen generates LaTex by default. So disable it unconditionally, + # or at least until someone needs, and hence writes support for, LaTex + # output. + text += "GENERATE_LATEX = NO" ; + text += "INPUT = $(headers) " ; + print.output $(target) plain ; + print.text $(text) : true ; } # Run Doxygen. See doxygen-action for a description of the strange # properties of this rule rule run ( target : source : properties * ) { - doxygen-action $(target) : $(source) ; - NAME on $(target) = $(.doxygen) ; + doxygen-action $(target) : $(source) ; + NAME on $(target) = $(.doxygen) ; } # The rules below require Boost.Book stylesheets, so we need @@ -118,10 +202,9 @@ rule check-boostbook ( ) ECHO "error: which requires Boost.Book," ; ECHO "error: but never initialized Boost.Book." ; EXIT "error: Hint: add 'using boostbook ;' to your user-config.jam" ; - } + } } - # Collect the set of Doxygen XML files into a single XML source file # that can be handled by an XSLT processor. The source is completely # ignored (see doxygen-action), because this action picks up the @@ -131,58 +214,137 @@ rule check-boostbook ( ) # Doxygen XML file. rule collect ( target : source : properties * ) { - check-boostbook ; - local collect-xsl-dir = [ path.native - [ path.join [ boostbook.xsl-dir ] doxygen collect ] - ] ; - local collect-path = [ path.join [ path.pwd ] xml ] ; - local real-source = [ path.native xml/index.xml ] ; - NOTFILE $(real-source) ; - xsltproc.xslt $(target) : $(real-source) $(collect-xsl-dir:S=.xsl) - : doxygen.xml.path=$(collect-path) - ; + check-boostbook ; + local collect-xsl-dir = [ path.native + [ path.join [ boostbook.xsl-dir ] doxygen collect ] + ] ; + local collect-path = [ path.join [ path.pwd ] xml ] ; + local real-source = [ path.native xml/index.xml ] ; + NOTFILE $(real-source) ; + xsltproc.xslt $(target) : $(real-source) $(collect-xsl-dir:S=.xsl) + : doxygen.xml.path=$(collect-path) + ; } # Translate Doxygen XML into BoostBook rule xml-to-boostbook ( target : source : properties * ) { - check-boostbook ; - local xsl-dir = [ boostbook.xsl-dir ] ; - local d2b-xsl = [ path.native - [ path.join [ boostbook.xsl-dir ] doxygen - doxygen2boostbook.xsl ] ] ; + check-boostbook ; + local xsl-dir = [ boostbook.xsl-dir ] ; + local d2b-xsl = [ path.native + [ path.join [ boostbook.xsl-dir ] doxygen + doxygen2boostbook.xsl ] ] ; - local xslt-properties = $(properties) ; - for local prefix in [ feature.get-values : $(properties) ] - { - xslt-properties += "boost.doxygen.header.prefix=$(prefix)" ; - } - for local title in [ feature.get-values : $(properties) ] - { - xslt-properties += "boost.doxygen.reftitle=\"$(title)\"" ; - } + local xslt-properties = $(properties) ; + for local prefix in [ feature.get-values : $(properties) ] + { + xslt-properties += "boost.doxygen.header.prefix=$(prefix)" ; + } + for local title in [ feature.get-values : $(properties) ] + { + xslt-properties += "boost.doxygen.reftitle=\"$(title)\"" ; + } - xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ; + xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ; } -# User-level rule to generate BoostBook XML from a set of headers via Doxygen. -rule doxygen ( target-name : sources * : requirements * : default-build * ) +# Generate the HTML redirect to HTML dir index.html file. +rule html-redirect ( target : source : properties * ) { - local project = [ project.current ] ; + local uri = "$(target:B)/index.html" ; + print.output $(target) plain ; + print.text +" + + + - local doxyfile = [ - new typed-target $(target-name) : $(project) : BOOSTBOOK - : [ targets.main-target-sources $(sources) : $(target-name) ] - : [ targets.main-target-requirements $(requirements) : $(project) ] - : [ targets.main-target-default-build $(default-build) : $(project) ] - ] ; + + - targets.main-target-alternative $(doxyfile) ; - - targets.main-target-alternative - [ new install-target-class $(target-name:S=.xml) : $(project) - : [ $(doxyfile).name ] - : [ targets.main-target-requirements $(requirements) . : $(project) ] - : [ targets.main-target-default-build $(default-build) : $(project) ] - ] ; + + Automatic redirection failed, please go to $(uri). + + +" + : true ; +} + +# User-level rule to generate BoostBook XML from a set of headers via Doxygen. +rule doxygen ( target : sources * : requirements * : default-build * ) +{ + local project = [ project.current ] ; + + if $(target:S) = .html + { + # Build an HTML directory from the sources. + local output-dir = [ path.root + [ path.join + [ feature.get-values : $(requirements) ] + [ $(project).get build-dir ] + ] + [ path.pwd ] + ] ; + local output-dir-native = [ path.native $(output-dir) ] ; + requirements = [ property.change $(requirements) : ] ; + + ## The doxygen configuration file. + targets.main-target-alternative + [ new typed-target $(target:S=.tag) : $(project) : DOXYFILE + : [ targets.main-target-sources $(sources) : $(target:S=.tag) ] + : [ targets.main-target-requirements $(requirements) + GENERATE_HTML=YES + GENERATE_XML=NO + "OUTPUT_DIRECTORY=$(output-dir-native)" + HTML_OUTPUT=$(target:B) + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + $(project).mark-target-as-explicit $(target:S=.tag) ; + + ## The html directory to generate by running doxygen. + targets.main-target-alternative + [ new typed-target $(target:S=.dir) : $(project) : DOXYGEN_HTML_MULTIFILE + : $(target:S=.tag) + : [ targets.main-target-requirements $(requirements) + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + $(project).mark-target-as-explicit $(target:S=.dir) ; + + ## The redirect html file into the generated html. + targets.main-target-alternative + [ new typed-target $(target) : $(project) : DOXYGEN_HTML + : $(target:S=.dir) + : [ targets.main-target-requirements $(requirements) + $(output-dir) + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + } + else + { + # Build a BoostBook XML file from the sources. + local doxyfile = [ + new typed-target $(target) : $(project) : BOOSTBOOK + : [ targets.main-target-sources $(sources) : $(target) ] + : [ targets.main-target-requirements $(requirements) + GENERATE_HTML=NO + GENERATE_XML=YES + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + targets.main-target-alternative $(doxyfile) ; + + targets.main-target-alternative + [ new install-target-class $(target:S=.xml) : $(project) + : [ $(doxyfile).name ] + : [ targets.main-target-requirements $(requirements) + . + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + } } From ea10c8720cb2ba4c70cf9ae5e0e2c2eddfb4b282 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 8 Dec 2006 14:27:09 +0000 Subject: [PATCH 86/91] handle comma-separated toolsets [SVN r36301] --- v2/build-system.jam | 100 ++++++++++++++++++++++---------------------- v2/util/regex.jam | 12 ++++++ 2 files changed, 63 insertions(+), 49 deletions(-) diff --git a/v2/build-system.jam b/v2/build-system.jam index f32460469..f938aa00e 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -23,6 +23,7 @@ import errors : error ; import virtual-target ; import "class" : new ; import toolset ; +import regex ; import builtin ; import make ; @@ -123,68 +124,69 @@ module user-config load-config user-config : $(user-path) ; # -# Autoconfigure toolsets based on any instances of --toolset=xxx or -# toolset=xxx in the command line +# Autoconfigure toolsets based on any instances of --toolset=xx,yy,...zz or +# toolset=xx,yy,...zz in the command line # local argv = [ modules.peek : ARGV ] ; -local toolset-version = [ MATCH ^-?-?toolset=(.*) : $(argv) ] ; -# if the user specified --toolset=..., we need to add toolset=... to -# the build request -local extra-build-request ; +local option-toolsets = [ regex.split-list [ MATCH ^--toolset=(.*) : $(argv) ] : "," ] ; +local feature-toolsets = [ regex.split-list [ MATCH ^toolset=(.*) : $(argv) ] : "," ] ; -if $(toolset-version) && ! $(ignore-config) +if ! $(ignore-config) { - local toolset = [ MATCH ([^-]+).* : $(toolset-version) ] ; - local version = [ MATCH [^-]+-(.+) : $(toolset-version) ] ; - - if $(debug-config) - { - ECHO notice: [cmdline-cfg] Detected command-line request for - $(toolset-version): toolset= \"$(toolset)\" "version= \""$(version)\" ; - } - - local known ; - - # if the toolset isn't known, configure it now. - if $(toolset) in [ feature.values ] - { - known = true ; - } - - if $(known) && $(version) - && ! [ feature.is-subvalue toolset : $(toolset) : version : $(version) ] - { - known = ; - } - - if ! $(known) + for local toolset-version in $(option-toolsets) $(feature-toolsets) { + local toolset = [ MATCH ([^-]+).* : $(toolset-version) ] ; + local version = [ MATCH [^-]+-(.+) : $(toolset-version) ] ; + if $(debug-config) { - ECHO notice: [cmdline-cfg] toolset $(toolset-version) - not previously configured; configuring now ; + ECHO notice: [cmdline-cfg] Detected command-line request for + $(toolset-version): toolset= \"$(toolset)\" "version= \""$(version)\" ; } - toolset.using $(toolset) : $(version) ; - } - else - { - if $(debug-config) + + local known ; + + # if the toolset isn't known, configure it now. + if $(toolset) in [ feature.values ] { - ECHO notice: [cmdline-cfg] toolset $(toolset-version) already configured ; + known = true ; } - } - - # make sure we get an appropriate property in the build request into - # case the user used the "--toolset=..." form - if ! $(toolset-version) in $(argv) - && ! toolset=$(toolset-version) in $(argv) - { - if $(debug-config) + + if $(known) && $(version) + && ! [ feature.is-subvalue toolset : $(toolset) : version : $(version) ] { - ECHO notice: [cmdline-cfg] adding toolset=$(toolset-version) "to build request." ; + known = ; + } + + if ! $(known) + { + if $(debug-config) + { + ECHO notice: [cmdline-cfg] toolset $(toolset-version) + not previously configured; configuring now ; + } + toolset.using $(toolset) : $(version) ; + } + else + { + if $(debug-config) + { + ECHO notice: [cmdline-cfg] toolset $(toolset-version) already configured ; + } + } + + # make sure we get an appropriate property into the build request in + # case the user used the "--toolset=..." form + if ! $(toolset-version) in $(argv) + && ! $(toolset-version) in $(feature-toolsets) + { + if $(debug-config) + { + ECHO notice: [cmdline-cfg] adding toolset=$(toolset-version) "to build request." ; + } + extra-build-request += toolset=$(toolset-version) ; } - extra-build-request += toolset=$(toolset-version) ; } } diff --git a/v2/util/regex.jam b/v2/util/regex.jam index c805abb2c..1b59f86a8 100644 --- a/v2/util/regex.jam +++ b/v2/util/regex.jam @@ -34,6 +34,18 @@ rule split ( string separator ) return $(s) $(result) ; } +# Returns the concatenated results of Applying regex.split to every +# element of list using the separator pattern. +rule split-list ( list * : separator ) +{ + local result ; + for s in $(list) + { + result += [ split $(s) $(separator) ] ; + } + return $(result) ; +} + # Match string against pattern, and return the elements indicated by # indices. rule match ( pattern : string : indices * ) From e19ae2068424b49fc1d5c82163149b6a7733e57c Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 8 Dec 2006 14:27:10 +0000 Subject: [PATCH 87/91] Add missing local variable declaration [SVN r36302] --- v2/build-system.jam | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v2/build-system.jam b/v2/build-system.jam index f938aa00e..4626c5076 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -132,6 +132,10 @@ local argv = [ modules.peek : ARGV ] ; local option-toolsets = [ regex.split-list [ MATCH ^--toolset=(.*) : $(argv) ] : "," ] ; local feature-toolsets = [ regex.split-list [ MATCH ^toolset=(.*) : $(argv) ] : "," ] ; +# if the user specified --toolset=..., we need to add toolset=... to +# the build request +local extra-build-request ; + if ! $(ignore-config) { for local toolset-version in $(option-toolsets) $(feature-toolsets) From 7ec56b43aa905bb6521b15f48f2fae68232f58e3 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 9 Dec 2006 11:19:22 +0000 Subject: [PATCH 88/91] Handle negative exit codes [SVN r36308] --- v2/tools/msvc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index 1597826e9..d90860909 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -846,7 +846,7 @@ if [ os.name ] in NT actions link bind DEF_FILE { $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" - if errorlevel 1 exit %errorlevel% + if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% if exist "$(<[1]).manifest" ( $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1" ) @@ -855,7 +855,7 @@ if [ os.name ] in NT actions link.dll bind DEF_FILE { $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" - if errorlevel 1 exit %errorlevel% + if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% if exist "$(<[1]).manifest" ( $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2" ) From b68f90903caa1eb11d14b5bb11ef4d13761ceb60 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 10 Dec 2006 20:17:59 +0000 Subject: [PATCH 89/91] Allow not specifying when generating HTML docs. [SVN r36314] --- v2/tools/doxygen.jam | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/v2/tools/doxygen.jam b/v2/tools/doxygen.jam index d8a47af62..52898d1a8 100644 --- a/v2/tools/doxygen.jam +++ b/v2/tools/doxygen.jam @@ -280,11 +280,9 @@ rule doxygen ( target : sources * : requirements * : default-build * ) if $(target:S) = .html { # Build an HTML directory from the sources. + local html-location = [ feature.get-values : $(requirements) ] ; local output-dir = [ path.root - [ path.join - [ feature.get-values : $(requirements) ] - [ $(project).get build-dir ] - ] + [ path.join $(html-location:E=html) [ $(project).get build-dir ] ] [ path.pwd ] ] ; local output-dir-native = [ path.native $(output-dir) ] ; From ceee5e267a9593085c92c0a395704dffbf972bf8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Dec 2006 03:34:35 +0000 Subject: [PATCH 90/91] Add configuration option to be able to add STLfilt to compiles directly. [SVN r36320] --- v2/tools/msvc.jam | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index d90860909..b7041f0e9 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -102,6 +102,10 @@ rule init ( # - if compiler is not found in default locations, PATH will be searched. : options * # options can include , , , and + # + # + # Command to pipe the output of running the compiler. For example + # to pass the output to STLfilt. ) { if $(command) @@ -334,6 +338,8 @@ local rule configure-really ( mc-compiler ?= mc ; manifest-tool = mt ; + + local cc-filter = [ get-values : $(options) ] ; for local i in 1 2 3 { @@ -365,6 +371,11 @@ local rule configure-really ( { flags msvc.link .MT $(cond) : $(manifest-tool) -nologo ; } + + if $(cc-filter) + { + flags msvc .CC.FILTER $(cond) : "|" $(cc-filter) ; + } } } # Set version-specific flags @@ -680,7 +691,7 @@ rule compile-c-c++ ( targets + : sources * ) actions compile-c-c++ { - $(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" + $(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER) } rule compile.c ( targets + : sources * : properties * ) @@ -698,7 +709,7 @@ rule compile.c++ ( targets + : sources * : properties * ) actions compile-c-c++-pch-s { - $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" + $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER) } # Needed only to avoid messing up Emacs syntax highlighting in @@ -707,7 +718,7 @@ quote = "\"" ; actions compile-c-c++-pch { - $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(quote)$(>[1]:D=)$(quote))" + $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(quote)$(>[1]:D=)$(quote))" $(.CC.FILTER) } rule compile.c.pch ( targets + : sources * : properties * ) From f1493bf1fa5968673733f338f25aca8309796eaf Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 11 Dec 2006 03:35:10 +0000 Subject: [PATCH 91/91] Remove BBv1 for good [SVN r36321] --- v1/acc-tools.jam | 119 - v1/allyourbase.jam | 2246 ------------- v1/boost-base.jam | 2977 ------------------ v1/bootstrap.jam | 43 - v1/borland-5_5_1-tools.jam | 14 - v1/borland-5_6_4-tools.jam | 14 - v1/borland-5_8_2-tools.jam | 14 - v1/borland-tools.html | 82 - v1/borland-tools.jam | 211 -- v1/build_system.htm | 1565 --------- v1/como-4_3_3-vc7-tools.jam | 34 - v1/como-4_3_3-vc7_1-tools.jam | 18 - v1/como-tools.html | 139 - v1/como-tools.jam | 100 - v1/como-win32-tools.jam | 160 - v1/cw-8_3-tools.jam | 12 - v1/cw-9_2-tools.jam | 12 - v1/cw-9_3-tools.jam | 12 - v1/cw-9_4-tools.jam | 12 - v1/cw-tools.html | 88 - v1/cw-tools.jam | 377 --- v1/darwin-tools.html | 97 - v1/darwin-tools.jam | 230 -- v1/distribution.jam | 178 -- v1/dmc-stlport-tools.html | 55 - v1/dmc-stlport-tools.jam | 21 - v1/dmc-tools.html | 79 - v1/dmc-tools.jam | 106 - v1/edg-tools.html | 77 - v1/edg-tools.jam | 91 - v1/example/boost-build.jam | 5 - v1/example/lib_use/Jamfile | 51 - v1/example/lib_use/simple.cpp | 17 - v1/example/lib_use/simple_lib.cpp | 11 - v1/example/property_rule/Jamfile | 13 - v1/example/property_rule/bar.cpp | 5 - v1/example/property_rule/foo.cpp | 5 - v1/example/property_rule/inc/foo.hpp | 9 - v1/example/property_rule/project-root.jam | 5 - v1/example/stage_source_selection/Jamfile | 55 - v1/example/stage_source_selection/simple.cpp | 15 - v1/example/sublib_use/Jamfile | 10 - v1/example/sublib_use/sub/Jamfile | 31 - v1/example/sublib_use/sub/simple.cpp | 17 - v1/example/sublib_use/sublib/Jamfile | 28 - v1/example/sublib_use/sublib/simple_lib.cpp | 11 - v1/example/target_test_arg/Jamfile | 29 - v1/example/target_test_arg/simple.cpp | 15 - v1/example/target_test_arg/simple_lib.cpp | 11 - v1/example/template_use/Jamfile | 23 - v1/example/template_use/include/simple.h | 11 - v1/example/template_use/sub/Jamfile | 43 - v1/example/template_use/sub/simple.cpp | 17 - v1/example/template_use/sub/simple_lib.cpp | 11 - v1/features.jam | 251 -- v1/gcc-nocygwin-tools.html | 176 -- v1/gcc-nocygwin-tools.jam | 33 - v1/gcc-stlport-tools.html | 50 - v1/gcc-stlport-tools.jam | 59 - v1/gcc-tools.html | 132 - v1/gcc-tools.jam | 529 ---- v1/gen_aix_import_file.py | 113 - v1/hacking.txt | 155 - v1/index.html | 21 - v1/intel-linux-tools.html | 110 - v1/intel-linux-tools.jam | 188 -- v1/intel-win32-8_0-tools.jam | 14 - v1/intel-win32-8_1-tools.jam | 14 - v1/intel-win32-9_0-tools.jam | 14 - v1/intel-win32-stlport-tools.jam | 35 - v1/intel-win32-tools.html | 117 - v1/intel-win32-tools.jam | 120 - v1/iw-7_1-vc6-stlp-4_5_3-tools.jam | 17 - v1/iw-7_1-vc6-tools.jam | 15 - v1/kcc-tools.html | 79 - v1/kcc-tools.jam | 81 - v1/kylix-tools.html | 88 - v1/kylix-tools.jam | 155 - v1/mingw-3_3_1-tools.jam | 11 - v1/mingw-3_4_1-tools.jam | 11 - v1/mingw-3_4_2-tools.jam | 11 - v1/mingw-stlport-tools.html | 51 - v1/mingw-stlport-tools.jam | 14 - v1/mingw-tools.html | 112 - v1/mingw-tools.jam | 32 - v1/mipspro-tools.html | 121 - v1/mipspro-tools.jam | 259 -- v1/msvc-stlport-tools.html | 56 - v1/msvc-stlport-tools.jam | 21 - v1/msvc-tools.html | 93 - v1/msvc-tools.jam | 201 -- v1/python.jam | 647 ---- v1/qcc-3_3_1-tools.jam | 9 - v1/qcc-3_3_5-cpp-tools.jam | 9 - v1/qcc-3_3_5-gpp-tools.jam | 9 - v1/qcc-tools.jam | 31 - v1/stlport.html | 222 -- v1/stlport.jam | 205 -- v1/sunpro-stlport-tools.jam | 20 - v1/sunpro-tools.html | 213 -- v1/sunpro-tools.jam | 162 - v1/test/jamfile | 2 - v1/test/test-testing.jam | 24 - v1/testing.jam | 586 ---- v1/tru64cxx-tools.html | 66 - v1/tru64cxx-tools.jam | 105 - v1/tru64cxx65-tools.jam | 148 - v1/unit-tests.jam | 270 -- v1/vacpp-tools.html | 53 - v1/vacpp-tools.jam | 152 - v1/variables.html | 489 --- v1/vc-6_5-stlport-tools.jam | 9 - v1/vc-6_5-tools.jam | 9 - v1/vc-7_0-stlport-tools.jam | 9 - v1/vc-7_0-tools.jam | 11 - v1/vc-7_1-stlport-tools.html | 87 - v1/vc-7_1-stlport-tools.jam | 37 - v1/vc-7_1-tools.html | 84 - v1/vc-7_1-tools.jam | 32 - v1/vc-8_0-amd64-tools.jam | 18 - v1/vc-8_0-tools.html | 149 - v1/vc-8_0-tools.jam | 41 - v1/vc-8_0-x86_amd64-tools.jam | 40 - v1/vc7-stlport-tools.html | 87 - v1/vc7-stlport-tools.jam | 39 - v1/vc7-tools.html | 80 - v1/vc7-tools.jam | 34 - 127 files changed, 17378 deletions(-) delete mode 100644 v1/acc-tools.jam delete mode 100644 v1/allyourbase.jam delete mode 100644 v1/boost-base.jam delete mode 100644 v1/bootstrap.jam delete mode 100644 v1/borland-5_5_1-tools.jam delete mode 100644 v1/borland-5_6_4-tools.jam delete mode 100644 v1/borland-5_8_2-tools.jam delete mode 100644 v1/borland-tools.html delete mode 100644 v1/borland-tools.jam delete mode 100644 v1/build_system.htm delete mode 100644 v1/como-4_3_3-vc7-tools.jam delete mode 100644 v1/como-4_3_3-vc7_1-tools.jam delete mode 100644 v1/como-tools.html delete mode 100644 v1/como-tools.jam delete mode 100644 v1/como-win32-tools.jam delete mode 100644 v1/cw-8_3-tools.jam delete mode 100644 v1/cw-9_2-tools.jam delete mode 100644 v1/cw-9_3-tools.jam delete mode 100644 v1/cw-9_4-tools.jam delete mode 100644 v1/cw-tools.html delete mode 100644 v1/cw-tools.jam delete mode 100644 v1/darwin-tools.html delete mode 100644 v1/darwin-tools.jam delete mode 100644 v1/distribution.jam delete mode 100644 v1/dmc-stlport-tools.html delete mode 100644 v1/dmc-stlport-tools.jam delete mode 100644 v1/dmc-tools.html delete mode 100644 v1/dmc-tools.jam delete mode 100644 v1/edg-tools.html delete mode 100644 v1/edg-tools.jam delete mode 100644 v1/example/boost-build.jam delete mode 100644 v1/example/lib_use/Jamfile delete mode 100644 v1/example/lib_use/simple.cpp delete mode 100644 v1/example/lib_use/simple_lib.cpp delete mode 100644 v1/example/property_rule/Jamfile delete mode 100644 v1/example/property_rule/bar.cpp delete mode 100644 v1/example/property_rule/foo.cpp delete mode 100644 v1/example/property_rule/inc/foo.hpp delete mode 100644 v1/example/property_rule/project-root.jam delete mode 100644 v1/example/stage_source_selection/Jamfile delete mode 100644 v1/example/stage_source_selection/simple.cpp delete mode 100644 v1/example/sublib_use/Jamfile delete mode 100644 v1/example/sublib_use/sub/Jamfile delete mode 100644 v1/example/sublib_use/sub/simple.cpp delete mode 100644 v1/example/sublib_use/sublib/Jamfile delete mode 100644 v1/example/sublib_use/sublib/simple_lib.cpp delete mode 100644 v1/example/target_test_arg/Jamfile delete mode 100644 v1/example/target_test_arg/simple.cpp delete mode 100644 v1/example/target_test_arg/simple_lib.cpp delete mode 100644 v1/example/template_use/Jamfile delete mode 100644 v1/example/template_use/include/simple.h delete mode 100644 v1/example/template_use/sub/Jamfile delete mode 100644 v1/example/template_use/sub/simple.cpp delete mode 100644 v1/example/template_use/sub/simple_lib.cpp delete mode 100644 v1/features.jam delete mode 100644 v1/gcc-nocygwin-tools.html delete mode 100644 v1/gcc-nocygwin-tools.jam delete mode 100644 v1/gcc-stlport-tools.html delete mode 100644 v1/gcc-stlport-tools.jam delete mode 100644 v1/gcc-tools.html delete mode 100644 v1/gcc-tools.jam delete mode 100644 v1/gen_aix_import_file.py delete mode 100644 v1/hacking.txt delete mode 100644 v1/index.html delete mode 100644 v1/intel-linux-tools.html delete mode 100644 v1/intel-linux-tools.jam delete mode 100644 v1/intel-win32-8_0-tools.jam delete mode 100644 v1/intel-win32-8_1-tools.jam delete mode 100644 v1/intel-win32-9_0-tools.jam delete mode 100644 v1/intel-win32-stlport-tools.jam delete mode 100644 v1/intel-win32-tools.html delete mode 100644 v1/intel-win32-tools.jam delete mode 100644 v1/iw-7_1-vc6-stlp-4_5_3-tools.jam delete mode 100644 v1/iw-7_1-vc6-tools.jam delete mode 100644 v1/kcc-tools.html delete mode 100644 v1/kcc-tools.jam delete mode 100644 v1/kylix-tools.html delete mode 100644 v1/kylix-tools.jam delete mode 100644 v1/mingw-3_3_1-tools.jam delete mode 100644 v1/mingw-3_4_1-tools.jam delete mode 100644 v1/mingw-3_4_2-tools.jam delete mode 100644 v1/mingw-stlport-tools.html delete mode 100644 v1/mingw-stlport-tools.jam delete mode 100644 v1/mingw-tools.html delete mode 100644 v1/mingw-tools.jam delete mode 100644 v1/mipspro-tools.html delete mode 100644 v1/mipspro-tools.jam delete mode 100644 v1/msvc-stlport-tools.html delete mode 100644 v1/msvc-stlport-tools.jam delete mode 100644 v1/msvc-tools.html delete mode 100644 v1/msvc-tools.jam delete mode 100644 v1/python.jam delete mode 100644 v1/qcc-3_3_1-tools.jam delete mode 100644 v1/qcc-3_3_5-cpp-tools.jam delete mode 100644 v1/qcc-3_3_5-gpp-tools.jam delete mode 100644 v1/qcc-tools.jam delete mode 100644 v1/stlport.html delete mode 100644 v1/stlport.jam delete mode 100644 v1/sunpro-stlport-tools.jam delete mode 100644 v1/sunpro-tools.html delete mode 100644 v1/sunpro-tools.jam delete mode 100644 v1/test/jamfile delete mode 100644 v1/test/test-testing.jam delete mode 100755 v1/testing.jam delete mode 100644 v1/tru64cxx-tools.html delete mode 100644 v1/tru64cxx-tools.jam delete mode 100644 v1/tru64cxx65-tools.jam delete mode 100644 v1/unit-tests.jam delete mode 100644 v1/vacpp-tools.html delete mode 100644 v1/vacpp-tools.jam delete mode 100644 v1/variables.html delete mode 100644 v1/vc-6_5-stlport-tools.jam delete mode 100644 v1/vc-6_5-tools.jam delete mode 100644 v1/vc-7_0-stlport-tools.jam delete mode 100644 v1/vc-7_0-tools.jam delete mode 100644 v1/vc-7_1-stlport-tools.html delete mode 100644 v1/vc-7_1-stlport-tools.jam delete mode 100644 v1/vc-7_1-tools.html delete mode 100644 v1/vc-7_1-tools.jam delete mode 100644 v1/vc-8_0-amd64-tools.jam delete mode 100644 v1/vc-8_0-tools.html delete mode 100644 v1/vc-8_0-tools.jam delete mode 100644 v1/vc-8_0-x86_amd64-tools.jam delete mode 100644 v1/vc7-stlport-tools.html delete mode 100644 v1/vc7-stlport-tools.jam delete mode 100644 v1/vc7-tools.html delete mode 100644 v1/vc7-tools.jam diff --git a/v1/acc-tools.jam b/v1/acc-tools.jam deleted file mode 100644 index 12eecfce4..000000000 --- a/v1/acc-tools.jam +++ /dev/null @@ -1,119 +0,0 @@ -# (C) Copyright Toon Knapen 2002, David Abrahams 2002 -# 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) - -# -# Jam tools information for : -# HP-UX aCC compiler -# - -set-as-singleton acc.root-directory ; -acc.bin-directory = $(acc.root-directory)$(SLASH)bin$(SLASH) ; -acc.bin-directory ?= " " ; - - -flags acc CC : cc ; -flags acc CXX : aCC ; - -flags acc CFLAGS off : ; -flags acc CFLAGS default : -O ; -flags acc CFLAGS speed : -O3 ; -flags acc CFLAGS space : -O2 ; - -flags acc CFLAGS off : +d ; -flags acc CFLAGS on : ; -flags acc CFLAGS full : ; -flags acc CFLAGS multi : -mt ; - -flags acc C++FLAGS off : ; -flags acc C++FLAGS on : ; - -flags acc C++FLAGS off : ; -flags acc C++FLAGS on : ; - -flags acc LINKFLAGS static : -llibstd_v2.a ; -flags acc LINKFLAGS shared : -llibstd_v2.sl ; - - -# We want the full path to the sources in the debug symbols because otherwise -# the debugger won't find the sources when we use boost.build. -flags acc CFLAGS on : -g ; -flags acc LINKFLAGS on : -g ; -flags acc LINKFLAGS off : -s ; -flags acc LINKFLAGS multi : -mt ; - -flags acc CFLAGS true : +Z ; -flags acc CFLAGS $(SHARED_TYPES) : +z ; -flags acc CFLAGS off : -w ; -flags acc LINKFLAGS $(SHARED_TYPES) : -b ; - -flags acc CFLAGS on : -pg ; -flags acc LINKFLAGS on : -pg ; - -flags acc CFLAGS ; -flags acc C++FLAGS ; -flags acc DEFINES ; -flags acc UNDEFS ; -flags acc HDRS ; -flags acc STDHDRS ; -flags acc LINKFLAGS ; -flags acc ARFLAGS ; - -flags acc LIBPATH ; -flags acc NEEDLIBS ; -flags acc FINDLIBS ; - -# BOOST_COMPATIBILITY ?= $(BOOST_ROOT)$(SLASH)boost$(SLASH)compatibility$(SLASH)cpp_c_headers ; -# flags tru64cxx STDHDRS : $(BOOST_COMPATIBILITY) ; - -if ! $(ARFLAGS) -{ - flags acc ARFLAGS : "" ; -} - -#### Link #### - -rule Link-action -{ - aCC-Link-action $(<) : $(>) ; -} - -actions aCC-Link-action bind NEEDLIBS -{ - $(acc.bin-directory)$(CXX) $(LINKFLAGS) -AA -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -} - -#### Cc ##### - -rule Cc-action -{ - acc-Cc-action $(<) : $(>) ; -} - -actions acc-Cc-action -{ - $(acc.bin-directory)$(CC) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - aCC-C++-action $(<) : $(>) ; -} - -actions aCC-C++-action -{ - $(acc.bin-directory)$(CXX) -AA -c +W823 -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - acc-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal acc-Archive-action -{ - ar ru$(ARFLAGS) "$(<)" "$(>)" -} diff --git a/v1/allyourbase.jam b/v1/allyourbase.jam deleted file mode 100644 index 4b4e28f5b..000000000 --- a/v1/allyourbase.jam +++ /dev/null @@ -1,2246 +0,0 @@ -# -# /+\ -# +\ Copyright 1993, 2000 Christopher Seiwald. -# \+/ -# -# This file is part of Jam - see jam.c for Copyright information. -# - -# This file is ALSO: -# (C) Copyright David Abrahams 2001. -# 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) - -# -# JAMBASE - jam 2.3 ruleset providing make(1)-like functionality -# -# Supports UNIX, NT, and VMS. -# -# 12/27/93 (seiwald) - purturb library sources with SOURCE_GRIST -# 04/18/94 (seiwald) - use '?=' when setting OS specific vars -# 04/21/94 (seiwald) - do RmTemps together -# 05/05/94 (seiwald) - all supported C compilers support -o: relegate -# RELOCATE as an option; set Ranlib to "" to disable it -# 06/01/94 (seiwald) - new 'actions existing' to do existing sources -# 08/25/94 (seiwald) - new ObjectCcFlags rule to append to per-target CCFLAGS -# 08/29/94 (seiwald) - new ObjectHdrs rule to append to per-target HDRS -# 09/19/94 (seiwald) - LinkLibraries and Undefs now append -# - Rule names downshifted. -# 10/06/94 (seiwald) - Dumb yyacc stuff moved into Jamfile. -# 10/14/94 (seiwald) - (Crude) support for .s, .C, .cc, .cpp, and .f files. -# 01/08/95 (seiwald) - Shell now handled with awk, not sed -# 01/09/95 (seiwald) - Install* now take dest directory as target -# 01/10/95 (seiwald) - All entries sorted. -# 01/10/95 (seiwald) - NT support moved in, with LauraW's help. -# 01/10/95 (seiwald) - VMS support moved in. -# 02/06/95 (seiwald) - ObjectC++Flags and SubDirC++Flags added. -# 02/07/95 (seiwald) - Iron out when HDRSEARCH uses "" or SEARCH_SOURCE. -# 02/08/95 (seiwald) - SubDir works on VMS. -# 02/14/95 (seiwald) - MkDir and entourage. -# 04/30/95 (seiwald) - Use install -c flag so that it copies, not moves. -# 07/10/95 (taylor) - Support for Microsoft C++. -# 11/21/96 (peterk) - Support for BeOS -# 07/19/99 (sickel) - Support for Mac OS X Server (and maybe client) -# 02/18/00 (belmonte)- Support for Cygwin. - -# Special targets defined in this file: -# -# all - parent of first, shell, files, lib, exe -# first - first dependent of 'all', for potential initialization -# shell - parent of all Shell targets -# files - parent of all File targets -# lib - parent of all Library targets -# exe - parent of all Main targets -# dirs - parent of all MkDir targets -# clean - removes all Shell, File, Library, and Main targets -# uninstall - removes all Install targets -# - -# Rules defined by this file: -# -# as obj.o : source.s ; .s -> .o -# Bulk dir : files ; populate directory with many files -# Cc obj.o : source.c ; .c -> .o -# C++ obj.o : source.cc ; .cc -> .o -# Clean clean : sources ; remove sources with 'jam clean' -# File dest : source ; copy file -# Fortran obj.o : source.f ; .f -> .o -# GenFile source.c : program args ; make custom file -# Hardlink target : source ; make link from source to target -# HdrRule source : headers ; handle #includes -# InstallInto dir : sources ; install any files -# InstallBin dir : sources ; install binaries -# InstallLib dir : sources ; install files -# InstallFile dir : sources ; install files -# InstallMan dir : sources ; install man pages -# InstallShell dir : sources ; install shell scripts -# Lex source.c : source.l ; .l -> .c -# Library lib : source ; archive library from compiled sources -# LibraryFromObjects lib : objects ; archive library from objects -# LinkLibraries images : libraries ; bag libraries onto Mains -# Main image : source ; link executable from compiled sources -# MainFromObjects image : objects ; link executable from objects -# MkDir dir ; make a directory, if not there -# Object object : source ; compile object from source -# ObjectCcFlags source : flags ; add compiler flags for object -# ObjectC++Flags source : flags ; add compiler flags for object -# ObjectHdrs source : dirs ; add include directories for object -# Objects sources ; compile sources -# RmTemps target : sources ; remove temp sources after target made -# Setuid images ; mark executables Setuid -# SubDir TOP d1 d2 ... ; start a subdirectory Jamfile -# SubDirCcFlags flags ; add compiler flags until next SubDir -# SubDirC++Flags flags ; add compiler flags until next SubDir -# SubDirHdrs dirs ; add include dirs until next SubDir -# SubInclude TOP d1 d2 ... ; include a subdirectory Jamfile -# Shell exe : source ; make a shell executable -# Undefines images : symbols ; save undef's for linking -# UserObject object : source ; handle unknown suffixes for Object -# Yacc source.c : source.y ; .y -> .c -# -# Utility rules that have no side effects (not supported): -# -# FAppendSuffix f1 f2 ... : $(SUF) ; return $(<) with suffixes -# join value ... ; return contatenated values -# FDirName d1 d2 ... ; return path from root to dir -# FGrist d1 d2 ... ; return d1!d2!... -# FGristFiles value ; return $(value:G=$(SOURCE_GRIST)) -# FGristSourceFiles value ; return $(value:G=$(SOURCE_GRIST)) -# FRelPath d1 : d2 ; return rel path from d1 to d2 -# FSubDir d1 d2 ... ; return path to root -# - - -# Brief review of the jam language: -# -# Statements: -# rule RULE - statements to process a rule -# actions RULE - system commands to carry out target update -# -# Modifiers on actions: -# together - multiple instances of same rule on target get executed -# once with their sources ($(>)) concatenated -# updated - refers to updated sources ($(>)) only -# ignore - ignore return status of command -# quietly - don't trace its execution unless verbose -# piecemeal - iterate command each time with a small subset of $(>) -# existing - refers to currently existing sources ($(>)) only -# bind vars - subject to binding before expanding in actions -# -# Special rules: -# ALWAYS - always build a target -# DEPENDS - builds the dependency graph -# ECHO - blurt out targets on stdout -# EXIT - blurt out targets and exit -# INCLUDES - marks sources as headers for target (a codependency) -# NOCARE - don't panic if the target can't be built -# NOUPDATE - create the target if needed but never update it -# NOTFILE - ignore the timestamp of the target (it's not a file) -# TEMPORARY - target need not be present if sources haven't changed -# -# Special variables set by jam: -# $(<) - targets of a rule (to the left of the :) -# $(>) - sources of a rule (to the right of the :) -# $(xxx) - true on xxx (UNIX, VMS, NT, OS2, MAC) -# $(OS) - name of OS - varies wildly -# $(JAMVERSION) - version number (2.3) -# -# Special variables used by jam: -# SEARCH - where to find something (used during binding and actions) -# LOCATE - where to plop something not found with SEARCH -# HDRRULE - rule to call to handle include files -# HDRSCAN - egrep regex to extract include files -# -# Special targets: -# all - default if none given on command line -# - -# Initialize variables -# - -# -# OS specific variable settings -# - -# dwa 6/4/01 - removed all settings of the following variables for boost: -# CC, CCFLAGS, C++, C++FLAGS, LINK, LINKFLAGS, LINKLIBS -# probably a lot more could be cleared away - -if $(NT) -{ - CP ?= copy ; - RM ?= del /f/q ; - SLASH ?= \\ ; - SPLITPATH ?= ";" ; # dwa -- added missing SPLITPATH - SUFLIB ?= .lib ; - SUFOBJ ?= .obj ; - SUFEXE ?= .exe ; - SUFDLL ?= .dll .lib ; - gLINK_VARIABLE(.dll) = ; # dlls are NOT linked to directly - gLINK_VARIABLE(.lib) = NEEDLIBS ; # instead, users link to import libs - PREDLL ?= "" ; - NOARSCAN ?= true ; - SHELL_EXPORT ?= ; - SHELL_SET ?= "set " ; - - # dwa 6/4/01 - removed compiler determination for boost - # added some yacc/lex stuff, assuming cygwin for now. - LEX ?= flex ; - YACC ?= bison -y ; - YACCFILES ?= y.tab ; - YACC_OUTPUT ?= --output= ; - LEX_OUTPUT ?= -o ; - - LN ?= $(CP) ; - NULL_OUT ?= >NUL: ; -} -else if $(OS2) -{ - WATCOM ?= $(watcom) ; - - if ! $(WATCOM) - { - EXIT On OS2, set WATCOM to the root of the Watcom directory. ; - } - - AR ?= wlib ; - BINDIR ?= \\os2\\apps ; - CP ?= copy ; - DOT ?= . ; - DOTDOT ?= .. ; - MV ?= move ; - NOARSCAN ?= true ; - OPTIM ?= ; - RM ?= del /f ; - SLASH ?= \\ ; - SPLITPATH ?= ";" ; # dwa -- added missing SPLITPATH - STDHDRS ?= $(WATCOM)\\h ; - SUFEXE ?= .exe ; - SUFLIB ?= .lib ; - SUFOBJ ?= .obj ; - UNDEFFLAG ?= "/u _" ; - -} -else if $(VMS) -{ - CHMOD ?= set file/prot= ; - CP ?= copy/replace ; - CRELIB ?= true ; - DOT ?= [] ; - DOTDOT ?= [-] ; - EXEMODE ?= (w:e) ; - FILEMODE ?= (w:r) ; - HDRS ?= ; - MKDIR ?= create/dir ; - MV ?= rename ; - OPTIM ?= "" ; - RM ?= delete ; - RUNVMS ?= mcr ; - SHELLMODE ?= (w:er) ; - SLASH ?= . ; - STDHDRS ?= decc$library_include ; - SUFEXE ?= .exe ; - SUFLIB ?= .olb ; - SUFOBJ ?= .obj ; - - switch $(OS) - { - case VMS : LINKLIBS ?= sys$library:vaxcrtl.olb/lib ; - } -} -else if $(MAC) -{ - local OPT ; - - CW ?= "{CW}" ; - - MACHDRS ?= - "$(UMACHDRS):Universal:Interfaces:CIncludes" - "$(CW):MSL:MSL_C:MSL_Common:Include" - "$(CW):MSL:MSL_C:MSL_MacOS:Include" ; - - MACLIBS ?= - "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Interfacelib" - "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Mathlib" ; - - MPWLIBS ?= - "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW.Lib" ; - - MPWNLLIBS ?= - "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW(NL).Lib" ; - - SIOUXHDRS ?= ; - - SIOUXLIBS ?= - "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL SIOUX.PPC.Lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC.Lib" ; - - CP ?= duplicate -y ; - DOT ?= ":" ; - DOTDOT ?= "::" ; - HDRS ?= $(MACHDRS) $(MPWHDRS) ; - MKDIR ?= newfolder ; - MV ?= rename -y ; - NOARSCAN ?= true ; - OPTIM ?= ; - RM ?= delete -y ; - SLASH ?= ":" ; - STDHDRS ?= ; - SUFLIB ?= .lib ; - SUFOBJ ?= .o ; -} -else if $(OS) = BEOS && $(METROWERKS) -{ - AR ?= mwld -xml -o ; - BINDIR ?= /boot/apps ; - FORTRAN ?= "" ; - LIBDIR ?= /boot/develop/libraries ; - MANDIR ?= /boot/documentation/"Shell Tools"/HTML ; - NOARSCAN ?= true ; - STDHDRS ?= /boot/develop/headers/posix ; -} -else if $(OS) = BEOS -{ - BINDIR ?= /boot/apps ; - FORTRAN ?= "" ; - LIBDIR ?= /boot/develop/libraries ; - NOARSCAN ?= true ; - STDHDRS ?= /boot/develop/headers/posix ; -} -else if $(UNIX) -{ - switch $(OS) - { - case AIX : - IMPLIB_FLAGS ?= -bI: ; - SUFDLL ?= .so ; - gLINK_VARIABLE(.so) = NEEDLIBS ; # shared libs should be added to the list of libs needed - gLINK_VARIABLE(.imp) = NEEDIMPS ; # import libs are handled separately. - gSHELL_LIBPATH = LIBPATH ; - - case AMIGA : - YACC ?= bison -y ; - - case CYGWIN : - LEX ?= flex ; - RANLIB ?= "" ; - SUFEXE ?= .exe ; - YACC ?= bison -y ; - MKDIR ?= mkdir -p ; - SUFDLL ?= .dll ; - - case DGUX : - RANLIB ?= "" ; - RELOCATE ?= true ; - - case HPUX : - RANLIB ?= "" ; - - case INTERIX : - RANLIB ?= "" ; - - case IRIX : - RANLIB ?= "" ; - - case KFREEBSD : - CLONE ?= cp -fpd ; - - case LINUX : - CLONE ?= cp -fpd ; - - case MPEIX : - HDRS += /usr/include ; - RANLIB ?= "" ; - NOARSCAN ?= true ; - NOARUPDATE ?= true ; - - case MVS : - RANLIB ?= "" ; - - case NEXT : - AR ?= libtool -o ; - RANLIB ?= "" ; - - case MACOSX : - MANDIR ?= /usr/local/share/man ; - SUFDLL ?= .dylib ; - gSHELL_LIBPATH ?= DYLD_LIBRARY_PATH ; - NOARSCAN ?= true ; - - case NCR : - RANLIB ?= "" ; - - case PTX : - RANLIB ?= "" ; - - case QNX : - AR ?= wlib ; - NOARSCAN ?= true ; - RANLIB ?= "" ; - - case SCO : - RANLIB ?= "" ; - RELOCATE ?= true ; - - case SINIX : - RANLIB ?= "" ; - - case SOLARIS : - RANLIB ?= "" ; - AR ?= "/usr/ccs/bin/ar ru" ; - STDHDRS ?= "." ; - - case UNICOS : - NOARSCAN ?= true ; - OPTIM ?= -O0 ; - - case UNIXWARE : - RANLIB ?= "" ; - RELOCATE ?= true ; - - case OSF : - gLINK_VARIABLE(.so) = NEEDLIBS ; # shared objects should be added to the list of libs needed - } - - # UNIX defaults - CHMOD ?= chmod ; - LEX ?= lex ; - OPTIM ?= -O ; - RANLIB ?= ranlib ; - YACC ?= yacc ; - YACCFILES ?= y.tab ; - YACCFLAGS ?= -d ; - SHELL_EXPORT ?= "export " ; - SHELL_SET ?= "" ; - gSHELL_LIBPATH ?= LD_LIBRARY_PATH ; - BINDIR ?= /usr/local/bin ; - LIBDIR ?= /usr/local/lib ; - MANDIR ?= /usr/local/man ; - STDHDRS ?= /usr/include ; -} - -# -# General defaults; a lot like UNIX -# - -AR ?= ar ru ; -AS ?= as ; -ASFLAGS ?= ; -AWK ?= awk ; -BINDIR ?= ; -CLONE ?= $(CP) ; -CLONE ?= cp -fp ; -CP ?= cp -f ; -CRELIB ?= ; -DOT ?= . ; -DOTDOT ?= .. ; -EXEMODE ?= 711 ; -DLLMODE ?= 755 ; -FILEMODE ?= 644 ; -FORTRAN ?= f77 ; -FORTRANFLAGS ?= ; -HDRS ?= ; -JAMFILE ?= Jamfile ; -JAMRULES ?= Jamrules ; -LEX ?= ; -LIBDIR ?= ; -LN ?= ln ; -MANDIR ?= ; -MKDIR ?= mkdir ; -MV ?= mv -f ; -OPTIM ?= ; -RCP ?= rcp ; -RM ?= rm -f ; -RSH ?= rsh ; -SED ?= sed ; -SHELLHEADER ?= "#!/bin/sh" ; -SHELLMODE ?= 755 ; -SHELL_EXPORT ?= ; -SHELL_SET ?= "" ; -SLASH ?= / ; -SPLITPATH ?= ":" ; # dwa -- added missing SPLITPATH -STDHDRS ?= ; -SUFEXE ?= "" ; -SUFDLL ?= .so ; -SUFLIB ?= .a ; -SUFOBJ ?= .o ; -PREDLL ?= lib ; -PRELIB ?= lib ; -UNDEFFLAG ?= "-u _" ; -YACC ?= ; -YACCFILES ?= ; -YACCFLAGS ?= ; -BIN_DIRECTORY ?= bin ; - -#~ HDRPATTERN = - #~ "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; -HDRPATTERN = - "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; - -#" My Jam mode gets its syntax highlighting confused without this comment - -OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ; - -# -# Rule to automate patching of singleton variables from the user so that -# they are correctly interpreted as a single entry instead of as a list if -# they happen to contain spaces. -# -# This also remembers the first(global) value so that it can be reset -# when cleared, but used again. -# -rule set-as-singleton ( variables + ) -{ - for local variable in $(variables) - { - $(variable) = $($(variable):J=" ") ; - #~ if ! $(gSINGLETON_SET($(variable))) - #~ { - #~ gSINGLETON($(variable)) = $($(variable)) ; - #~ gSINGLETON_SET($(variable)) = true ; - #~ } - #~ $(variable) ?= $(gSINGLETON($(variable))) ; - } -} - -# -# "Fix" the known possibly directory variables. -# -set-as-singleton - BINDIR - CW - JAMFILE - JAMRULES - JAMSHELL - LIBDIR - MANDIR - WATCOM - ; - -# -# Base dependencies - first for "bootstrap" kinds of rules -# - -# dwa 6/17/01 - added test -DEPENDS all : shell files lib dll exe obj ; -DEPENDS all shell files lib dll exe obj test : first ; -NOTFILE all first shell files lib dll exe obj dirs clean uninstall test nothing ; -ALWAYS clean uninstall ; - -# -# Prevent external variables from interfeering with some esnetial intenal -# variables. -# -TOP = ; - -# -# Rules -# - -# dwa 6/4/01 - added for boost -# type-DEPENDS type : targets... -# -# Use this to create a dependency between a fake type-target and other targets. Will prevent -# targets in dependee subprojects from being added to the type-target's dependencies. -rule type-DEPENDS # type-target : targets... -{ - if ! $(gSUPPRESS_FAKE_TARGETS) && ! $(gIN_LIB_INCLUDE) - { - DEPENDS $(<) : $(>) ; - } -} - -# dwa 6/4/01 - added for boost -# Archive file-target : sources -# -# Used to dispatch through Archive-action, which should be redefined in toolset -# description files. -rule Archive -{ - Archive-action $(<) : $(>) ; -} - -rule As -{ - DEPENDS $(<) : $(>) ; - ASFLAGS on $(<) += $(ASFLAGS) $(SUBDIRASFLAGS) ; -} - -rule Bulk -{ - local i ; - - for i in $(>) - { - File $(i:D=$(<)) : $(i) ; - } -} - -# dwa 6/4/01 - modified for boost -# factored out stuff from the builtin Cc and C++ rules -rule Cc-platform-specifics -{ - # If the compiler's -o flag doesn't work, relocate the .o - - if $(RELOCATE) - { - CcMv $(<) : $(>) ; - } - - local _h = $(SEARCH_SOURCE) $(HDRS) ; - - if $(VMS) && $(_h) - { - SLASHINC on $(<) = "/inc=(" $(_h[1]) ,$(_h[2-]) ")" ; - } - else if $(MAC) && $(_h) - { - local _i _j ; - _j = $(_h[1]) ; - for _i in $(_h[2-]) - { - _j = $(_j),$(_i) ; - } - MACINC on $(<) = \"$(_j)\" ; - } -} - -# dwa 6/4/01 - added for boost -# always-c++ filename... -# -# declares that the given files should be compiled as C++, regardless of their -# filename extension. -rule always-c++ -{ - gALWAYS_C++ += [ FGristFiles $(<) ] ; -} - -# dwa 6/4/01 - modified for boost -rule Cc -{ - DEPENDS $(<) : $(>) ; - - Cc-platform-specifics $(<) : $(>) ; - - if $(>) in $(gALWAYS_C++) - { - C++-action $(<) : $(>) ; - } - else - { - Cc-action $(<) : $(>) ; - } -} - -# dwa 6/4/01 - modified for boost -rule C++ -{ - DEPENDS $(<) : $(>) ; - - Cc-platform-specifics $(<) : $(>) ; - - C++-action $(<) : $(>) ; -} - -rule Chmod -{ - if $(CHMOD) { Chmod1 $(<) ; } -} - -# dwa 6/4/01 - added for boost -# conditional : : -# returns if , otherwise -rule conditional -{ - if $(1) { return $(2) ; } else { return $(3) ; } -} - -# dwa 6/4/01 - modified for boost -rule File -{ - type-DEPENDS files : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - MODE on $(<) = $(FILEMODE) ; - Chmod $(<) ; -} - -rule FileClone -{ - type-DEPENDS files : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; -} - -rule Fortran -{ - DEPENDS $(<) : $(>) ; -} - -rule GenFile -{ - local _t = [ FGristSourceFiles $(<) ] ; - local _s = [ FAppendSuffix $(>[1]) : $(SUFEXE) ] ; - Depends $(_t) : $(_s) $(>[2-]) ; - GenFile1 $(_t) : $(_s) $(>[2-]) ; - Clean clean : $(_t) ; -} - -rule GenFile1 -{ - MakeLocate $(<) : $(LOCATE_SOURCE) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; -} - -# dwa 6/4/01 - modified for boost -rule HardLink -{ - type-DEPENDS files : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; -} - -rule HdrRule -{ - # HdrRule source : headers ; - - # N.B. This rule is called during binding, potentially after - # the fate of many targets has been determined, and must be - # used with caution: don't add dependencies to unrelated - # targets, and don't set variables on $(<). - - # Tell Jam that anything depending on $(<) also depends on $(>), - # set SEARCH so Jam can find the headers, but then say we don't - # care if we can't actually find the headers (they may have been - # within ifdefs), - - local angle-includes = [ MATCH "[<]([^>]+)[>]" : $(>) ] ; - local quoted-includes = [ MATCH "[\"]([^\"]+)[\"]" : $(>) ] ; - - local s ; - - if $(HDRGRIST) - { - angle-includes = $(angle-includes:G=$(HDRGRIST)) ; - quoted-includes = $(quoted-includes:G=$(HDRGRIST)) ; - } - - local s = $(angle-includes) $(quoted-includes) ; - - INCLUDES $(<) : $(s) ; - NOCARE $(s) ; - - SEARCH on $(angle-includes) = $(HDRSEARCH) ; - SEARCH on $(quoted-includes) = $(gBINDING($(<)):D) $(HDRSEARCH) ; - - BINDRULE on $(s) = remember-binding ; - - # Propagate on $(<) to $(>) - - HDRSEARCH on $(s) = $(HDRSEARCH) ; - HDRSCAN on $(s) = $(HDRSCAN) ; - HDRRULE on $(s) = $(HDRRULE) ; - HDRGRIST on $(s) = $(HDRGRIST) ; -} -rule HdrSearchAndLocate ( header : search * ) -{ - if ! $(gBINDING($(header))) - { - local header-glob = [ GLOB "$(search:G=)" : $(header:G=) ] ; - local header-locate = ; - for local bound-path in $(header-glob) - { - if ! $(header-locate) - { - if ! [ GLOB "$(bound-path)" : * ] - { - header-locate = $(bound-path) ; - } - } - } - if $(header-locate) - { - LOCATE on $(header) = $(header-locate:D) ; - gBINDING($(header)) = $(header-locate) ; - } - else - { - LOCATE on $(header) = $(DOT) ; - gBINDING($(header)) = $(header:G=:R=$(DOT)) ; - } - } -} - -# dwa 6/4/01 - modified for boost -rule InstallInto -{ - local i t ; - - t = $(>:G=installed) ; - - type-DEPENDS install : $(t) ; - DEPENDS $(t) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - MakeLocate $(t) : $(<) ; - - # Arrange for jam uninstall - - Clean uninstall : $(t) ; - - for i in $(>) - { - Install $(i:G=installed) : $(i) ; - } - - Chmod $(t) ; - - if $(UNIX) - { - if $(OWNER) { Chown $(t) ; OWNER on $(t) = $(OWNER) ; } - if $(GROUP) { Chgrp $(t) ; GROUP on $(t) = $(GROUP) ; } - } -} - -rule InstallBin -{ - local _t = [ FAppendSuffix $(>) : $(SUFEXE) ] ; - - InstallInto $(<) : $(_t) ; - MODE on $(_t:G=installed) = $(EXEMODE) ; -} - -rule InstallFile -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=installed) = $(FILEMODE) ; -} - -rule InstallLib -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=installed) = $(FILEMODE) ; -} - -rule InstallMan -{ - # Really this just strips the . from the suffix - - local i s d ; - - for i in $(>) - { - switch $(i:S) - { - case .1 : s = 1 ; case .2 : s = 2 ; case .3 : s = 3 ; - case .4 : s = 4 ; case .5 : s = 5 ; case .6 : s = 6 ; - case .7 : s = 7 ; case .8 : s = 8 ; case .l : s = l ; - case .n : s = n ; case .man : s = 1 ; - } - - d = man$(s) ; - - InstallInto $(d:R=$(<)) : $(i) ; - } - - MODE on $(>:G=installed) = $(FILEMODE) ; -} - -rule InstallShell -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=installed) = $(SHELLMODE) ; -} - -# dwa 6/4/01 - modified for boost -rule Lex # file.c : file.l -{ - # If we don't have a way of specifying the lex output file, we'll have to move it - # We'd rather not do this if possible because: a. lex generates #line - # directives for the output file which would refer to the wrong place and - # b. the Jam invocation directory could be read-only - if ! $(LEX_OUTPUT) - { - LexMv $(<) : $(>) ; - } - - DEPENDS $(<) : $(>) ; - MakeLocate $(<) : $(LOCATE_SOURCE) ; - SEARCH on $(<) = $(LOCATE_SOURCE) ; - Clean clean : $(<) ; -} - -# dwa 6/4/01 - modified for boost -rule Library -{ - LibraryFromObjects $(<) : [ Objects $(>) ] ; -} - -# dwa 6/4/01 - modified for boost -rule LibraryFromObjects -{ - local _i _l ; - - _l = $(<:S=$(SUFLIB)) ; - - # library depends on its member objects - - if $(KEEPOBJS) - { - type-DEPENDS obj : $(>) ; - } - else - { - type-DEPENDS lib : $(_l) ; - } - - # Set LOCATE for the library and its contents. The bound - # value shows up as $(NEEDLIBS) on the Link actions. - # For compatibility, we only do this if the library doesn't - # already have a path. - - if ! $(_l:D) - { - MakeLocate $(_l) $(_l)($(>:BS)) : $(LOCATE_TARGET) ; - } - - if $(NOARSCAN) - { - # If we can't scan the library to timestamp its contents, - # we have to just make the library depend directly on the - # on-disk object files. - - DEPENDS $(_l) : $(>) ; - } - else - { - # If we can scan the library, we make the library depend - # on its members and each member depend on the on-disk - # object file. - - DEPENDS $(_l) : $(_l)($(>:BS)) ; - - for _i in $(>) - { - DEPENDS $(_l)($(_i:BS)) : $(_i) ; - } - } - - Clean clean : $(_l) ; - - if $(CRELIB) { CreLib $(_l) : $(>[1]) ; } - - Archive $(_l) : $(>) ; - - if $(RANLIB) { Ranlib $(_l) ; } - - # If we can't scan the library, we have to leave the .o's around. - - if ! ( $(NOARSCAN) || $(KEEPOBJS) ) { RmTemps $(_l) : $(>) ; } -} - -# dwa 6/4/01 - modified for boost to dispatch through Link-action and to pass -# the target-type through. *** NOW UNUSED BY BOOST *** -# -# Link executable-target : object-target... -rule Link -{ - MODE on $(<) = $(EXEMODE) ; - Link-action $(<) : $(>) : $(3) ; - Chmod $(<) ; -} - -rule LinkLibraries -{ - # make library dependencies of target - # set NEEDLIBS variable used by 'actions Main' - - local _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ; - - DEPENDS $(_t) : $(>:S=$(SUFLIB)) ; - NEEDLIBS on $(_t) += $(>:S=$(SUFLIB)) ; -} - -# dwa 6/4/01 - modified for boost -rule Main -{ - MainFromObjects $(<) : [ Objects $(>) ] ; -} - -# dwa 6/4/01 - modified for boost -rule MainFromObjects -{ - local _s _t ; - - # Add grist to file names - # Add suffix to exe - - _s = $(>) ; - _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ; - - if $(_t) != $(<) - { - DEPENDS $(<) : $(_t) ; - NOTFILE $(<) ; - } - - # make compiled sources a dependency of target - - type-DEPENDS exe : $(_t) ; - DEPENDS $(_t) : $(_s) ; - MakeLocate $(_t) : $(LOCATE_TARGET) ; - - Clean clean : $(_t) ; - - Link $(_t) : $(_s) ; -} - -# dwa 6/4/01 - modified for boost -rule MakeLocate -{ - if $(>) - { - LOCATE on $(<) = $(>) ; - - # provide a way to get back the location from a built target name. - gLOCATE($(<)) = $(>) ; - - # We add directory-grist here so that implicitly-created directory - # target names don't collide with user-specified targets. - Depends $(<) : [ MkDir $(>[1]:G=directory-grist) ] ; - } -} - -# now returns the created directory target -- dwa -rule MkDir -{ - # If dir exists, don't update it - # Do this even for $(DOT). - - local dir = $(<) ; - if $(NT) - { - # make sure slashes all go the right way - dir = [ split-path $(dir) ] ; - dir = $(dir:J=$(SLASH)) ; - } - - local result = $(dir) ; - - while $(dir) && ( $(dir) != $(DOT) ) && ! $($(dir)-mkdir) - { - # Cheesy gate to prevent multiple invocations on same dir - # MkDir1 has the actions - # Arrange for jam dirs - - $(dir)-mkdir = true ; - MkDir1 $(dir) ; - Depends dirs : $(dir) ; - NOUPDATE $(dir) ; - - - # Recursively make parent directories. - # $(dir:P) = $(dir)'s parent, & we recurse until root - - local s = $(dir:P) ; - - if $(NT) - { - switch $(s) - { - case *: : s = ; - case *:\\ : s = ; - } - } - - if $(s) && $(s) != $(dir) - { - Depends $(dir) : $(s) ; - dir = $(s) ; - } - else - { - dir = ; # stop iterating - if $(s) { NOTFILE $(s) ; } - } - } - return $(result) ; -} - -# dwa 6/4/01 - modified for boost -rule Object -{ - local h ; - - type-DEPENDS obj : $(<) ; - set-target-variables $(<) ; - - # Make it possible to compile a given source file by giving its - # object file name as a target. - type-DEPENDS $(<:G=) : $(<) ; - - # locate object and search for source, if wanted - - Clean clean : $(<) ; - - MakeLocate $(<) : $(LOCATE_TARGET) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - - # Save HDRS for -I$(HDRS) on compile. - # We shouldn't need -I$(SEARCH_SOURCE) as cc can find headers - # in the .c file's directory, but generated .c files (from - # yacc, lex, etc) are located in $(LOCATE_TARGET), possibly - # different from $(SEARCH_SOURCE). - - # Use unique to clean up confusing duplicates a bit - HDRS on $(<) = [ unique $(LOCATE_SOURCE) $(HDRS) ] ; - - # Set STDHDRS on the object so that multi-compiler builds will search for - # headers in the right places. - STDHDRS on $(<) = $(STDHDRS) ; - SYSHDRS on $(<) = $(SYSHDRS) ; - - # handle #includes for source: Jam scans for headers with - # the regexp pattern $(HDRSCAN) and then invokes $(HDRRULE) - # with the scanned file as the target and the found headers - # as the sources. HDRSEARCH is the value of SEARCH used for - # the found header files. Finally, if jam must deal with - # header files of the same name in different directories, - # they can be distinguished with HDRGRIST. - - # $(h) is where cc first looks for #include "foo.h" files. - # If the source file is in a distant directory, look there. - # Else, look in "" (the current directory). - - if $(SEARCH_SOURCE) - { - h = $(SEARCH_SOURCE)$(SLASH)$(>:D) ; - } - else - { - h = $(>:D) ; - } - - HDRRULE on $(>) = HdrRule ; - HDRSCAN on $(>) = $(HDRPATTERN) ; - HDRSEARCH on $(>) = $(HDRS) $(h) $(STDHDRS) $(SYSHDRS) ; - HDRGRIST on $(>) = $(HDRGRIST) ; - - # if source is not .c, generate .c with specific rule - - # make sure we don't generate the same object twice. - if ! $(gGENERATED_TARGET($(<))) - { - switch $(>:S) - { - case .asm : As $(<) : $(>) ; - case .c : Cc $(<) : $(>) ; - case .C : C++ $(<) : $(>) ; - case .cc : C++ $(<) : $(>) ; - case .cpp : C++ $(<) : $(>) ; - case .cxx : C++ $(<) : $(>) ; - case .f : Fortran $(<) : $(>) ; - case .s : As $(<) : $(>) ; - case * : UserObject $(<) : $(>) ; - } - gGENERATED_TARGET($(<)) = true ; - } -} - -# dwa 6/4/01 - added for boost -# Return the corresponding object file target names given a list of source file -# target names. -rule object-name # sources... -{ - return $(<:D=:S=$(SUFOBJ):G=$(TARGET_GRIST)) ; -} - -# dwa 6/4/01 - added for boost -# Build a generated source file from input-target, and build whatever that file generates. -# Return a list of all object target names ultimately generated by recursively -# building the products of input-target. -rule gen-source # source => object-file-names -{ - local suffix = .c ; - if $(<:S) in .lpp .ypp - { - suffix = .cpp ; - } - - local immediate-target = $(<:D=:S=$(suffix):G=$(SOURCE_GRIST)) ; - # make sure we don't regenerate sources twice. - if ! $(gGENERATED_TARGET($(immediate-target))) - { - switch $(<:S) - { - case .l* : Lex $(immediate-target) : $(<) ; SEARCH on $(<) = $(SEARCH_SOURCE) ; - case .y* : Yacc $(immediate-target) : $(<) ; SEARCH on $(<) = $(SEARCH_SOURCE) ; - } - gGENERATED_TARGET($(immediate-target)) = true ; - } - return [ Objects $(immediate-target) ] ; -} - -# dwa 6/4/01 - added for boost -# A list of all file extensions which generate source files when built. -SOURCE_GENERATING_EXTENSIONS ?= .lpp .ypp .l .y ; - -# dwa 6/4/01 - modified for boost -# Build all object files generated by building $(<), and return a list of the -# names of those object file targets. -rule Objects -{ - local _i _n _r ; - - - for _i in $(<) - { - if $(_i:S) in $(SOURCE_GENERATING_EXTENSIONS) - { - _n = [ gen-source $(_i) ] ; - } - else - { - _n = [ object-name $(_i) ] ; - Object $(_n) : $(_i) ; - } - _r += $(_n) ; - } - - return $(_r) ; -} - -rule RmTemps -{ - TEMPORARY $(>) ; -} - -rule Setuid -{ - MODE on [ FAppendSuffix $(<) : $(SUFEXE) ] = 4711 ; -} - -# dwa 6/4/01 - modified for boost -rule Shell -{ - type-DEPENDS shell : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - MODE on $(<) = $(SHELLMODE) ; - Clean clean : $(<) ; - Chmod $(<) ; -} - -# dwa 6/7/01 - added for boost -# subproject path -# -# Invokes SubDir with a path description -rule subproject -{ - SubDir TOP [ split-path $(<) ] ; -} - -# dwa 6/18/01 - added for boost -# project-root -# -# Declares this directory to be the project root. -rule project-root ( ) -{ - local project-location ; - if $(gTOP) - { - project-location = [ root-paths $($(gTOP)) : [ PWD ] ] ; - } - else - { - project-location = [ PWD ] ; - } - local name ; - name = $(PROJECT($(project-location))) ; - name ?= $(project-location:B) ; - PROJECT = $(name) ; - gPROJECT($(name)) = $(project-location) ; - SubDir TOP ; -} - -# grafik. -# -# Declare either your own project, or an external project. -# -rule project ( name : location ? ) -{ - if ! $(location) - { - gPROJECT($(name)) = $(gPROJECT($(PROJECT))) ; - PROJECT($(gPROJECT($(name)))) = $(name) ; - PROJECT = $(name) ; - } - else - { - gPROJECT($(name)) = [ root-paths $(location) : [ root-paths $($(gTOP)) : [ PWD ] ] ] ; - # - # Root the path globals to fix a bug which prevented to use them from an external - # project. The fix is as as uninvasive as possible, as it will only trigger when - # an external project is declared. So it will not interfere with the build of the - # boost library. I took this route, as at the time of this fix, the bbv1 is expected - # to be retired soon. - # N.B.: The path-globals rule is expected to be invoked from Jamrules files only. - local val ; - for val in $(gPATH_GLOBALS) { - gPATH_GLOBAL_VALUE($(val)) = [ root-paths $(gPATH_GLOBAL_VALUE($(val))) : - [ root-paths $($(gTOP)) : [ PWD ] ] - ] ; - } - # - local [ protect-subproject ] ; - enter-subproject @$(name) ; - } -} - -# grafik. -# -# Returns the set of vars to localize to prevent changes from -# affecting the current project. Also remembers the current values -# to use by enter-subproject to set the defaults for the new vars. -# -rule protect-subproject ( ) -{ - .TOP = $(TOP) ; - .TOP_TOKENS = $(TOP_TOKENS) ; - .gTOP = $(gTOP) ; - .PROJECT = $(PROJECT) ; - return TOP TOP_TOKENS gTOP PROJECT [ protect-subdir ] ; -} - -# grafik. -# -# Sets up the environment as if the context is another project in -# preparation to include the external projects targets. This also -# works for refering to the current project. -# -rule enter-subproject ( project-path ) -{ - TOP = $(.TOP) ; - TOP_TOKENS = $(.TOP_TOKENS) ; - gTOP = $(.gTOP) ; - PROJECT = $(.PROJECT) ; - - local project-name = [ MATCH "^@([^/\\]+)" : $(project-path) ] ; - project-name ?= $(PROJECT) ; - project-name ?= "" ; - local project-subdir = [ MATCH "^@[^/\\]+[/\\](.*)" : $(project-path) ] ; - local project-top ; - - if $(project-name) - { - project-top = [ split-path $(gPROJECT($(project-name))) ] ; - if $(project-subdir) - { - project-top += - [ split-path [ relative-path $(project-subdir) ] ] - [ split-path [ FSubDir [ split-path [ relative-path $(project-subdir) ] ] ] ] ; - } - TOP = [ join-path $(project-top) ] ; - TOP_TOKENS = $(project-top) ; - gTOP = TOP ; - PROJECT = $(project-name) ; - } - project-subdir ?= . ; - - subproject $(project-subdir) ; - - return $(project-name) $(project-subdir) ; -} - -# dwa 6/7/01 - added for boost -# subinclude path... -# -# Invokes SubInclude for each path -rule subinclude -{ - local d ; - for d in $(<) - { - SubInclude TOP [ split-path $(d) ] ; - } -} - -# dwa 10/6/01 - added for boost -# -# path-global variable-name : path... ; -# -# if $(variable-name) is unset, sets variable-name to path... -# variable-name will be adjusted on a per-subproject basis to refer to the same path. -rule path-global -{ - $(<) ?= $(>) ; - gPATH_GLOBAL_VALUE($(<)) = $($(<)) ; - - if ! ( $(<) in $(gPATH_GLOBALS) ) - { - gPATH_GLOBALS += $(<) ; - } -} - -# dwa 6/4/01 - modified for boost -rule SubDir -{ - local _r ; - - # - # SubDir TOP d1 [ ... ] - # - # This introduces a Jamfile that is part of a project tree - # rooted at $(TOP). It (only once) includes the project-specific - # rules file $(TOP)/Jamrules and then sets search & locate stuff. - # - # If the variable $(TOPRULES) is set (where TOP is the first arg - # to SubDir), that file is included instead of $(TOP)/Jamrules. - # - # d1 ... are the directory elements that lead to this directory - # from $(TOP). We construct the system dependent path from these - # directory elements in order to set search&locate stuff. - # - - if ! $($(<[1])) - { - if ! $(<[1]) - { - EXIT SubDir syntax error ; - } - - $(<[1]) = [ FSubDir $(<[2-]) ] ; - $(<[1])_TOKENS = [ split-path $($(<[1])) ] ; - gTOP = $(<[1]) ; # not sure why someone would want to use anything - # other than TOP, but just in case... - } - - # Get path to current directory from root using SubDir. - # Save dir tokens for other potential uses. - local .SUBDIR_TOKENS = $(<[2-]) ; - - # This allows us to determine whether we're in the directory where jam was - # invoked from so that we can make locally named targets - gINVOCATION_SUBDIR_TOKENS ?= $(.SUBDIR_TOKENS) ; - gINVOCATION_SUBDIR_TOKENS ?= $(DOT) ; - - # - # If $(TOP)/Jamrules hasn't been included, do so. - # - - local top = [ root-paths $($(gTOP)) : [ PWD ] ] ; - if ! $(gINCLUDED($(JAMRULES:R=$(top)))) - { - # Gated entry. - - gINCLUDED($(JAMRULES:R=$(top))) = TRUE ; - - # Include it. - - project-root ; - include $(JAMRULES:R=$(top)) ; - } - - # Get path to current directory from root using SubDir. - # Save dir tokens for other potential uses. - SUBDIR_TOKENS = $(<[2-]) ; - - # SUBDIR is the path from the invocation directory to the subproject - # directory. - SUBDIR = [ tokens-to-simple-path $($(gTOP)_TOKENS) $(SUBDIR_TOKENS) ] ; - - SEARCH_SOURCE = $(SUBDIR) ; - - # This will strip off any leading dot on SUBDIR_TOKENS - local nodot_subdir = [ simplify-path-tokens $(SUBDIR_TOKENS) ] ; - - if $(ALL_LOCATE_TARGET) && ! $(first_ALL_LOCATE_TARGET) - { - normalized_ALL_LOCATE_TARGET = [ join-path $($(gTOP)) $(ALL_LOCATE_TARGET) ] ; - } - else - { - normalized_ALL_LOCATE_TARGET ?= [ join-path $($(gTOP)) $(ALL_LOCATE_TARGET) ] ; - } - first_ALL_LOCATE_TARGET ?= $(ALL_LOCATE_TARGET) ; - LOCATE_SOURCE = [ FDirName $(normalized_ALL_LOCATE_TARGET) $(BIN_DIRECTORY) $(PROJECT) $(nodot_subdir) ] ; - LOCATE_TARGET = $(LOCATE_SOURCE) ; - HCACHEFILE = [ FDirName $(normalized_ALL_LOCATE_TARGET) $(BIN_DIRECTORY) .jamdeps ] ; - - SOURCE_GRIST = [ FGrist @$(PROJECT) $(SUBDIR_TOKENS) ] ; - - # Reset per-directory ccflags, hdrs - - SUBDIRCCFLAGS = ; - SUBDIRC++FLAGS = ; - - # This variable holds the path from the directory of Jam's invocation to the - # directory of the current subproject. - RELATIVE_SUBDIR_TOKENS = [ simplify-path-tokens $($(gTOP)_TOKENS) $(SUBDIR_TOKENS) : $(DOT) ] ; - RELATIVE_SUBDIR = [ join-path $(RELATIVE_SUBDIR_TOKENS) ] ; - - adjust-path-globals ; -} - -rule in-invocation-subdir -{ - local subdir-tokens = $(SUBDIR_TOKENS) ; - subdir-tokens ?= $(DOT) ; - if $(subdir-tokens) = $(gINVOCATION_SUBDIR_TOKENS) - { - return true ; - } -} - -# These are the global variables that get set up by SubDir. If you need to -# invoke SubDir temporarily and then restore them, declare -# local $(gSUBDIR_GLOBALS) ; -gSUBDIR_GLOBALS = SUBDIR SUBDIR_TOKENS SEARCH_SOURCE LOCATE_SOURCE LOCATE_TARGET - SOURCE_GRIST RELATIVE_SUBDIR RELATIVE_SUBDIR_TOKENS ; - - -rule protect-subdir -{ - return $(gSUBDIR_GLOBALS) $(gPATH_GLOBALS) ; -} - -# prepends root to any unrooted elements of paths, and simplifies -rule root-paths ( paths * : root ) -{ - local path result ; - for path in $(paths) - { - local rooted = $(path:R=$(root)) ; - path = [ tokens-to-simple-path [ split-path $(rooted:G=) ] ] ; - path = $(path:G=$(rooted:G)) ; - result += $(path) ; - } - return $(result) ; -} - -# Adjust all path globals so that they are relative to the current subproject. -rule adjust-path-globals -{ - # compute path tokens from current subproject to root - local tokens-to-root = [ split-path [ FSubDir $(SUBDIR_TOKENS) ] ] ; - - # compute path tokens from current subproject to invocation - # directory. $(DOT) is added just in case we're building from the project - # root - local tokens-to-invocation - = $(tokens-to-root) $(gINVOCATION_SUBDIR_TOKENS) ; - - local variable ; - for variable in $(gPATH_GLOBALS) - { - local paths = $(gPATH_GLOBAL_VALUE($(variable))) ; - $(variable) = ; - local path ; - for path in $(paths) - { - # is path already rooted? - if $(path:R=x) = $(path) - { - $(variable) += $(path) ; - } - else - { - local tokens = $(tokens-to-invocation) [ split-path $(path) ] ; - $(variable) += [ tokens-to-simple-path $(tokens) ] ; - } - } - } -} - -# dwa 6/4/01 - added for boost -# strip-grist value -# -# strip all leading gristed elements from value and return the result. -rule strip-grist -{ - local x = $(<:G=) ; - if ! $(x:G) - { - return $(x) ; - } - else - { - return [ strip-grist $(x) ] ; - } -} - -# dwa 6/4/01 - added for boost -# Breaks $(<) into path components -# This could certainly be improved now that we have David Turner's regular expression features. -# -# split-path bar/baz/mumble => bar baz mumble -rule split-path -{ - local result = $(gSPLIT-PATH.$(<)) ; - - if ! $(result) - { - local parent = $(<:P) ; - if $(NT) - { - switch $(<:G=) - { - # It turns out that to match a backslash, you need a /quadruple/ slash - # in the case clause! - case *\\\\*:* : # continue splitting - case *:\\\\*\\\\* : # continue splitting - case *:/*\\\\* : # continue splitting - case *:\\\\*/* : # continue splitting - case *:/*/* : # continue splitting - case *:/* : result = $(<) ; - case *:\\\\* : result = $(<) ; - case *: : result = $(<) ; - } - } - - if ( ! $(<:B) ) && ( $(<) != $(DOT) ) # handle the case where $(<) is all grist. - { - result ?= $(<:G) ; - } - else if ( ! $(parent:G=) ) - { - result ?= $(<) ; - } - else - { - local p = [ split-path $(parent) ] ; - local b = [ strip-grist $(<) ] ; - p += $(b:D=) ; # can't use :B here because it destroys . and .. - result ?= $(p) ; - } - gSPLIT-PATH.$(<) = $(result) ; - } - return $(result) ; -} - -rule split ( string separator ) -{ - local result ; - local s = $(string) ; - - while $(s) - { - local match = [ MATCH ^(.*)$(separator)(.*) : $(s) ] ; - - local tail = $(match[2]) ; - tail ?= $(s) ; - - result = $(tail) $(result) ; - s = $(match[1]) ; - } - return $(result) ; -} - -rule split-path ( path ) -{ - if ! $(gSPLIT_PATH_CACHE($(path))) - { - gSPLIT_PATH_CACHE($(path)) = - [ MATCH "^([/$(SLASH)]+).*" : $(path) ] # rooting slash(es), if any - [ split $(path) "[/$(SLASH)]" ] # the rest. - ; - } - return $(gSPLIT_PATH_CACHE($(path))) ; -} - -# dwa 6/4/01 - added for boost -# reverse item1 item2... -# -# Returns ...item2 item1 -rule reverse -{ - local result ; - for x in $(<) - { - result = $(x) $(result) ; - } - return $(result) ; -} - -# dwa 6/28/01 - added for boost -# strip-initial tokens... : input -# -# if input begins with tokens, remove the initial sequence of tokens and return -# the rest. Otherwise return input unchanged. -rule strip-initial -{ - local result = $(>) ; - local t ; - local matched = true ; - for t in $(<) - { - if $(matched) && ( $(t) = $(result[1]) ) - { - result = $(result[2-]) ; - } - else - { - matched = ; - result = $(>) ; - } - } - return $(result) ; -} - -# dwa 6/4/01 - added for boost -# simplify-path-tokens token1 token2 ... tokenN : DOT-opt -# -# Remove redundant information from the given path elements -# if DOT-opt is supplied, empty results are replaced with -# $(DOT-opt). -# -# [ simplify-path-tokens a b . c .. .. d e ] => a d e -# [ simplify-path-tokens a b .. .. .. d e ] => .. d e -# [ simplify-path-tokens .. .. d e : xxx ] => .. .. d e (provided TOP != ../..) -# [ simplify-path-tokens a b .. .. : xxx ] => xxx -rule simplify-path-tokens -{ - local reverse-path = [ reverse $(<) ] ; - local dotdots ; - local result ; - local token ; - for token in $(reverse-path) - { - if $(token) = $(DOT) - { - } - else if $(token) = $(DOTDOT) - { - dotdots += $(token) ; - } - else if $(dotdots) - { - dotdots = $(dotdots[2-]) ; - } - else - { - result = $(token) $(result) ; - } - } - - result = $(dotdots) $(result) ; - result = [ strip-initial $($(gTOP)_TOKENS) $(gINVOCATION_SUBDIR_TOKENS) : $(result) ] ; - result ?= $(>) ; - return $(result) ; -} - -rule tokens-to-simple-path -{ - return [ FDirName [ simplify-path-tokens $(<) ] ] ; -} - -rule SubDirCcFlags -{ - SUBDIRCCFLAGS += $(<) ; -} - -rule SubDirC++Flags -{ - SUBDIRC++FLAGS += $(<) ; -} - -rule SubDirHdrs -{ - SUBDIRHDRS += $(<) ; -} - -rule SubInclude -{ - local _s ; - - # That's - # SubInclude TOP d1 [ d2 [ d3 [ d4 ] ] ] - # - # to include a subdirectory's Jamfile. - - if ! $($(<[1])) - { - EXIT Top level of source tree has not been set with $(<[1]) ; - } - - _s = [ FDirName $(<[2-]) ] ; - - # protect variables from being permanently set by SubDir invocations - # in included files. - local project = $(PROJECT) ; - local [ protect-subdir ] ; - PROJECT = $(project) ; - local jamfile-path - = [ tokens-to-simple-path - [ split-path $(JAMFILE:D=$(_s):R=$($(<[1]))) ] ] ; - load-jamfiles $(jamfile-path) ; -} - -# Load a user's Jamfile(s). -# -rule load-jamfiles ( jamfiles * ) -{ - # First we load the Jamfiles without generation of main targets so that - # dependencies are preloaded. Then we reload the files with target - # generation enabled. - - local jamfile ; - local as-dependant = $(gIN_LIB_INCLUDE) ; - local gIN_LIB_INCLUDE ; - - gIN_LIB_INCLUDE = TRUE ; - for jamfile-path in $(jamfiles) - { - if ! $(gINCLUDED_AS_DEPENDANT($(jamfile-path))) - { - gINCLUDED_AS_DEPENDANT($(jamfile-path)) = TRUE ; - include $(jamfile-path) ; - } - } - - if ! $(as-dependant) - { - gIN_LIB_INCLUDE = ; - for jamfile-path in $(jamfiles) - { - if ! $(gINCLUDED($(jamfile-path))) - { - gINCLUDED($(jamfile-path)) = TRUE ; - include $(jamfile-path) ; - } - } - } -} - -rule Undefines -{ - UNDEFS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(UNDEFFLAG)$(>) ; -} - -rule UserObject -{ - EXIT "Unknown suffix on" $(>) "- see UserObject rule in Jamfile(5)." ; -} - -# dwa 6/4/01 - modified for boost -rule Yacc -{ - local _h ; - - # Can't just replace .cpp with .h, because bison seems to generate a .cpp.h file - _h = $(<).h ; - - # Some places don't have a yacc. - - MakeLocate $(<) $(_h) : $(LOCATE_SOURCE) ; - SEARCH on $(<) $(_h) = $(LOCATE_SOURCE) ; - - if $(YACC) - { - DEPENDS $(<) $(_h) : $(>) ; - - # if YACC can accept an output file, we'll just generate the file there. - YACCFILES on $(<) $(_h) = [ join-path $(LOCATE_SOURCE) $(<[1]) ] ; - - Yacc1 $(<) $(_h) : $(>) ; - - if ! $(YACC_OUTPUT) - { - YaccMv $(<) $(_h) : $(>) ; - } - - Clean clean : $(<) $(_h) ; - } - - # make sure someone includes $(_h) else it will be - # a deadly independent target - - INCLUDES $(<) : $(_h) ; -} - -rule remember-binding ( target : bound-path ) { - gBINDING($(target)) = $(bound-path) ; -} - -# -# Utility rules; no side effects on these -# - -rule FGrist -{ - # Turn individual elements in $(<) into grist. - - local _g _i ; - - _g = $(<[1]) ; - - for _i in $(<[2-]) - { - _g = $(_g)!$(_i) ; - } - - return $(_g) ; -} - -rule FGristFiles -{ - if ! $(SOURCE_GRIST) - { - return $(<) ; - } - else - { - return $(<:G=$(SOURCE_GRIST)) ; - } -} - -# dwa 6/4/01 - modified for boost -rule FGristSourceFiles -{ - # Produce source file name name with grist in it, - # if SOURCE_GRIST is set. - - # Leave header files alone, because they have a global - # visibility. - - if ! $(SOURCE_GRIST) - { - return $(<) ; - } - else - { - local _i _o ; - - for _i in $(<) - { - switch $(_i) - { - case *.h : _o += $(_i) ; - case *.hpp : _o += $(_i) ; - case * : _o += $(_i:G=$(SOURCE_GRIST)) ; - } - } - - return $(_o) ; - } -} - -# dwa 6/4/01 - modified for boost -# join values... : [separator] -# -# Pastes values together into a single list element, separated by an optional separator. -rule join ( values * : sep ? ) -{ - sep ?= "" ; - return $(values:J=$(sep)) ; -} - -# Given $(<), the tokens comprising a relative path from D1 to a subdirectory -# D2, return the relative path from D2 to D1, using ../../ etc. -rule FSubDir -{ - local _d ; - - if ! $(<[1]) - { - _d = $(DOT) ; - } - else - { - _d = $(DOTDOT) ; - - local _i ; - for _i in $(<[2-]) - { - _d = $(_d:R=$(DOTDOT)) ; - } - } - - return $(_d) ; -} - -# dwa 6/4/01 - added for boost -# Turn individual elements in $(<) into a usable path. If $(<) is empty, $(>) is -# returned. -rule join-path -{ - local _s _i ; - - if ! $(<) - { - _s = $(>) ; - } - else if $(VMS) - { - # This handles the following cases: - # a -> [.a] - # a b c -> [.a.b.c] - # x: -> x: - # x: a -> x:[a] - # x:[a] b -> x:[a.b] - - switch $(<[1]) - { - case *:* : _s = $(<[1]) ; - case \\[*\\] : _s = $(<[1]) ; - case * : _s = [.$(<[1])] ; - } - - for _i in [.$(<[2-])] - { - _s = $(_i:R=$(_s)) ; - } - } - else if $(MAC) - { - _s = $(DOT) ; - - for _i in $(<) - { - _s = $(_i:R=$(_s)) ; - } - } - else - { - _s = $(<[1]) ; - local _r = $(<[2-]) ; - - # Jam doesn't handle the root directory properly - if $(_s) in / $(SLASH) - { - _s = $(_s)$(_r[1]) ; - _r = $(_r[2-]) ; - } - - for _i in $(_r) - { - _s = $(_i:R=$(_s)) ; - } - } - - return $(_s) ; -} - -# dwa 6/4/01 - modified for boost -rule FDirName -{ - # Turn individual elements in $(<) into a usable path. - return [ join-path $(<) : $(DOT) ] ; -} - - -rule _makeCommon -{ - # strip common initial elements - - if $($(<)[1]) && $($(<)[1]) = $($(>)[1]) - { - $(<) = $($(<)[2-]) ; - $(>) = $($(>)[2-]) ; - _makeCommon $(<) : $(>) ; - } -} - - -rule FRelPath -{ - local _l _r ; - - # first strip off common parts - - _l = $(<) ; - _r = $(>) ; - - _makeCommon _l : _r ; - - # now make path to root and path down - - _l = [ FSubDir $(_l) ] ; - _r = [ FDirName $(_r) ] ; - - # Concatenate and save - - # XXX This should be better - - if $(_r) = $(DOT) { - return $(_l) ; - } else { - return $(_r:R=$(_l)) ; - } -} - -# dwa 6/17/01 - modified for boost to handle multiple suffixes -rule FAppendSuffix -{ - # E.g., "FAppendSuffix yacc lex foo.bat : $(SUFEXE) ;" - # returns (yacc,lex,foo.bat) on Unix and - # (yacc.exe,lex.exe,foo.bat) on NT. - - if $(>) - { - local _i _o ; - - for _i in $(<) - { - if $(_i:S) - { - _o += $(_i) $(_i:S=$(>[2-])) ; - } - else - { - _o += $(_i:S=$(>)) ; - } - } - return $(_o) ; - } - else - { - return $(<) ; - } -} - -rule unmakeDir -{ - if $(>[1]:D) && $(>[1]:D) != $(>[1]) && $(>[1]:D) != \\\\ - { - unmakeDir $(<) : $(>[1]:D) $(>[1]:BS) $(>[2-]) ; - } - else - { - $(<) = $(>) ; - } -} - -# -# Actions -# - -# -# First the defaults -# - -actions As -{ - $(AS) $(ASFLAGS) -I$(HDRS) -o $(<) $(>) -} - -actions Chgrp -{ - chgrp $(GROUP) $(<) -} - -actions Chmod1 -{ - $(CHMOD) $(MODE) "$(<)" -} - -actions Chown -{ - chown $(OWNER) $(<) -} - -actions piecemeal together existing Clean -{ - $(RM) "$(>)" $(NULL_OUT) -} - -actions File -{ - $(CP) "$(>)" "$(<)" $(NULL_OUT) -} - -actions FileClone -{ - $(CLONE) "$(>)" "$(<)" $(NULL_OUT) -} - -actions GenFile1 -{ - $(>[1]) $(<) $(>[2-]) -} - -actions Fortran -{ - $(FORTRAN) $(FORTRANFLAGS) -o $(<) $(>) -} - -actions HardLink -{ - $(RM) "$(<)" 2$(NULL_OUT) $(NULL_OUT) - $(LN) "$(>)" "$(<)" $(NULL_OUT) -} - -actions Install -{ - $(CP) $(>) $(<) -} - -# dwa 6/4/01 - modified for boost -actions together Lex -{ - $(LEX) $(LEXFLAGS) $(LEX_OUTPUT)$(<) $(>) -} - -# dwa 6/4/01 - modified for boost -actions together LexMv -{ - $(MV) lex.yy.c $(<) -} - -actions MkDir1 -{ - $(MKDIR) "$(<)" -} - -rule Ranlib -{ - Ranlib-action $(<) : $(>) ; -} - -rule Ranlib-action -{ - system-Ranlib $(<) : $(>) ; -} - -actions together system-Ranlib -{ - $(RANLIB) "$(<)" -} - -actions quietly updated piecemeal together RmTemps -{ - $(RM) "$(>)" -} - -actions Shell -{ - $(AWK) ' - NR == 1 { print "$(SHELLHEADER)" } - NR == 1 && /^[#:]/ { next } - /^##/ { next } - { print } - ' < $(>) > $(<) -} - -# dwa 6/4/01 - modified for boost -actions together Yacc1 -{ - $(YACC) $(YACCFLAGS) $(YACC_OUTPUT)$(<[1]) $(>) -} - -# dwa 6/4/01 - modified for boost -actions together YaccMv -{ - $(MV) $(YACCFILES).c $(<[1]) - $(MV) $(YACCFILES).h $(<[2]) -} - -# dwa 6/4/01 - killed all platform-specific actions for boost - -# dwa 6/4/01 - modified for boost -actions together Yacc-fix-line-directives -{ - $(YACC_FIX_LINES) $(<) > $(<) -} diff --git a/v1/boost-base.jam b/v1/boost-base.jam deleted file mode 100644 index f0af377c9..000000000 --- a/v1/boost-base.jam +++ /dev/null @@ -1,2977 +0,0 @@ -#~ 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" -# without express or implied warranty, and with no claim as to its suitability -# for any purpose. -# -# Jamrules file by David Abrahams (abrahams@mediaone.net) and Carlos Pinto -# Coelho (cfspc@altrabroadband.com). - -# Notes on the design of the system: -# -# This system is designed to support building the "same" targets with multiple -# build tool suites (e.g. msvc, gcc,...) and build variants (e.g. debug, -# release...). Although it currently varies across two dimensions, it should -# trivially support extension to three or more, e.g. in case of cross-platform -# builds. The word "same" is written in quotes above because internally, -# separate targets are generated for each unique toolset/build-variant -# combination. -# -# Specifics of build tool suites are specified in files with names of the form -# "-tools.jam", where is the name used to identify the tool suite. - -# Workarounds for Jam limitations: -# -# 1. Jam supports something like the setting of attributes on targets using the -# syntax: -# on = -# -# This facility is used to control build actions for individual targets -# (target-specific variables take precedence over global ones when build -# actions # are executed). An obvious approach would be to use target -# attributes to hold # properties of build tools (e.g. where to find the -# standard includes). # Unfortunately, although you can write target -# attributes, there is no way to # read them. Instead, we take advantage of -# two properties of Jam: -# -# a. A variable name can be formed by evaluating an expression. For example, -# the following rule, appends FOOBAR to its first argument to form the -# name of a new variable, which is given the value "baz" -# -# rule X { $(1)FOOBAR = baz ; } -# -# b. Any character is allowed in a variable name. So, although they are -# actually global variables, we can form names like .c++-flags thus: -# -# C++FLAGS = $($(1).c++-flags) # Get the c++-flags "attribute" from $(1) -# -# 2. There is no way to call a rule based on the value of a variable -# other than by using a switch statement. Because that approach requires -# intrusive changes to rules when the system is extended, we have avoided -# it. Instead, we have taken advantage of two "features" of Jam: -# -# a. The name of a file to be included can be computed from an -# expression. For example, the following includes a file whose name is -# formed by concatenating $(1) and "-tools.jam": -# -# include $(1)-tools.jam -# -# b. A rule can be redefined any number of times. Its latest definition is -# the one invoked. For example, the following prints "#2". -# -# rule X { ECHO #1 ; } -# rule X { ECHO #2 ; } -# X ; -# -# Together, these facts allow us to select tool-suite-specific actions for -# building specific target types by repeatedly redefining the generalized -# build actions in the various -tools.jam files - -if $(NT) -{ - TOOLS ?= vc-7_1 ; -} -else if $(UNIX) -{ - switch $(JAMUNAME) - { - case Darwin* : - { - TOOLS ?= darwin ; - } - - case * : - { - TOOLS ?= gcc ; - } - } -} -else -{ - TOOLS ?= gcc ; -} - -SHARED_TYPES = DLL ; -STATIC_TYPES = LIB ; - -# detect-build-tools : -# -# Declares a pseudotarget for the specified build tools which is built by -# the given . -# -# Although not currently implemented, the plan is to make compilation of -# tool-specific targets dependent on this pseudotarget. That way, we will never -# even attempt to build targets for tools that don't exist. -rule detect-build-tools -{ - detection-command on $(<) = $($(<).bin-directory)$(>) ; -} - -# lib: generator function -# -rule library-file ( target : sources + ) -{ - LibraryFromObjects $(<) : [ Objects $(>) ] ; -} - -# exe: generator function -# -rule executable-file ( target : sources + ) -{ - type-DEPENDS exe : $(<) ; - main-from-objects $(<) : [ Objects $(>) ] : EXE ; -} - -# dll: generator function -# -rule dll-files ( module implib ? : sources * : target-type ? ) -{ - type-DEPENDS dll : $(<) ; - - # Set up the import library dependency on Windows - if $(<[2]) - { - INCLUDES $(<[1]) : $(<[2-]) ; - INCLUDES $(<[2-]) : $(<[1]) ; - } - - target-type ?= DLL ; - if [ MATCH ^(CRAY).* : $(JAMUNAME[-1]) ] # no shared libs on cray - { - NOTFILE $(<) ; - } - else - { - main-from-objects $(<) : [ Objects $(>) ] : $(target-type) ; - } -} - -# template: modifier function -# -# The target specs are modified by adding those previously specified in a template source. -# Any specs containing paths are rerooted to correctly reference the dependee locations. -# -rule template-modifier ( target : source ) -{ - local source-dir = [ directory-of $(source:G=) ] ; - local source-id = [ target-id-of $(source) ] ; - - # Make sure it's defined. - # - if ! $(gTARGET_TYPE($(source-id))) - { - dependent-include $(source:G=) ; - } - - # Copy the base specs into the target specs, adjust any paths - # - gTARGET_SOURCES($(target)) += - [ root-paths $(gTARGET_SOURCES($(source-id))) : $(source-dir) ] ; - gTARGET_DEPS($(target)) += - [ root-paths $(gTARGET_DEPS($(source-id))) : $(source-dir) ] ; - gTARGET_REQUIREMENTS($(target)) += - [ fixup-path-properties $(gTARGET_REQUIREMENTS($(source-id))) : $(source-dir) ] ; - gTARGET_DEFAULT_BUILD($(target)) += - $(gTARGET_DEFAULT_BUILD($(source-id))) ; -} - -# main-from-objects exe-target : obj-target... : ("EXE"|"DLL") -# -# generate instructions to build the given "main" target from the given object -# files given in the 2nd parameter. The 3rd parameter should be EXE for an -# executable, or DLL for a shared library. -rule main-from-objects ( targets * : objects * : type ) -{ - # make compiled sources a dependency of target - - MakeLocate $(targets) : $(LOCATE_TARGET) ; - - Clean clean : $(targets) ; - - MODE on $(targets) = $($(type)MODE) ; - local link-function = Link-$(type) ; - local extra-files = [ $(link-function) $(targets) : $(objects) : $(type) ] ; - Chmod $(targets[1]) ; - DEPENDS $(targets) : $(objects) ; - - # locate and attach the extra files generated - if $(extra-files) - { - MakeLocate $(extra-files) : $(LOCATE_TARGET) ; - DEPENDS $(targets) : $(extra-files) ; - } - - gFILES($(targets[1])) = $(targets) $(extra-files) ; -} - -rule .do-link ( targets + : sources + : type ) -{ - # Prepare NEEDLIBS for use by the toolsets' link action (e.g. for - # invoking with-command-file) - local NEEDLIBS = [ on $(<) return $(NEEDLIBS) ] ; - - return [ Link-action $(targets) : $(sources) : $(type) ] ; -} - -rule Link-EXE -{ - # N.B. By the time this rule is invoked, we had better have gRUN_PATH completely set. - - local extra-files = [ .do-link $(<) : $(>) : EXE ] ; - RUN_PATH on $(<) = [ join [ unique $(gRUN_PATH($(<))) $(gTOOLSET_LIB_PATH) ] : $(SPLITPATH) ] ; - if $(UNIX) - { - LINK_LIBPATH on $(<) = [ join $(gRUN_LD_LIBRARY_PATH($(<))) : $(SPLITPATH) ] ; - } - - return $(extra-files) ; -} - -rule Link-DLL -{ - gRUN_LD_LIBRARY_PATH($(<)) += $(gLOCATE($(<[1]))) $(gTOOLSET_LIB_PATH) ; - if $(UNIX) - { - LINK_LIBPATH on $(<) = [ join $(gRUN_LD_LIBRARY_PATH($(<))) : $(SPLITPATH) ] ; - } - - return [ .do-link $(<) : $(>) : DLL ] ; -} - -# store the shell's PATH again, just in case someone uses PATH. -# This also allows the user to customize the base path for running built -# products from the command-line -RUN_PATH ?= $(PATH) ; -if $(UNIX) -{ - LINK_LIBPATH ?= $($(gSHELL_LIBPATH)) ; - gAPPEND_LD_LIBRARY_PATH = ":$"$(gSHELL_LIBPATH) ; - gAPPEND_PATH = ":$"PATH ; -} -if $(NT) -{ - # Try some other likely spellings - RUN_PATH ?= $(Path) ; - RUN_PATH ?= $(path) ; - gAPPEND_LD_LIBRARY_PATH = ";%LD_LIBRARY_PATH%" ; - gAPPEND_PATH = ;\"%PATH%\" ; -} - -# Now set this, just in case someone tries to use it. -PATH = $(RUN_PATH) ; -if $(UNIX) -{ - $(gSHELL_LIBPATH) = $(LINK_LIBPATH) ; -} - -DOLLAR = "$" ; - -# bubble variable-name -# -# Helper function for sort, below -# Removes the greatest element from $(variable-name) and returns it. -rule bubble # -{ - local result = ; - local last = $($(<)[1]) ; - for x in $($(<)[2-]) - { - if $(last) <= $(x) - { - result += $(last) ; - last = $(x) ; - } - else - { - result += $(x) ; - } - } - $(<) = $(result) ; - return $(last) ; -} - -# sort args -# -# return args sorted in lexicographic order. -rule sort -{ - local _all = $(<) ; - local _result = ; - local _count ; - for _count in $(<) - { - _result = [ bubble _all ] $(_result) ; - } - return $(_result) ; -} - -# min args -# -# return the lexicographic minimum element of args -rule min -{ - local result = ; - local x ; - for x in $(<) - { - if ! $(result) || ( $(x) < $(result) ) - { - result = $(x) ; - } - } - return $(result) ; -} - -# difference listB : listA -# returns the elements of B that are not in A -rule difference -{ - local result = ; - local element ; - for element in $(<) - { - if ! ( $(element) in $(>) ) - { - result += $(element) ; - } - } - return $(result) ; -} - -# replace list : old-value new-value -# -# returns list with occurrences of old-value replaced by new-value -rule replace -{ - local result = ; - local x ; - for x in $(<) - { - if $(x) = $(>[1]) - { - result += $(>[2]) ; - } - else - { - result += $(x) ; - } - } - return $(result) ; -} - -# select-ungristed list... -# -# Returns the elements of list that have no grist -rule select-ungristed -{ - local result x ; - for x in $(<) - { - if ! $(x:G) - { - result += $(x) ; - } - } - return $(result) ; -} - -rule select-gristed ( list * ) -{ - local result ; - for local x in $(list) - { - if $(x:G) - { - result += $(x) ; - } - } - return $(result) ; -} - -# Returns grist without "<"/">" for elements matching "<.*>", -# and ignores other elements. -rule ungrist ( names * ) -{ - local result ; - for local name in $(names) - { - local stripped = [ MATCH ^<(.*)>$ : $(name) ] ; - result += $(stripped) ; - } - return $(result) ; -} - - -# Split a qualified property into 3 elements. -# -# Grammar description of qualified-property : -# [[]]property -# -# returns property -# missing or are treated as <*> -rule split-qualified-property -{ - local grist1 = $(<:G) ; - local ungrist1 = $(<:G=) ; - local grist2 = $(ungrist1:G) ; - local ungrist2 = $(ungrist1:G=) ; - local grist3 = $(ungrist2:G) ; - local ungrist3 = $(ungrist2:G=) ; - if $(grist3) - { - return $(grist1) $(grist2) $(grist3)$(ungrist3) ; - } - else if $(grist2) - { - return <*> $(grist1) $(grist2)$(ungrist2) ; - } - else - { - return <*> <*> $(<) ; - } -} - -rule unique # list -{ - local result = ; - local f ; - for f in $(<) - { - if ! $(f) in $(result) - { - result += $(f) ; - } - } - return $(result) ; -} - -# get-properties features : properties -# -# Given a list of gristed features and a list of properties, returns the -# properties matching the given features. -rule get-properties -{ - local result = ; - local property ; - for property in $(>) - { - if $(property:G) in $(<) - { - result += $(property) ; - } - } - return $(result) ; -} - -# get-values features : properties -# -# Given a list of gristed feature names and a list of properties, returns the -# value(s) of the given features. -rule get-values -{ - local _properties = [ get-properties $(<) : $(>) ] ; - return $(_properties:G=) ; -} - -rule replace-properties ( property-set * : new-properties * ) -{ - local result = ; - for local x in $(property-set) - { - if $(x:G) in $(new-properties:G) - { - if ! $(x:G) in $(result:G) - { - result += [ get-properties $(x:G) : $(new-properties) ] ; - } - - } - else - { - result += $(x) ; - } - } - return $(result) ; -} - - -# normalize-properties properties -# -# Normalizes a set of (possibly qualified) properties by prepending <*> as many -# times as necessary to ensure that each property has at least 3 gristed elements. -rule normalize-properties -{ - local property ; - local result ; - for property in $(<) - { - switch $(property) - { - case <*><*>* : result += $(property) ; - case <*>* : result += <*>$(property) ; - case * : result += <*><*>$(property) ; - - case <*><*><*>* : result += $(property) ; - case <*><*><*>* : result += <*>$(property) ; - case <*><*>* : result += $(property) ; - case <*><*>* : result += <*><*>$(property) ; - case <*>* : result += <*>$(property) ; - case <*>* : result += <*><*><*>$(property) ; - case * : result += <*><*>$(property) ; - - case <*><*><*><*@*>* : result += $(property) ; - case <*><*><*@*>* : result += <*>$(property) ; - case <*><*@*>* : result += <*><*>$(property) ; - case <*@*>* : result += <*><*><*>$(property) ; - - case <*><*><*>* : result += $(property) ; - case <*><*>* : result += <*>$(property) ; - case <*>* : result += <*><*>$(property) ; - case * : result += <*><*><*>$(property) ; - } - } - return $(result) ; -} - -# intersection set1 : set2 -# -# Removes from set1 any items which don't appear in set2 and returns the result. -rule intersection -{ - local result v ; - for v in $(<) - { - if $(v) in $(>) - { - result += $(v) ; - } - } - return $(result) ; -} - -# subset sub : super -# -# Returns true iff sub is a subset of super, empty otherwise -rule is-subset -{ - if [ intersection $(<) : $(>) ] = $(<) - { - return true ; - } -} - -# distribute-feature value1[/value2...] -# -# Distribute the given feature across the slash-separated set of values, i.e. -# returns value1[ /value2...] -rule distribute-feature -{ - local g = $(<:G) ; - local result = [ split-path $(<:G=) ] ; - return $(g)$(result) ; -} - -# set-insert variable-name : value... ; -# -# Appends the given values to the list designated by variable-name if they are -# not already present. -rule set-insert -{ - local v ; - for v in $(>) - { - if ! ( $(v) in $($(<)) ) - { - $(<) += $(v) ; - } - } -} - -# equal-sets set1 : set2 -# -# Returns true iff set1 contains the same elements as set2. -# Not sensitive to the same element appearing multiple times -rule equal-sets -{ - if ( ! [ difference $(<) : $(>) ] ) && ( ! [ difference $(>) : $(<) ] ) - { - return true ; - } -} - -# feature name : [values...] -# -# Declares a feature with the given name, and the given allowed values. -rule feature -{ - if $(<) in $(gFEATURES) - { - EXIT feature $(<) : $(gFEATURE_VALUES(<$(<)>) redeclared as $(<) : $(>) ; - } - gFEATURES += <$(<)> ; - gUNGRISTED(<$(<)>) = $(<) ; - gFEATURE_VALUES(<$(<)>) = $(>) ; -} - -rule free-feature -{ - feature $(<) : $(>) ; - gFREE_FEATURES += <$(<)> ; - if $(>) - { - gSINGLE_VALUED_FREE_FEATURES += <$(<)> ; - } -} - -rule path-feature -{ - free-feature $(<) : $(>) ; - gPATH_FEATURES += <$(<)> ; -} - -rule dependency-feature -{ - path-feature $(<) : $(>) ; - gDEPENDENCY_FEATURES += <$(<)> ; -} - -# feature-default ... -# -# return the default properties corresponding to the given feature(s) -rule feature-default -{ - local result f ; - for f in $(<) - { - result += $(f)$(gFEATURE_VALUES($(f))[1]) ; - } - return $(result) ; -} - -# flags tools-name variable-name condition [: value(s)] -# -# Declare command-line settings for a given toolset. -# toolset: the name of the toolset -# variable-name: the name of a global variable which can be used to carry -# information to a command-line -# condition: One of the following: -# 1. zero or more property-sets of the form: -# value[/value...] -# 2. one or more [/...] -# -# This rule appends to the specified variable, depending on a target's build -# configuration and the form of condition. -# -# 1. if any specified property-set is a subset of the target's build properties or if -# condition is empty, the values specified in $(3) will be appended once to -# /variable-name/. -# -# 2. The value of each specified feature that participates in the target's -# build properaties is appended to /variable-name/. -# -# The variable will be set "on" the target so it may be used in its build actions. -rule flags -{ - local toolset = $(gCURRENT_TOOLSET) ; - local variable = $(<[2]) ; - local condition = $(<[3-]) ; - - # record the names of all variables used so they can be set on targets - if ! ( $(variable) in $(gTARGET_VARIABLES) ) - { - gTARGET_VARIABLES += $(variable) ; - $(variable) = ; - } - - local found = ; - local x ; - for x in $(condition) - { - x = [ split-path $(x) ] ; - - # Add each feature to the set of features relevant to the toolset - gRELEVANT_FEATURES($(toolset)) += $(x:G) ; - - # is it a property set? - if $(x:G=) - { - # if this property_set is a subset of the current build-properties - if ( ! $(found) ) && [ is-subset $(x) : $(gBUILD_PROPERTIES) ] - { - found = true ; - $(variable) += $(>) ; - } - } - else - { - $(variable) += [ get-values $(x) : $(gBUILD_PROPERTIES) ] ; - if $(x:G) in $(gDEPENDENCY_FEATURES) - { - gDEPENDENCY_VARIABLES($(toolset)) += $(variable) ; - } - } - } - if ! $(condition) - { - $(variable) += $(>) ; - } -} - -# include-tools toolset -# -# Unconditionally process the specification file for the given toolset. It is -# necessary to do this for each target built with that toolset, since the -# toolset will invoke the flags rule to set global variables based on the build -# properties of the target. -rule include-tools -{ - if ! $(gIN_INCLUDE_TOOLS) - { - gCURRENT_TOOLSET = $(<) ; - gRELEVANT_FEATURES($(<)) = ; # clear relevant feature set - gDEPENDENCY_VARIABLES($(<)) = ; - - # clear any lingering target variables that may have been declared - $(gTARGET_VARIABLES) = ; - gTARGET_VARIABLES = NEEDLIBS NEEDIMPS ; # start over from the beginning - gTOOLSET_LIB_PATH = ; - } - - { - local gIN_INCLUDE_TOOLS = true ; - SEARCH on $(<)-tools.jam = $(BOOST_BUILD_PATH) ; - include $(<)-tools.jam ; - } - - # Always maintain the list of relevant features as unique - if ! $(gIN_INCLUDE_TOOLS) - { - gRELEVANT_FEATURES($(<)) = [ - unique $(gRELEVANT_FEATURES($(<))) - $(gALWAYS_RELEVANT) - ] ; - } - - gINCLUDED($(<)-tools.jam) = TRUE ; -} - -# extends-toolset toolset -# -# Used in a toolset definition file; Declares that the toolset currently being -# defined is an extension of the given toolset. -rule extends-toolset -{ - include-tools $(<) ; -} - -# relevant-features toolset -# -# Returns the set of unique features relevant to the given toolset; includes the -# toolset description file as a side-effect if necessary. -rule relevant-features # name -{ - if ! $(gRELEVANT_FEATURES($(<))) - { - include-tools $(<) ; - } - return $(gRELEVANT_FEATURES($(<))) ; -} - -# variant name [ : parents... ] : []value... -# -# Declare a build variant, whose configuration is given by the given (optionally -# toolset-qualified) properties. -rule variant ( name : parents-or-properties * : tool-properties * ) -{ - gALL_VARIANTS += $(name) ; - local parents ; - if ! $(tool-properties) - { - if $(parents-or-properties[1]:G) - { - tool-properties = $(parents-or-properties) ; - } - else - { - parents = $(parents-or-properties) ; - } - } - else - { - parents = $(parents-or-properties) ; - } - local toolset ; - for toolset in $(TOOLS) - { - # We hijack select-properties to do our dirty work here. - # Because properties in a variant declaration are only qualified with - # toolset and not variant, we specify the toolset where - # select-properties expects a variant name. The first toolset parameter - # is necessary to get the relevant-features correctly set. We supply - # the variant name as the target name, so that error messages will look - # coherent. - local name-properties - = [ select-properties $(toolset) $(toolset) $(name) : $(tool-properties) ] ; - if $(parents) - { - local parent ; - for parent in $(parents) - { - local parent-properties - = $(gBASE_PROPERTIES($(toolset),$(parent))) ; - local inherited-features - = [ unique - [ difference $(parent-properties:G) : $(name-properties:G) ] - $(gFREE_FEATURES) - $(gPATH_FEATURES) - $(gDEPENDENCY_FEATURES ] ; - local inherited-properties - = [ get-properties $(inherited-features) : $(parent-properties) ] ; - name-properties - += $(inherited-properties) ; - } - } - gBASE_PROPERTIES($(toolset),$(name)) = [ sort $(name-properties) ] ; - } -} - -# select-properties toolset variant target : qualified-properties... -# -# Returns -rule select-properties ( toolset variant target ? : qualified-properties * ) -{ - local relevant_features = [ relevant-features $(toolset) ] ; - local normalized = [ normalize-properties $(>) ] ; - - # Classify properties by the specificity of their qualification. - # First, grab those that apply to this toolset, or all toolsets - local this_toolset = [ get-values <$(toolset)> : $(normalized) ] ; - local all_toolsets = [ get-values <*> : $(normalized) ] ; - - local 0-stars = [ get-values <$(variant)> : $(this_toolset) ] ; - local 1-stars = [ get-values <*> : $(this_toolset) ] [ get-values <$(variant)> : $(all_toolsets) ] ; - local 2-stars = [ get-values <*> : $(all_toolsets) ] ; - - # Select feature names from the features relevant to the toolset. - local features = [ intersection $(relevant_features) - : $(0-stars:G) $(1-stars:G) $(2-stars:G) ] ; - - local result f ; - for f in $(features) - { - local is_free = [ intersection $(f) : $(gFREE_FEATURES) ] ; - - # Go through the $(n-stars) lists from most- to least- specific; - # collect the best set of values of a simple feature, and /all/ - # values of a free feature. - local r n ; - for n in 0 1 2 - { - if ! $(r) || $(is_free) - { - r += [ get-values $(f) : $($(n)-stars) ] ; - } - } - - r = [ unique $(r) ] ; - if $(r[2]) && ! $(is_free) # Check for conflicting simple-feature requests - { - EXIT "Error: Ambiguous properties requested for" - $(target) <$(toolset)><$(variant)> ":" $(f)$(r) ; - } - result += $(f)$(r) ; - } - return $(result) ; -} -# get toolset features -SEARCH on features.jam = $(BOOST_BUILD_PATH) ; -include features.jam ; - -# ungrist-properties properties... -# -# Transforms a list of properties of the form: -# value1 [value2... ] -# into a list of the form: -# feature1-value1 feature2-value2 -# suitable for use as directory path elements -# -rule ungrist-properties -{ - local property ; - local result = ; - for property in $(<) - { - result += $(gUNGRISTED($(property:G)))-$(property:G=) ; - } - return $(result) ; -} - -# set-target-variables target -# -# attach global build tool settings to the given file-target, so that they can be -# used in build actions. -rule set-target-variables ( targets * ) -{ - local s ; - for s in $(gTARGET_VARIABLES) - { - $(s) on $(targets) = $($(s)) ; - - # set up dependencies if the target is a "top-level" target - if ( $(s) in $(gDEPENDENCY_VARIABLES($(gCURRENT_TOOLSET))) ) && $(gTARGET_TYPE($(<))) - { - DEPENDS $(targets) : $($(s)) ; - } - } - local libpath = [ get-properties : $(gBUILD_PROPERTIES) ] ; - gRUN_PATH($(targets)) += $(libpath:G=) ; - gRUN_LD_LIBRARY_PATH($(targets)) += $(libpath:G=) ; -} - -# For path properties, add a relative path prefix to the value as -# necessary to locate the path relative to the given subproject -# directory. -rule fixup-path-properties ( properties * : subproject-directory ? ) -{ - local result ; - - for local p in $(properties) - { - if $(p:G) in $(gPATH_FEATURES) - { - # If the path property value is project-relative, re-root - # it appropriately for that project - local parse-project = [ MATCH ^@([^/$(SLASH)]+)[/$(SLASH)]?(.*) : $(p:G=) ] ; - if $(parse-project) - { - local project = $(parse-project[1]) ; - local subproject = $(parse-project[2]) ; - p = [ root-paths $(subproject:G=$(p:G)) : $(gPROJECT($(project))) ] ; - } - else if $(subproject-directory) # re-root it relative to this directory - { - p = [ root-paths $(p) : $(subproject-directory) ] ; - } - } - - result += $(p) ; - } - - return $(result) ; -} - -# remove-incompatible-builds requirements... : build-request... : target-name -# -# If any element of requirements has the same grist but a different ungristed -# part as any element of build-request, exits with an error report about target-name -rule remove-incompatible-builds ( requirements * : build-request * : target-name + ) -{ - local all-properties = [ unique $(<) $(>) ] ; - local all-features = $(all-properties:G) ; - local unique-features = [ unique $(all-features) ] ; - if $(all-features) != $(unique-features) - { - local result ; - local skip ; - for local p in $(build-request) - { - # if a feature of the build request is also in the - # requirements, but with differing value(s) - if ( $(p:G) in $(requirements:G) ) - && ! ( $(p) in $(requirements) ) - { - # decide what to do. - local value = [ get-values $(p:G) : $(requirements) ] ; - if $(value[2]) - { - EXIT Unexpectedly found multiple build requests - for feature $(p:G) with values $(values) ; - } - - local requested = [ split-path $(p:G=) ] ; - if $(requested[2]) - { - local skipped = [ difference $(requested) : $(value) ] ; - - if ! $(gNOWARN_INCOMPATIBLE_BUILDS) - { - ECHO $(target-name) requires $(p:G)$(value), - skipping requested build configuration(s) $(p:G)$(skipped). ; - } - - result += $(p:G)$(value) ; - } - else - { - if ! $(gNOWARN_INCOMPATIBLE_BUILDS) - { - ECHO skipping $(target-name) due to incompatible - build requirements $(p:G)$(value). ; - } - skip = true ; - } - } - else - { - result += $(p) ; - } - } - - if $(skip) - { - build-request = SKIP ; - } - else - { - build-request = $(result) ; - } - } - return $(build-request) ; -} - -# multiply-property-sets [value1[/value2...] ]... -# -# Expands a set of (possibly multi-valued) properties into all the combinations -# that include every feature in the set. Each combination is given as a path, -# with the slash separating the properties, sorted in feature order. -rule multiply-property-sets -{ - local result p ; - for p in [ sort $(<) ] - { - # expand any multi-valued simple features from the default build - local multiple = [ distribute-feature $(p) ] ; - - # concatenation produces a product, so the tree branches for each - # multi-valued simple feature. - result = $(result)/$(multiple) ; - result ?= $(multiple) ; # this trick allows us to get started - } - return $(result) ; -} - -# Return a list consisting of all the elements of properties which -# aren't the defaults for their features. -rule remove-default-properties ( properties * ) -{ - return [ difference $(properties) : [ feature-default $(properties:G) ] ] ; -} - -# make-path-property-sets base-path : common-properties : property-sets -# -# Returns a list of paths where the initial ungristed part of each element is a -# relative path to a subvariant directory from a target's build root and the -# rest of the element is a slash-separated property set describing the -# properties of the target to be built. -# -# Each path returned is base-path extended by one of the ungristed property-sets -# (or just the base-path if no property-sets are supplied). Each property set -# returned is formed by extending common-properties with one of the property-sets. -# -# For example, -# -# make-path-property-sets gcc/release : v1 : v2/v3 -# -# returns this single-element list: -# -# gcc/release/p2-v2/p3-v3/v1/v2/v3 -# |<-- subvariant path -->|<-- property-set -->| -rule make-path-property-sets ( base-path : common-properties * : property-sets * ) -{ - local result ; - local s ; - for s in $(property-sets) - { - local x = - # directory components - $(base-path) - [ ungrist-properties - [ remove-default-properties [ split-path $(s) ] ] - ] - # properties - $(common-properties) $(s) - ; - - result += $(x:J=$(SLASH)) ; - } - - # if there were no overrides, just add the base variant and properties - if ! $(result) - { - result = [ join $(base-path) $(common-properties) : $(SLASH) ] ; - } - return $(result) ; -} - -# segregate-overrides override-var base-var -# -# removes elements of $(base-var) from $(override-var), and removes elements -# whose grist is in $(override-var:G) from $(base-var). -rule segregate-overrides -{ - $(<) = [ difference $($(<)) : $($(>)) ] ; - - # Which features, and thus properties, of the base variant are we keeping? - local kept-features = [ difference $($(>):G) : $($(<):G) ] ; - $(>) = [ get-properties $(kept-features) : $($(>)) ] ; -} - -# If any single-valued free-feature appears more than once in free-property..., -# exit with an appropriate error message. -rule report-free-property-conflicts ( free-property * : target + ) -{ - local p = [ get-properties $(gSINGLE_VALUED_FREE_FEATURES) : $(free-property) ] ; - local f = [ unique $(p:G) ] ; - if $(p:G) != $(f) - { - EXIT $(>): multiple values for single-valued free feature(s) - [ difference $(p:G) $(f) ] requested ; - } -} - -# Returns a list of path-property-sets (see make-path-property-sets above) for -# all build configurations based on the given toolset, requirements, and -# build-request. Target-name is just used for error reporting. -rule expand-build-request ( toolset variant target : raw-requirements * : raw-build-request * ) -{ - # grab the requirements and BUILD-request relevant to this toolset and variant - local requirements = [ select-properties $(toolset) $(variant) : $(raw-requirements) ] ; - local build-request = [ select-properties $(toolset) $(variant) : $(raw-build-request) ] ; - - # Separate the free features (e.g. , , ) from the others - local free-properties = [ segregate-free-properties requirements build-request ] ; - - # Check for conflicts - report-free-property-conflicts $(free-properties) : $(target) ; - build-request = [ remove-incompatible-builds $(requirements) - : $(build-request) : $(target) ] ; - - if $(build-request) != SKIP - { - # Get the base variant for the toolset. Includes free features - local base-properties = $(gBASE_PROPERTIES($(toolset),$(variant))) ; - - # Which properties will override settings in the base variant? - local override-properties = [ unique $(requirements) $(build-request) ] ; - segregate-overrides override-properties : base-properties ; - - # Which features will pick up a default value because they are not in - # the base variant or in the overrides? - local relevant-features = [ relevant-features $(toolset) ] ; - local override-free-features = [ intersection $(gSINGLE_VALUED_FREE_FEATURES) - : $(free-properties:G) ] ; - local defaulted-features = [ difference $(relevant-features) - : $(override-properties:G) $(base-properties:G) - $(override-free-features) - ] ; - - local defaulted-properties = [ feature-default $(defaulted-features) ] ; - - # VP: defaulted-properties have the form value and there's 1 value. - # Hence, each element of defaulted-properties will be part of each - # component of override-sets and will be a part of each property-set - # returned. By segregating them, the result is changed in only one - # way: free properties does not show up in target path. - local defaulted-free-properties = [ segregate-free-properties defaulted-properties ] ; - - # - # Allow properties and rules to take effect. - # - local default-requirements = [ get-values : $(free-properties) ] ; - - defaulted-properties = [ replace-properties $(defaulted-properties) - : [ select-gristed $(default-requirements) ] ] ; - - local non-defaults = $(requirements) $(build-request) $(free-properties) ; - - for local r in [ select-ungristed $(default-requirements) ] - { - local x = [ $(r) $(toolset) $(variant) : $(non-defaults) ] ; - # ECHO $(r) yields $(x) ; - # ECHO defaulted-properties= $(defaulted-properties) ; - defaulted-properties = [ - replace-properties $(defaulted-properties) : $(x) ] ; - } - - # In case any defaults should conflict with the requirements, - # force them to match up. - defaulted-properties = [ replace-properties $(defaulted-properties) : $(requirements) ] ; - - # form override property sets of the form (property1[/property2...] )+, - # sorted in feature order. These represent the properties of subvariants - # that differ from the base variant - local override-sets - = [ multiply-property-sets $(override-properties) $(defaulted-properties) ] ; - - # return path-property-sets corresponding to each (sub)variant build - # described. - return [ make-path-property-sets - $(toolset)$(SLASH)$(variant) - : [ fixup-path-properties - $(base-properties) - $(free-properties) - $(defaulted-free-properties) - : $(RELATIVE_SUBDIR) - ] - : $(override-sets) - ] ; - } -} - -# split-path-at-grist path -# -# Breaks path at each $(SLASH) that is followed by grist. This can be used to -# break apart property sets, particularly where the feature is used, -# since its value is typically a path. -rule split-path-at-grist -{ - local full-split = [ split-path $(<) ] ; - local last ; - local result x ; - for x in $(full-split) - { - if $(x:G) - { - result += $(last) ; - last = $(x) ; - } - else - { - last = $(last)$(SLASH)$(x) ; - last ?= $(x) ; - } - } - return $(result) $(last) ; -} - -# -# GIVEN: -# -# A set of dependency sources with grist to indicate the types -# (*, *, etc) -# -# RESULT: -# -# Will use the type, basename, and SUF*/PRE* to expand the name -# of the sources to their fully specific target name. -# -# EXAMPLE: -# -# [ expand-source-names test test test README.txt test ] -# -# RETURNS: -# -# libtest.a libtest.so test.app README.TXT test.so -# -rule expand-source-names ( sources * ) -{ - local x-sources = ; - for local source in $(sources) - { - local grist = [ ungrist $(source:G) ] ; - local type = $(gTARGET_TYPE_ID($(grist))) ; - if $(type) - { - local p = "" ; if $(source:B=:S=:G=) { p = "/" ; } - local prefix = "" ; - local suffix = "" ; - if $(PRE$(type)[1]) { prefix = $(PRE$(type)[1]) ; } - if $(SUF$(type)[1]) { suffix = $(SUF$(type)[1]) ; } - x-sources += $(source:B=:S=)$(p)$(prefix)$(source:B:S=)$(suffix) ; - } - else - { - x-sources += $(source) ; - } - } - return $(x-sources) ; -} - -# -# GIVEN: -# -# A set of targets and a single target type for all the targets -# (DLL, LIB, etc.) -# -# RESULT: -# -# Will use the type, basename, and SUF*/PRE* to expand the name -# of the targets to their fully specific target name. -# -# EXAMPLE: -# -# [ expand-targets-names foo bar : DLL ] -# -# RETURNS: -# -# libfoo.a libbar.so -# -rule expand-target-names ( targets + : target-type ) -{ - local x-targets = ; - for local target in $(targets) - { - local prefix = "" ; - local suffix = "" ; - if $(PRE$(target-type)[1]) { prefix = $(PRE$(target-type)[1]) ; } - if $(SUF$(target-type)[1]) { suffix = $(SUF$(target-type)[1]) ; } - x-targets += $(prefix)$(target)$(suffix) ; - } - return $(x-targets) ; -} - -# declare-local-target name : sources : requirements : local-BUILD : target-type -# -# declares a subproject-local target of the given name and target-type. This is -# all top-level rules which declare targets should eventually go through here. -# -# RETURNS: the a list of target names for the files built by the target. -rule declare-local-target ( target : sources * : requirements * : default-build * : target-type ) -{ - # We expand out the name of the target - local x-target = [ expand-target-names $(target) : $(target-type) ] ; - - # We add SOURCE_GRIST the base target name here because we're referring the - # abstract target which generates all of the actual builds. We need a way to - # distinguish targets of the same name from different subprojects. - local target-id = [ FGristFiles $(x-target) ] ; - - if ! $(target-type) - { - EXIT No target type given for "$(x-target)" ; - } - - # Define the specifications of the target. - gTARGET_NAME($(target-id)) = $(target) ; - - # Declare the basic target. - declare-basic-target $(target-id) : $(sources) : $(requirements) : $(default-build) : $(target-type) ; - - # Generate build instructions, but only if the target has a generator. - # - if $(gGENERATOR_FUNCTION($(gTARGET_TYPE($(target-id))))) - { - # Supress the regular build of this target - local suppress = [ get-values : $(default-build) ] ; - local gSUPPRESS_FAKE_TARGETS = $(suppress[1]) ; - - declare-fake-targets $(target) : $(target-id) ; - - # Just gather information if we are including a library's Jamfile for a - # dependent target. Don't generate build instructions here. - if ! $(gIN_LIB_INCLUDE) - { - main-target $(target-id) : $(gTARGET_DEFAULT_BUILD($(target-id))) ; - } - } - - return $(gTARGET_FILES($(target-id))) ; -} - -# declare-basic-target target-id : sources : requirements : local-BUILD : target-type -# -# Declares a basic target for the given target-id and target-type. -# All target generation should go through here to ensure all vars are set -# for the targets. -# -# WARNING: This only declares, no build instructions are generated here. -rule declare-basic-target ( target-id : sources * : requirements * : default-build * : target-type ) -{ - # We expand out the name of the sources - local x-sources = [ expand-source-names $(sources) ] ; - - # Define the specifications of the target, but only if we haven't already. - # - if ! $(gTARGET_TYPE($(target-id))) - { - # Save basic information about the target. - # - gTARGET_TYPE($(target-id)) = $(target-type) ; - - # Add the specified requirements to any requirements given by the target - # type, and the corresponding property. - # - gTARGET_REQUIREMENTS($(target-id)) - = toolset::requirements $(requirements) $(gTARGET_TYPE_REQUIREMENTS($(target-type))) ; - if ! $(gNO_TARGET_TYPE_REQUIREMENT($(target-type))) - { - gTARGET_REQUIREMENTS($(target-id)) += $(target-type) ; - } - - # Collect the recognized dependencies to other targets. - # - local dependencies ; - for local source in [ select-gristed $(x-sources) ] - { - local dependency-type = [ ungrist $(source:G:L) ] ; - local dependency-type-id = $(gTARGET_TYPE_ID($(dependency-type))) ; - if $(gIS_DEPENDENCY($(dependency-type-id))) - { - gTARGET_DEPS($(target-id)) += $(source:G=$(dependency-type-id)) ; - } - } - - # Sources that aren't recognized as targets, are considered raw sources. - # - gTARGET_SOURCES($(target-id)) - = [ FGristFiles - [ difference $(x-sources:G=) : $(gTARGET_DEPS($(target-id)):G=) ] ] ; - - # Save the default builds. - # - gTARGET_DEFAULT_BUILD($(target-id)) = $(default-build) ; - - # Apply any modifiers to the target specs. - # - for local mod in $(gTARGET_DEPS($(target-id))) - { - local dependency-type-id = [ ungrist $(mod:G) ] ; - local modifier-function = $(gMODIFIER_FUNCTION($(dependency-type-id))) ; - if $(modifier-function) - { - # Remove and apply the modifier. - gTARGET_DEPS($(target-id)) = [ difference $(gTARGET_DEPS($(target-id))) : $(mod) ] ; - local ignored = [ $(modifier-function) $(target-id) : $(mod) ] ; - } - } - } - # Trying to define the same specific target with a different type. - # - else if $(gTARGET_TYPE($(target-id))) != $(target-type) - { - EXIT conflicting target types for "$(x-target)": - "$(gTARGET_TYPE($(target-id)))" "$(target-type)" ; - } -} - -# directory-of files... -# -# Returns a list of the directories containing each element of files -rule directory-of -{ - local result d ; - for d in $(<:D) - { - if $(d) = "" - { - result += $(DOT) ; - } - else - { - result += $(d) ; - } - } - return $(result) ; -} - -# top-relative-tokens path -# -# Returns a list of path elements which form the relative path from TOP to path, -# which is expected to be given relative to the current subproject. -rule top-relative-tokens -{ - return [ simplify-path-tokens $(SUBDIR_TOKENS) [ split-path $(<) ] ] ; -} - -.project-root-tokens = [ split-path $(.boost-build-file:D) ] ; - -# try to make a potentially absolute path relative to the project -# root. Only works for paths below the project root right now; others -# will remain absolute. -rule relative-path ( path ) -{ - local path-tokens = [ split-path $(path) ] ; - - # try to strip the project root - local r = $(.project-root-tokens) ; - local p = $(path-tokens) ; - while $(r) && ( $(r[1]) = $(p[1]) ) - { - p = $(p[2-]) ; - r = $(r[2-]) ; - } - - # if successful, use the stripped project root - if ! $(r) - { - path-tokens = $(p) ; - } - - return [ tokens-to-simple-path $(path-tokens) ] ; -} - -# dependent-include target-path... -# -# For each target-path, ensure that the appropriate Jamfile has been -# included. Used when a target declares its dependency on another target. -rule dependent-include -{ - local target ; - for target in $(<) - { - { - local .project-path = [ target-path-of $(target) ] ; - .project-path = $(.project-path:D) ; - - # load the file as a dependent. - local gIN_LIB_INCLUDE = TRUE ; - - # - local [ protect-subproject ] ; - local .project-name-and-subdir = [ enter-subproject $(.project-path) ] ; - local .project-name = $(.project-name-and-subdir[1]) ; - local .project-subdir = $(.project-name-and-subdir[2]) ; - local .jamfile-path = [ root-paths $(JAMFILE) : [ root-paths $(.project-subdir) : $(TOP) ] ] ; - - load-jamfiles $(.jamfile-path) ; - } - } -} - -# segregate-free-properties variable1 variable2... -# -# returns the and removes the unique list of free properties from -# $(variable1) $(variable2)... -rule segregate-free-properties -{ - local free-properties = [ unique [ get-properties $(gFREE_FEATURES) : $($(<)) ] ] ; - local v ; - for v in $(<) - { - $(v) = [ difference $($(v)) : $(free-properties) ] ; - } - return $(free-properties) ; -} - -# is-link-compatible feature : value1 : value2 -# -# return non-empty iff a library built with value1 can be linked into a -# target with value2, empty otherwise -rule is-link-compatible ( feature : value1 : value2 ) -{ - return [ intersection - $(feature) $(value1:G=$(feature)) - $(value1:G=$(feature))$(SLASH)$(value12:G=$(feature)) - $(value2:G=$(feature)) - : $(gLINK_COMPATIBLE) ] ; -} - -# find-compatible-subvariant main-target : toolset variant : dependent-simple-properties -rule find-compatible-subvariant ( main-target : toolset variant : dependent-simple-properties * ) -{ - # calculate the subvariant only of what is requested - # the subvariant requested... - local sv-request = - [ multiply-property-sets - [ get-properties $(BUILD:G) : $(dependent-simple-properties) ] ] ; - # the available build requests... - local build-requests = - [ multiply-property-sets [ select-gristed $(BUILD) ] ] ; - # the build requst we want to build... - local sv-build = - [ intersection $(sv-request) : $(build-requests) ] ; - sv-build ?= "" ; - local BUILD = $(variant) [ split-path $(sv-build) ] ; - local gTARGET_DEFAULT_BUILD($(main-target)) = ; - # the full subvariant to build... - local subvariant = [ expand-target-subvariants $(main-target) : $(variant) : $(toolset) ] ; - - local sv-target = ; local sv-properties = ; local sv-toolset = ; local sv-variant = ; - split-target-subvariant sv-target sv-properties sv-toolset sv-variant : $(subvariant) ; - local sv-overrides = - [ difference $(dependent-simple-properties) : [ select-gristed $(sv-properties) ] ] ; - sv-overrides += - [ get-properties - [ difference $(dependent-simple-properties:G) : $(sv-overrides:G) ] : $(sv-properties) ] ; - - if ! $(gTARGET_TYPE($(main-target))) - { - EXIT unknown dependent target $(main-target) ; - } - - # check to make sure we can link against the subvariant - local target-requirements - = [ select-gristed $(gTARGET_REQUIREMENTS($(main-target))) ] ; - local override-conflicts - = [ get-properties $(target-requirements:G) $(gALWAYS_RELEVANT) : $(sv-overrides) ] ; - for local sv-override in $(override-conflicts) - { - local sv-required = [ get-values $(sv-override:G) : $(sv-properties) ] ; - if $(sv-override:G=) != $(sv-required) && - ! [ is-link-compatible $(sv-override:G) : $(sv-override:G=) : $(sv-required) ] - { - EXIT $(main-target): required property $(sv-override:G)$(sv-required) - incompatible with $(sv-override) ; - } - } - - # now that we have a mostly (or completely) compatible subvariant do the overrides - local gTARGET_REQUIREMENTS($(main-target)) = - # property rules... - [ select-ungristed $(gTARGET_REQUIREMENTS($(main-target))) ] - # always relevant properties to target... - [ difference - $(target-requirements) : - [ get-properties [ difference $(sv-overrides:G) : $(gALWAYS_RELEVANT) ] : $(target-requirements) ] ] - # link compatible properties, on the target... - [ get-properties - [ difference $(sv-overrides:G) : $(gALWAYS_RELEVANT) ] : $(target-requirements) ] - # overrides from dependent... - [ get-properties - [ difference $(sv-overrides:G) : $(override-conflicts:G) ] : $(dependent-simple-properties) ] - ; - subvariant = [ expand-target-subvariants $(sv-target) : $(sv-variant) : $(sv-toolset) ] ; - split-target-subvariant sv-target sv-properties sv-toolset sv-variant : $(subvariant) ; - - return $(sv-properties) ; -} - - -# For each target specified in libs, generate build instructions -# for a subvariant that can be linked with a dependent target with -# dependent-properties, returning a list of all generated targets. -rule link-libraries ( libs * : toolset variant : dependent-simple-properties * ) -{ - local lib-path result ; - - for lib-path in $(libs) - { - local lib-path = [ target-path-of $(lib-path) ] ; - local lib-target = [ target-id-of $(lib-path) ] ; - - # Enter the dependee subproject - local [ protect-subproject ] ; - enter-subproject [ directory-of $(lib-path) ] ; - - local lib-subvariant = [ - find-compatible-subvariant $(lib-target) - : $(toolset) $(variant) - : $(dependent-simple-properties) ] ; - - # Generate build instructions for the library target - result += [ subvariant-target $(lib-target) : $(lib-subvariant) : $(toolset) $(variant) ] ; - } - return $(result) ; -} - -# Which configuration(s) to build if nothing is explicitly specified -DEFAULT_BUILD ?= debug ; - -# get-BUILD [target-default-build] -# -# pick the first of ($(BUILD), $(>), $(DEFAULT_BUILD)) which is set. If it -# contains no variants, add variants from $(DEFAULT_BUILD). -rule get-BUILD -{ - local build = $(BUILD) ; - build ?= $(<) ; - build ?= $(DEFAULT_BUILD) ; - local variants = [ select-ungristed $(build) ] ; - if ! $(variants) - { - build += [ select-ungristed $(DEFAULT_BUILD) ] ; - } - return $(build) ; -} - -# declare-fake-targets abstract-target : target-file -# -# -rule declare-fake-targets -{ - # make a fake target so that it can be built without knowing the suffix - # Since executables under *NIX have no suffix, we'd better check - if $(>) != $(<) - { - DEPENDS $(<) : $(>) ; - NOTFILE $(<) ; - } - - # The following checks that we're in the subdirectory of Jam's invocation - # so that we can arrange for ungristed target names to be built from the - # command-line. - if $(<:G) && [ in-invocation-subdir ] - { - DEPENDS $(<:G=) : $(<) ; # allows $(<:G=) to be used to build all variants - NOTFILE $(<:G=) ; - } -} - -# declare-target-type TYPE : [[]]value... -rule declare-target-type -{ - gTARGET_TYPE_REQUIREMENTS($(<)) = $(>) ; -} - -declare-target-type DLL : true ; - -if $(NT) -{ - gIMPORT_SUFFIX(DLL) = .lib ; - gIMPORT_SUFFIX(LIB) = .lib ; - gEXPORT_SUFFIX(DLL) = .lib ; -} -else -{ - gIMPORT_SUFFIX(DLL) = .so ; - gIMPORT_SUFFIX(LIB) = .a ; -} - -# -# prepare path constants -# -{ - # The names of path variables that are set on targets - .run-path-vars = LD_LIBRARY_PATH PATH PYTHONPATH ; - - for local v in $(.run-path-vars) - { - .shell-var($(v)) = $(v) ; - } - - # Dynamic libraries are actually found on PATH - if $(NT) || ( $(UNIX) = CYGWIN ) - { - .shell-var(LD_LIBRARY_PATH) = PATH ; - } - - # Dynamic libraries search path var is loader, and hence system, dependant. - else - { - .shell-var(LD_LIBRARY_PATH) = $(gSHELL_LIBPATH) ; - } - - # The names of path variables in the shell - .run-path-shell-vars = [ unique $(.shell-var($(.run-path-vars))) ] ; - - # Record the original value of each shell variable - for local v in $(.run-path-shell-vars) - { - .run-path-shell-var-value($(v)) = $($(v)) ; - } - - if $(NT) - { - .env-prefix = % ; - .env-suffix = % ; - } - else - { - .env-prefix = "$" ; - .env-suffix = "" ; - } -} - - - -# Helper -rule depend-on-libs ( targets + : libs * ) -{ - LIBPATH on $(<) += [ unique $(gLOCATE($(>))) ] ; - DEPENDS $(<) : $(>) ; - library-dependencies on $(<) += $(>) ; - - # To run these targets, we need everything needed to run the libraries - for local v in $(.run-path-vars) - { - gRUN_$(v)($(<)) = [ unique $(gRUN_$(v)($(<))) $(gRUN_$(v)($(>))) ] ; - } -} - -rule depend-on-static ( targets + : static-libs * ) -{ - local NEEDLIBS = [ unique $(NEEDLIBS) $(>) ] ; - NEEDLIBS on $(<) = [ on $(<) return [ unique $(NEEDLIBS) $(>) ] ] ; - depend-on-libs $(targets) : $(static-libs) ; -} - -rule depend-on-shared ( targets + : dlls-and-import-libs * ) -{ - local linkable ; - - # collect the linkable elements of the source libs into the appropriate variables - for local f in $(dlls-and-import-libs) - { - local v = $(gLINK_VARIABLE($(f:S))) ; - $(v) += $(f) ; - $(v) on $(targets) += $(f) ; - if $(v) - { - linkable += $(f) ; - } - } - - FINDLIBS on $(<) += [ unique $(gTARGET_BASENAME($(gTARGET_SUBVARIANT($(>))))) ] ; - - depend-on-libs $(targets) : $(dlls-and-import-libs) ; -} - -# Given build properties, returns the normalised version of the features for -# use by rename-targets. -rule get-tag-features ( variant : build-properties * ) -{ - local result = ; - local tags = [ get-properties : $(build-properties) ] ; - for local tag in $(tags) - { - tag = $(tag:G=) ; - if $(tag:G) - { - result += $(tag) ; - } - else - { - result += <$(variant)>$(tag) ; - } - } - return $(result) ; -} - -rule generate-dependencies ( main-target : subvariant-targets + ) -{ - local dependencies = $(gTARGET_DEPS($(main-target))) ; - { - # Protect target variables against modification while lib dependencies - # are built. They will be made empty here, and restored when this scope exits - local $(gTARGET_VARIABLES) ; - - # extract the simple properties from dependent-properties - local p = $(gBUILD_PROPERTIES) ; - segregate-free-properties p ; - - # generate library build instructions - local BUILD = $(BUILD) ; - BUILD ?= $(gTARGET_DEFAULT_BUILD($(main-target))) ; - - for t in static shared - { - local lib-main-targets = [ get-values <$($(t:U)_TYPES)> : $(dependencies) ] ; - - local lib-targets - = [ link-libraries $(lib-main-targets) - : $(gCURRENT_TOOLSET) $(variant) : $(p) - ] ; - depend-on-$(t) $(subvariant-targets) : $(lib-targets) ; - } - } -} - -# Given main-target, a main target name gristed with $(SOURCE_GRIST), generate build -# instructions for a subvariant target using the given toolset, variant, etc. -# -# RETURNS: the a list of target names for the files built by the subvariant. If -# the main-target is a library, the first filename is the one that should be linked -# into a dependent target. -rule subvariant-target ( main-target : subvariant-id build-properties * : toolset variant ) -{ - # SOURCE_GRIST identifies the subproject directory; TARGET_GRIST will identify - # the target and subvariant, since unique versions of files will be built for - # that combination. - local property-tags = [ get-tag-features $(variant) : $(build-properties) ] ; - local tags = [ get-properties : $(gIMPOSED_REQUIREMENTS($(main-target))) ] $(property-tags) ; - local TARGET_GRIST = [ join-path $(SOURCE_GRIST) $(main-target:G=) $(subvariant-id) ] ; - local subvariant = $(main-target:G=$(TARGET_GRIST)) ; - - # Keep track of the generated targets. - if ! $(TARGET_GRIST) in $(gDECLARED_TARGETS) - { - gDECLARED_TARGETS += $(TARGET_GRIST) ; - } - - # Make sure we know how to generate these types of targets. - local target-type = $(gTARGET_TYPE($(main-target))) ; - if ! $(target-type) - { - EXIT unknown target type for $(main-target) ; - } - - gTARGET_TYPE($(subvariant)) = $(target-type) ; - - # LOCATE_TARGET affects where built targets are generated. We move it - # relative to the default location based on the subvariant - local LOCATE_TARGET - = [ join-path $(LOCATE_TARGET) $(main-target:G=) $(subvariant-id) ] ; - - # The renamed base name of the target. Only considers the tags defined directly - # on the target. - if $(gTARGET_NAME($(main-target))) - { - gTARGET_BASENAME($(main-target)) = - [ rename-target $(gTARGET_NAME($(main-target))) : [ split-path [ ungrist $(subvariant:G) ] ] : $(property-tags) ] ; - } - - # First order names have the suffix, if any according to the platform. - local target-files = [ FAppendSuffix $(subvariant) : $(SUF$(target-type)) ] ; - # Second order names have any tags as imposed from stage target contexts. - target-files = [ rename-target $(target-files) : [ split-path [ ungrist $(subvariant:G) ] ] : $(tags) ] ; - # Third order names are customized as determined by a rename rule on the target type. - if $(gNAME_ADJUST($(target-type))) - { - target-files = [ - $(gNAME_ADJUST($(target-type))) $(target-files) - : $(subvariant-id) $(build-properties) - : $(toolset) $(variant) ] ; - gTARGET_TYPE($(target-files[1])) = $(target-type) ; - } - - # Do nothing if we already have the build instructions for the specific - # target files of this subvariant target. - if ! $(target-files) in $(gTARGET_FILES($(main-target))) - { - gTARGET_SUBVARIANT($(target-files)) = $(main-target) ; - - ###gTARGET_FILES($(subvariant)) = $(target-files) ; - gTARGET_FILES($(main-target)) += $(target-files) ; - - # Remember the path from the build root to the subvariant directory - gSUBVARIANT_PATH($(subvariant)) = $(subvariant-id) ; - - # Add target suppression if was in the requirements - local gSUPPRESS_FAKE_TARGETS = [ get-values : $(gTARGET_REQUIREMENTS($(main-target))) ] $(gSUPPRESS_FAKE_TARGETS) ; - - declare-fake-targets $(main-target) : $(target-files) ; - - # set up gBUILD_PROPERTIES for include-tools (below) - local gBUILD_PROPERTIES = $(build-properties) ; - - # Include the toolset specification. This will set up the global flags - # variables in a way appropriate to this build. - - include-tools $(toolset) ; - - # headers should be identified specific to the target, since search paths - # may differ for different subvariants. The same header name or relative - # path may refer to different files. - local HDRGRIST = [ join $(SOURCE_GRIST) $(STDHDRS) $(SYSHDRS) $(HDRS) "" : "#" ] ; - - # transfer target variables to the target file. - set-target-variables $(target-files) ; - - local dependencies - = [ get-values <$(STATIC_TYPES)> <$(SHARED_TYPES)> - : $(gTARGET_DEPS($(main-target))) - ] ; - - if $(dependencies) - { - # include each jamfile describing a dependee target. - dependent-include $(dependencies) ; - generate-dependencies $(main-target) : $(target-files) ; - } - - local generator = $(gGENERATOR_FUNCTION($(target-type))) ; - local sources = $(gTARGET_SOURCES($(main-target))) ; - $(generator) $(target-files) : $(sources) ; - - $(gTARGET_VARIABLES) = ; # Be sure that we don't mask bugs with lingering target variables - } - return $(target-files) ; -} - -# Generate the expanded subvariants of a target. -# -rule expand-target-subvariants ( target : local-build * : tools + : ) -{ - local BUILD = [ get-BUILD $(local-build) ] ; - local variants = [ select-ungristed $(BUILD) ] ; - local build-request = [ difference $(BUILD) : $(variants) ] ; - - local subvariants = ; - for local toolset in $(tools) - { - for local variant in $(variants) - { - local rules = [ select-ungristed - $(gTARGET_REQUIREMENTS($(target))) - $(gIMPOSED_REQUIREMENTS($(target))) ] ; - local requirements = [ select-gristed - $(gTARGET_REQUIREMENTS($(target))) - $(gIMPOSED_REQUIREMENTS($(target))) ] ; - - local expanded - = [ expand-build-request $(toolset) $(variant) $(target) - : $(requirements) : $(build-request) ] ; - - local gNOWARN_INCOMPATIBLE_BUILDS = TRUE ; - - for local instance in $(expanded) - { - local properties = [ split-path-at-grist $(instance) ] ; - for local r in $(rules) - { - properties = [ $(r) $(toolset) $(variant) : $(properties) ] ; - } - - if ! ( no in $(properties) ) - { - # the rules may have modified the build request, reconstruct it - properties = [ expand-build-request $(toolset) $(variant) $(target) - : $(properties[2-]) : $(build-request) ] ; - - subvariants += $(target)|$(properties)|$(toolset)|$(variant) ; - } - else if --dump-unbuilt - { - ECHO **** skipping build of $(target); toolset= $(toolset) variant= $(variant) **** ; - } - } - } - } - return [ unique $(subvariants) ] ; -} - -# Given an expanded subvariant of a terget, sets the various variables accordingly. -# -rule split-target-subvariant ( target-var properties-var toolset-var variant-var : subvariant ) -{ - local subvariant-items = [ MATCH (.*)[|](.*)[|](.*)[|](.*) : $(subvariant) ] ; - $(target-var) = $(subvariant-items[1]) ; - $(properties-var) = [ split-path-at-grist $(subvariant-items[2]) ] ; - $(toolset-var) = $(subvariant-items[3]) ; - $(variant-var) = $(subvariant-items[4]) ; - return $((target-var)) ; -} - -# main-target target : local-build -# -# Generates requested subvariant build instructions for the given main target -rule main-target -{ - local subvariants = [ expand-target-subvariants $(<) : $(>) : $(TOOLS) ] ; - - # include each jamfile describing a dependee target. - dependent-include [ get-values <$(STATIC_TYPES)> <$(SHARED_TYPES)> : $(gTARGET_DEPS($(<))) ] ; - - for local subvariant in $(subvariants) - { - local target = ; - local properties = ; - local toolset = ; - local variant = ; - split-target-subvariant target properties toolset variant : $(subvariant) ; - subvariant-target $(target) : $(properties) : $(toolset) $(variant) ; - } -} - -# Declare an executable target. -# -gTARGET_TYPE_ID(exe) = EXE ; -gGENERATOR_FUNCTION(EXE) = executable-file ; -rule exe ( target : sources + : requirements * : default-build * ) -{ - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : EXE ; -} - -# Declare a shared library target. -# -gTARGET_TYPE_ID(dll) = DLL ; -gGENERATOR_FUNCTION(DLL) = dll-files ; -gIS_DEPENDENCY(DLL) = TRUE ; -rule dll ( target : sources + : requirements * : default-build * ) -{ - if $(JAMUNAME[1]) = OpenBSD - { - if ! [ get-values : $(requirements) ] - { - requirements += 0.0 ; - } - } - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : DLL ; -} - -# Declare a statically-linked library target. -# -gTARGET_TYPE_ID(lib) = LIB ; -gGENERATOR_FUNCTION(LIB) = library-file ; -gIS_DEPENDENCY(LIB) = TRUE ; -rule lib ( target : sources + : requirements * : default-build * ) -{ - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : LIB ; -} - -# Declare a template target for other targets. This is a modifier only. It -# Adds the specs specified here to any other target it's a dependee of. -# -gTARGET_TYPE_ID(template) = TEMPLATE ; -gMODIFIER_FUNCTION(TEMPLATE) = template-modifier ; -gIS_DEPENDENCY(TEMPLATE) = TRUE ; -gNO_TARGET_TYPE_REQUIREMENT(TEMPLATE) = TRUE ; -rule template ( target : sources * : requirements * : default-build * ) -{ - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : TEMPLATE ; -} - -# Declare an executable target, to be run by tests. -rule unit-test ( target + : sources + : requirements * : default-build * : cmd-line * ) -{ - if ! $(.testing.jam-included) - { - SEARCH on testing.jam = $(BOOST_BUILD_PATH) ; - include testing.jam ; - } - - DEPENDS all - : [ run $(sources) - : $(cmd-line) - : # input-files - : $(requirements) - : $(target) - : $(default-build) - ] - ; -} - -# Used to build command files from a list of sources. -rule build-command-file ( command : sources * : prefix ? line-break ? ) -{ - # Clean up after ourselves - Clean clean : $(command) ; - - DEPENDS $(command) : $(sources) ; - - PREFIX on $(command) = $(prefix:E=) ; - - local ' _ = "" ; - - if ! $(NT) - { - ' = ' ; - _ = " " ; - } - - ' on $(command) = $(') ; - _ on $(command) = $(_) ; - - EOL on $(command) = \"$(line-break:E=)$(')$(_)>>$(_)\" ; - BOL on $(command) = "\" -echo $(')$(prefix:E=)\"" ; - - # Check whether there's anything to dump, so that we don't end up - # executing a line of the form: - # - # echo >> file.CMD - # - # on Windows this writes "echo is on." into the command-file, - # which then breaks the link. - - if $(sources) - { - # Handle the first target specially, so that the first source file - # will clear the command file - command-file-dump $(command) : $(sources) ; - } -} - -# Quietly delete $(x) if it exists with $(RM1)"$(x)" -if $(NT) -{ - RM1 = "IF EXIST " "DEL " ; -} -else -{ - RM1 = "$(RM) " ; -} - -# Build the command-file -actions quietly command-file-dump -{ - $(RM1)"$(<)" - echo $(')$(PREFIX)"$(>:J=$(EOL)$(<)$(BOL))"$(')$(_)>>$(_)$(<) -} - -# Clean up the temporary COMMAND-FILE used to build TARGETS. -rule remove-command-file ( targets + : command-file ) -{ - TEMPORARY $(command-file) ; - Clean clean : $(command-file) ; # Mark the file for removal via clean -} -actions ignore quietly piecemeal together remove-command-file -{ - $(RM) $(>) -} - -# build TARGETS from SOURCES using a command-file, where RULE-NAME is -# used to generate the build instructions from the command-file to -# TARGETS -rule with-command-file ( rule-name targets * : sources * : prefix ? line-break ? ) -{ - # create a command-file target and place it where the first target - # will be built - local command-file = $(targets[1]:S=.CMD) ; - LOCATE on $(command-file) = $(gLOCATE($(targets[1]))) ; - build-command-file $(command-file) : $(sources) : $(prefix) $(line-break) ; - - # Build the targets from the command-file instead of the sources - DEPENDS $(targets) : $(command-file) ; - local result = [ $(rule-name) $(targets) : $(command-file) ] ; - - # clean up afterwards - # Can't really do this until arguments are accounted for. - # remove-command-file $(targets) : $(command-file) ; - return $(result) ; -} - -TAG(prefix) = "" ; -TAG(postfix) = "" ; - -# GIVEN: -# -# A target subvariant, the subvariant info, and a set of rename tags. -# -# RESULT: -# -# Uses the rename tags, and the global TAG map, to append a tag to the -# target basename. The new subvariant target is returned. The tag for -# the target is composed from the subvariant info and the corresponding -# entry in the tags. This creates the tag in the order as given by the -# subvariant info. -# -# EXAMPLE: -# -# [ rename-target libtest.so : gcc debug : _gcc _debug ] -# -# RETURNS: -# -# libtest_gcc_debug.so -# -rule rename-target ( target + : subvariant * : tags * ) -{ - local tag-values = ; - for local tag in $(tags) - { - local tag-tokens = [ MATCH (<)(.*)(>)(.*) : $(tag:G=) ] ; - tag-tokens = $(tag-tokens[2]) $(tag-tokens[4]) ; - tag-values += $(tag-tokens[2]:G=$(tag-tokens[1])) ; - } - - local tag-text = "" ; - - # the prefix of the tag... - # - local prefix-tag = [ get-values : $(tag-values) $(TAG(prefix):G=prefix) ] ; - tag-text = $(prefix-tag[1]) ; - - # the subvariant tags... - # - for local sv in $(subvariant) - { - local sv-tag = [ get-values <$(sv)> : $(tag-values) $(TAG($(sv)):G=$(sv)) ] ; - if $(sv-tag) - { - tag-text = $(tag-text)$(sv-tag[1]) ; - } - } - - # the postfix of the tag... - # - local postfix-tag = [ get-values : $(tag-values) $(TAG(postfix):G=postfix) ] ; - tag-text = $(tag-text)$(postfix-tag[1]) ; - - local renamed-target = ; - for local t in $(target) - { - local B-S = [ MATCH ([^\\.]*)(.*) : $(t:G=) ] ; - local B = $(B-S[1]) ; B ?= "" ; - local S = $(B-S[2]) ; S ?= "" ; - local new-name = $(B)$(tag-text)$(S) ; new-name = $(new-name:G=$(t:G)) ; - renamed-target += $(new-name) ; - } - return $(renamed-target) ; -} - -rule grist-targets ( targets + : subdir-tokens * ) -{ - local subdir-grist = "" ; - if $(subdir-tokens) - { - subdir-grist = [ FGrist $(subdir-tokens) ] ; - if $(SOURCE_GRIST) - { - subdir-grist = "!$(subdir-grist)" ; - } - } - if ! $(SOURCE_GRIST) - { - return $(targets:G=$(subdir-grist)) ; - } - else - { - return $(targets:G=$(SOURCE_GRIST)$(subdir-grist)) ; - } -} - -# EXAMPLE: -# -# stage test-stage -# : foo/bar/test1 qwerty/keys docs/README -# : "_" "D" "P" "GCC" -# : debug profile true -# ; -# -# PRODUCES: -# -# test-stage/libkeys_GCCD.so -# test-stage/libkeys_GCCP.so -# test-stage/test1_GCCD -# test-stage/test1_GCCP -# test-stage/README -# -# IFF: -# -# $shell> jam test-stage -# -rule stage ( name : sources + : requirements * : local-build * ) -{ - if ! $(gIN_LIB_INCLUDE) - { - - local stage-id = - [ grist-targets $(name) ] ; - local arch-subdirs = [ get-values : $(requirements) ] ; - local tree-root = [ get-values : $(requirements) ] ; - if $(tree-root) { tree-root = [ split-path $(tree-root[1]) ] ; } - local locate = [ get-values : $(requirements) ] ; - if $(locate) { locate = [ split-path $(locate) ] ; } - local fake-target = [ get-values : $(requirements) ] ; - local rename-rule = [ get-values : $(requirements) ] ; - - # Supress the regular build of this target - local gSUPPRESS_FAKE_TARGETS = [ get-values : $(local-build) ] ; - - local stage-dir = $(name:G=) ; - local files ; - local file-mode ; - local file-tagged ; - local file-subdir ; - - # Prevent built object from getting deleted so that when targets are linked - # multiple times they are available. - local KEEPOBJS = true ; - - # For each source, collect its information, and possibly generate it. - # - for local source in $(sources) - { - source = [ split-qualified-property $(source) ] ; - local source-build = [ MATCH "^<([^>]*)>" : $(source[1-2]) ] ; - source = [ expand-source-names $(source[3]) ] ; - - if $(source:G) - { - local gIN_LIB_INCLUDE = TRUE ; - - local target = $(source:D=:G=) ; - local target-id = [ target-id-of $(source) ] ; - local target-subdir = [ directory-of [ target-path-of $(source) ] ] ; - - dependent-include $(source:G=) ; - local gIMPOSED_REQUIREMENTS($(target-id)) = $(requirements) ; - local subvariants = [ expand-target-subvariants $(target-id) : $(local-build) : $(TOOLS) ] ; - - for local subvariant in $(subvariants) - { - local s-target = ; - local s-properties = ; - local s-toolset = ; - local s-variant = ; - split-target-subvariant s-target s-properties s-toolset s-variant : $(subvariant) ; - local s-subdir ; - if $(arch-subdirs) - { - local arch = [ get-values : $(s-properties) ] ; - arch ?= [ get-values : $(s-properties) ] ; - arch ?= $(OSPLAT:L) ; - if $(arch) = "default" { arch = $(OSPLAT:L) ; } - arch += [ get-values : $(s-properties) ] ; - arch += $(OS:L) ; - s-subdir = $(arch:J=-) ; - } - - local source-build-rule = [ MATCH "[`]([^`]+)[`]" : $(source-build[2]) ] ; - if ( $(s-toolset) = $(source-build[1]) || $(source-build[1]) = * ) && - ( $(s-variant) = $(source-build[2]) || $(source-build[2]) = * ) || - $(source-build-rule) && [ $(source-build-rule) $(s-toolset) $(s-variant) ] - { - - local target-subvariant = ; - { - local [ protect-subproject ] ; - enter-subproject $(target-subdir) ; - target-subvariant = - [ subvariant-target $(s-target) : $(s-properties) : $(s-toolset) $(s-variant) ] ; - } - - local sv-files = ; - for local sv in $(target-subvariant) - { - local sv-file = $(gFILES($(sv))) ; - sv-file ?= $(sv) ; - sv-files += $(sv-file) ; - } - sv-files = [ unique $(sv-files) ] ; - for local sv in $(sv-files) - { - local renamed-target ; - local split-properties = [ split-path $(s-properties[1]) ] ; - for local rr in $(rename-rule) - { - renamed-target += [ $(rr) $(sv) : $(split-properties) ] ; - } - renamed-target ?= - [ rename-target $(sv) : [ split-path $(s-properties[1]) ] : ] ; - - files += $(sv) ; - file-mode($(sv)) = $($(gTARGET_TYPE($(s-target)))MODE) ; - file-tagged($(sv)) = $(renamed-target) ; - file-subdir($(sv)) = $(s-subdir) ; - } - - } - } - } - else - { - local renamed-file ; - for local rr in $(rename-rule) - { - renamed-file += [ $(rr) $(source) ] ; - } - renamed-file ?= $(source) ; - - files += $(source) ; - file-tagged($(source)) = $(renamed-file) ; - } - } - - # Generate and collect the file copy build instructions. If we - # are getting defined in the dependent phase skip the actual instructions. - # - local destination-files = ; - local result-files = ; - local locate-target = $(locate) ; - if $(ALL_LOCATE_TARGET) - { - locate-target ?= [ join-path [ split-path $(ALL_LOCATE_TARGET) ] $(SUBDIR_TOKENS) ] ; - } - locate-target ?= [ split-path $(SUBDIR) ] ; - for local file in $(files) - { - local destination-file ; - local destination-subdir ; - if $(file:G) - { - destination-file = $(file-tagged($(file)):G=:D=) ; - destination-subdir = $(file-subdir($(file))) ; - } - else - { - destination-file = $(file-tagged($(file)):D=) ; - if $(tree-root) - { - destination-subdir = [ strip-initial $(tree-root) : [ split-path $(file:D) ] ] ; - } - } - destination-file = - [ grist-targets $(destination-file) : [ split-path $(stage-dir) ] $(destination-subdir) ] ; - destination-files += $(destination-file) ; - { - local FILEMODE = $(FILEMODE) ; - if $(file-mode($(file))) { FILEMODE = $(file-mode($(file))) ; } - MakeLocate $(destination-file) : - [ FDirName $(locate-target) [ split-path $(stage-dir) ] $(destination-subdir) ] ; - for local df in $(destination-file) - { - result-files += $(df) ; - FileClone $(df) : $(file) ; - } - local target = $(stage-id) $(destination-subdir) $(destination-file:G=) ; - declare-fake-targets $(target:J=/) : $(destination-file) ; - } - } - - # Don't expose fake targets when suppressing default builds. - # But honor requirement to expose sources through given . - # - if ! $(fake-target) - { - declare-fake-targets $(stage-id:G=) : $(destination-files) ; - } - else - { - if $(gSUPPRESS_FAKE_TARGETS) - { - declare-fake-targets $(fake-target) : $(files) ; - } - else - { - declare-fake-targets $(fake-target) : $(destination-files) ; - } - } - - Clean clean : $(destination-files) ; - - return $(result-files) ; - - } -} - -# GIVEN: -# -# A bare target, either with or without grist. -# -# RETURNS: -# -# The fully qualified and gristed target ID. -# -# EXAMPLE: -# -# [ target-id-of ../../sub1/sub2/test.dll ] -# -# RETURNS: -# -# test.dll -# -rule target-id-of ( target-ref ) -{ - local grist = $(target-ref:G) ; - local target = $(target-ref:G=) ; - while $(target:G) - { - grist += $(target:G) ; - target = $(target:G=) ; - } - local path = [ directory-of $(target) ] ; - if ! [ MATCH "^(@)" : $(path) ] - { - path = [ join @$(PROJECT) [ simplify-path-tokens [ top-relative-tokens $(path) ] ] : / ] ; - } - local tokens = [ split-path $(path) ] ; - local project-name = [ MATCH "^@([^/\\]+)" : $(tokens[1]) ] ; - if $(project-name) - { - tokens = $(tokens[2-]) ; - } - project-name ?= $(PROJECT) ; - local SOURCE_GRIST = [ FGrist @$(project-name) [ simplify-path-tokens $(tokens) ] ] ; - local target-id = [ FGristFiles $(target:D=) ] ; - return $(target-id) ; -} - -# -# -rule target-path-of ( target-ref ) -{ - local grist = $(target-ref:G) ; - local target = $(target-ref:G=) ; - while $(target:G) - { - grist += $(target:G) ; - target = $(target:G=) ; - } - local path = [ directory-of $(target) ] ; - if ! [ MATCH "^(@)" : $(path) ] - { - path = [ join @$(PROJECT) [ simplify-path-tokens [ top-relative-tokens $(path) ] ] : / ] ; - } - path = $(path)/$(target:D=) ; - if $(grist) - { - path = $(grist:J="")$(path) ; - } - return $(path) ; -} - -# Common rules for generating a single tag based on the -# variant, build properties, and the toolset used to build. -# To use place this rule name in the requirementes section of -# a stage target. -# -# The tag is constructed as such: -# -# [-][-][-][-] -# -# maps to an abbreviated name of the toolset -# and when possible and applicable the version of the toolset. -# -# "mt" when multi-threading is enabled. -# -# adds these single letter tags: -# "s" when static linking to runtime -# "g" when linking to debug runtime -# "y" when building debug-python variants -# "d" when building debug variants -# "p" when building with stlport libraries -# "n" when building with stlport and using native iostreams -# -# The tag added is a to allow for additional tags. -# -rule common-variant-tag ( toolset variant : properties * ) -{ - local tags = ; - - local thread-tag = ; - if multi in $(properties) { thread-tag = mt ; } - - local runtime-tag = ; - if static in $(properties) { runtime-tag += s ; } - if debug in $(properties) { runtime-tag += g ; } - if [ MATCH .*(debug-python).* : $(variant) ] { runtime-tag += y ; } - else { if [ MATCH .*(debug).* : $(variant) ] { runtime-tag += d ; } } - if [ MATCH .*(stlp).* : $(toolset) ] || - [ MATCH .*(stlp).* : $(properties:G) ] - { runtime-tag += p ; } - if off in $(properties) { runtime-tag += n ; } - - local toolset-tag = ; - if ! $(gUNVERSIONED_VARIANT_TAG) - { - local include-minor-version = YES ; - switch $(toolset) - { - case borland* : toolset-tag += bcb ; - case como* : toolset-tag += como ; - case cwpro8* : toolset-tag += cw 8 ; - case cwpro9* : toolset-tag += cw 9 ; - case cw-* : toolset-tag += cw ; include-minor-version = ; - 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 += vc ; - toolset-tag += [ MATCH "vc([678])[_]([0123456789]*)" : $(toolset) ] ; - } - case vc[678]* : - { - toolset-tag += vc ; - toolset-tag += [ MATCH "vc([678])" : $(toolset) ] ; - } - case * : - toolset-tag += [ MATCH "^([^-]*)" : $(toolset) ] ; - } - if $(include-minor-version) - { - toolset-tag += [ MATCH "[-]([0123456789]+)[_.]([0123456789]*)" : $(toolset) ] ; - } - else - { - toolset-tag += [ MATCH "[-]([0123456789]+)[_.][0123456789]*" : $(toolset) ] ; - } - - # boost/config/auto_link.hpp expects toolset tags that do not always - # match the above algorithm for MSVC 6.x and 7.0. - # - switch $(toolset-tag:J=) - { - case vc6* : toolset-tag = vc 6 ; - case vc70 : toolset-tag = vc 7 ; - } - } - - local version-tag = ; - if ! $(gUNVERSIONED_VARIANT_TAG) - { - local version-number = [ get-values : $(properties) ] ; - version-number ?= $(BOOST_VERSION) ; - version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(version-number[1]) ] ; - if $(version-tag[3]) = 0 - { - version-tag = $(version-tag[1-2]) ; - } - version-tag = $(version-tag:J="_") ; - } - - tags += $(toolset-tag:J=) ; - tags += $(thread-tag:J=) ; - tags += $(runtime-tag:J=) ; - tags += $(version-tag) ; - - if $(tags) - { - return $(properties) <*><*>-$(tags:J=-) ; - } - else - { - return $(properties) ; - } -} - -# Recursive version of GLOB. Builds the glob of files while -# also searching in the subdirectories of the given root. -# -rule glob-tree ( root : patterns * ) -{ - local e ; - local f = [ GLOB $(root) : $(patterns) ] ; - local files ; - for e in $(f) - { - if $(e:D=) != CVS { files += $(e) ; } - } - local d = [ difference [ GLOB $(root) : * ] : $(files) ] ; - for e in $(d) - { - if ! ( $(e:D=) in . .. ) { files += [ glob-tree $(e) : $(patterns) ] ; } - } - return $(files) ; -} - -rule unless ( test * : no-value * : yes-value * ) -{ if ! $(test) { return $(no-value) ; } else { return $(yes-value) ; } } - -rule cond ( test * : yes-value * : no-value * ) -{ if $(test) { return $(yes-value) ; } else { return $(no-value) ; } } - -# If the toolset matches the given regex pattern, modify the -# subvariant-path and properties for static linking -rule force-NT-static-link ( pattern : toolset : subvariant-path properties * ) -{ - if $(NT) && [ MATCH $(pattern) : $(toolset) ] - { - properties = [ impose-requirements $(properties) : - static ] ; - } - - return $(subvariant-path) $(properties) ; -} - -# Stick this rule name in your requirements if you are building code -# which requires locale support. It handles the metrowerks-specific -# case that locale support demands the static version of the runtime -# library. -rule std::locale-support ( toolset variant : subvariant-path properties * ) -{ - return [ - force-NT-static-link .*(cw-8).* - : $(toolset) : $(subvariant-path) $(properties) - ] ; -} - -# Stick this rule name in your requirements if you are building code -# which requires facet support. It handles the intel-win32-specific -# case that facet support seems to demand the static version of the -# runtime library. -rule std::facet-support ( toolset variant : subvariant-path properties * ) -{ - return [ - force-NT-static-link .*(intel).* - : $(toolset) : $(subvariant-path) $(properties) - ] ; -} - -# load the specified modules if they haven't been loaded already. If -# the module has no suffix, ".jam" is appended. If the module name is -# prepended with a path, it is sought in that location relative to the -# current Jamfile, otherwise it is sought in BOOST_BUILD_PATH. -rule import ( modules + ) -{ - for local name in $(modules) - { - local search = $(BOOST_BUILD_PATH) ; # search here - local n = $(name:D=) ; # for this basename - if ! $(n:S) - { - n = $(n).jam ; - } - - # if a directory was specified - local d = $(name:D) ; - if $(d) - { - # Normalize the path relative to the invocation directory. - n = [ root-paths $(n) : $(d:R=$(SUBDIR)) ] ; - n = [ root-paths $(n) : [ PWD ] ] ; - search = ; # no searching; the path was specified. - } - - SEARCH on $(n) = $(search) ; - - if ! $($(n).included) - { - include $(n) ; - $(n).included = true ; - } - } -} - -# Declare a project's installable sources (raw sources or built targets) -# -rule install ( - name # The name to refer to these set of targets/sources. - type # The type of targets/sources, and therefore their install location. - : sources + # The targets and sources to make available for installation. - : options * - ) -{ - if $(gINSTALL_SOURCES) - { - local _include_ ; - if $(gINSTALL_INCLUSIONS) - { - if $(name) in $(gINSTALL_INCLUSIONS) - { - _include_ = true ; - } - } - else if ! $(name) in $(gINSTALL_EXCLUSIONS) - { - _include_ = true ; - } - if $(_include_) - { - local result ; - for local source in $(sources) - { - result += [ target-path-of $(source) ] ; - } - if ! $(result) in $(gINSTALL_SOURCES($(type))) - { - gINSTALL_SOURCES($(type)) += $(result) ; - } - return $(result) ; - } - } -} - -# -rule install-subinclude ( jamfiles + : options * ) -{ - local gINSTALL_SOURCES = TRUE ; - local gIN_LIB_INCLUDE = TRUE ; - local gINSTALL_EXCLUSIONS = [ get-values : $(options) ] ; - local gINSTALL_INCLUSIONS = [ get-values : $(options) ] ; - - for local jamfile in $(jamfiles) - { - local sub-jamfile = [ relative-path $(jamfile) ] ; - dependent-include $(sub-jamfile) ; - } -} - -# get project installation sources of a given type -rule install-sources ( type ) -{ - return $(gINSTALL_SOURCES($(type))) ; -} - -rule common-names ( ) -{ - return common-variant-tag ; -} -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 dynamic in $(properties) { requirements += multi ; } - } - case cwpro9* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case cw* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case msvc* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - if [ MATCH .*(stlp).* : $(toolset) ] || - [ MATCH .*(stlp).* : $(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 += multi ; - } - } - case vc* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - if [ MATCH .*(stlp).* : $(toolset) ] || - [ MATCH .*(stlp).* : $(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 += multi ; - # STLPort doesn't support off with vc7 and vc8. - # This is essentially a usage-requirement on the stlport library. - switch $(toolset) - { - case vc7* : requirements += on ; - case vc8* : requirements += on ; - case vc-7* : requirements += on ; - case vc-8* : requirements += on ; - } - } - # vc8 doesn't have any single threaded runtime - switch $(toolset) - { - case vc-8* : requirements += multi ; - } - } - case intel-win32* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case iw* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - } - if 5.0 in $(properties) - { - # STLPort-5 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 += multi ; - } - return $(subvariant-path) [ impose-requirements $(properties) : $(requirements) ] ; -} - -# Utility, to impose a subset of requirements onto a property set. -rule impose-requirements ( properties * : requirements * ) -{ - local requirements = [ unique $(requirements) ] ; - local free-feature-requirements = [ segregate-free-properties properties ] ; - properties = - [ sort - [ difference $(properties) : [ get-properties $(requirements:G) : $(properties) ] ] - $(requirements) - ] - $(free-feature-requirements) - ; - return $(properties) ; -} diff --git a/v1/bootstrap.jam b/v1/bootstrap.jam deleted file mode 100644 index 323b775b6..000000000 --- a/v1/bootstrap.jam +++ /dev/null @@ -1,43 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# 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) - -# -# Enforce toolset names to be lowercase for consistency. This also -# removes bugs for incompatible names on file systems that are -# case-insensitive. -# -TOOLS = $(TOOLS:L) ; - -SEARCH on allyourbase.jam = $(BOOST_BUILD_PATH) ; -include allyourbase.jam ; -SEARCH on boost-base.jam = $(BOOST_BUILD_PATH) ; -include boost-base.jam ; - -# -# Now include the user's Jamfile. -# -{ - load-jamfiles $(JAMFILE) ; -} - -# -# Cause the targets specified in the command line to be updated -# -if $(JAM_VERSION) && $(JAM_VERSION:J="") >= 030101 && $(JAM_VERSION:J="") < 030104 -{ - # Only the last invocation of UPDATE takes effect; we must - # accumulate the entire list before invoking UPDATE. I always - # thought this was a confusing semantics, and probably the fact - # that the author of UPDATE got it wrong is proof. - - local t ; - for local e in $(ARGV[2-]) - { - if ! [ MATCH "^(-).*" : $(e) ] - { - t += $(e) ; - } - } - UPDATE $(t) ; -} diff --git a/v1/borland-5_5_1-tools.jam b/v1/borland-5_5_1-tools.jam deleted file mode 100644 index 20088776c..000000000 --- a/v1/borland-5_5_1-tools.jam +++ /dev/null @@ -1,14 +0,0 @@ -# (C) Copyright David Abrahams 2002. -# 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. -#//Borland -{ - BCCROOT = $(BCC_551_ROOT) ; - extends-toolset borland ; - C++FLAGS = [ difference $(C++FLAGS) : -WU ] ; - CFLAGS = [ difference $(CFLAGS) : -WU ] -DBOOST_ALL_NO_LIB=1 ; - LINKFLAGS = [ difference $(LINKFLAGS) : -WU ] ; -} diff --git a/v1/borland-5_6_4-tools.jam b/v1/borland-5_6_4-tools.jam deleted file mode 100644 index d92f83b5b..000000000 --- a/v1/borland-5_6_4-tools.jam +++ /dev/null @@ -1,14 +0,0 @@ -# (C) Copyright David Abrahams 2002. -# 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. -#//Borland -{ - BCCROOT = $(BCC_564_ROOT) ; - extends-toolset borland ; - C++FLAGS = [ difference $(C++FLAGS) : -WU ] ; - CFLAGS = [ difference $(CFLAGS) : -WU ] -DBOOST_ALL_NO_LIB=1 ; - LINKFLAGS = [ difference $(LINKFLAGS) : -WU ] ; -} diff --git a/v1/borland-5_8_2-tools.jam b/v1/borland-5_8_2-tools.jam deleted file mode 100644 index 590d6e702..000000000 --- a/v1/borland-5_8_2-tools.jam +++ /dev/null @@ -1,14 +0,0 @@ -# (C) Copyright David Abrahams 2002. -# 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. -#//Borland -{ - BCCROOT = $(BCC_582_ROOT) ; - extends-toolset borland ; - C++FLAGS = [ difference $(C++FLAGS) : -WU ] ; - CFLAGS = [ difference $(CFLAGS) : -WU ] -DBOOST_ALL_NO_LIB=1 ; - LINKFLAGS = [ difference $(LINKFLAGS) : -WU ] ; -} diff --git a/v1/borland-tools.html b/v1/borland-tools.html deleted file mode 100644 index 126b2df65..000000000 --- a/v1/borland-tools.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - Boost.Build - borland toolset - - - - - - - - - - - -
-

C++ Boost

-
-

Boost.Build

- -

borland toolset

-
-
- -

Introduction

- -

Boost.Build's borland toolset - supports the Borland C++Builder (BCC - 5.5) compiler.

- -

Configuration Variables

The borland toolset responds to the - following variables which can be set in the environment or configured on - the jam command-line using - -sVARIABLE_NAME=value: - - - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
BCCROOTThe directory in which BCC was installed.(none)If not set the user must ensure that the tools, the bin directory - of BCC, is available as part of the executable search path.
-
- -

Revised - - 06 May, 2002

- -

Copyright © Dave Abrahams 2002.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/borland-tools.jam b/v1/borland-tools.jam deleted file mode 100644 index dc8c2ea89..000000000 --- a/v1/borland-tools.jam +++ /dev/null @@ -1,211 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# 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. -#//Borland - -# Borland tool definitions. -# -# Please note that wide-character support is currently disabled for Borland in -# features.jam, pending someone taking the time to figure out how to get the -# appropriate libraries into the link command line. - -# BCCROOT is the install location of the borland tools. -set-as-singleton BCCROOT ; - -# Get these variable set on the targets so that we can re-use the -# build actions for other toolsets using this one as a base. -flags borland BCC_TOOL_PATH ; - -# compute Borland tool path -# You can either put the borland bin directory in your PATH, or you can set -# BCCROOT to point at the borland installation directory -BCC_TOOL_PATH = $(BCCROOT)$(SLASH)bin$(SLASH) ; -BCC_TOOL_PATH ?= "" ; # Don't clobber adjoining text if BCCROOT isn't set - -# specify compilation and link flags -flags borland CFLAGS on : -v ; -flags borland LINKFLAGS on : -v ; -flags borland CFLAGS off : -Od ; -flags borland CFLAGS speed : -O2 ; -flags borland CFLAGS space : -O1 ; - -# Borland has inlining bugs that affect destructors -# (http://lists.boost.org/boost-testing/2005/10/2079.php). Define -# this variable to force inlining for Borland to always be shut off. -# We decided it was a bad idea to do it by default, because it would -# hide bugs that users would see. -if ! $(.BORLAND_INLINING_BUG_BRUTE_FORCE_WORKAROUND) -{ - flags borland CFLAGS off : -vi- ; - flags borland CFLAGS on : -vi -w-inl ; - flags borland CFLAGS full : -vi -w-inl ; -} -else -{ - flags borland CFLAGS : -vi- ; -} - -# build the options common to the link and C/C++ command-lines -{ - local bcc-common-flags ; - - # this section sets up the target type (threading, - # RTL, and console/GUI options). The order in which - # these options appear is generally important, as some - # (such as -tWR) can have unexpected side effects. - - - local target-type = [ get-values : $(gBUILD_PROPERTIES) ] ; - if ! $(target-type) || ! ( $(target-type) in $(SHARED_TYPES) ) - { - flags borland bcc-common-flags console : -tWC ; - # -tWR sets -tW as well, so we turn it off here and then turn it - # on again later if we need it: - flags borland bcc-common-flags dynamic : -tWR -tWC ; - flags borland bcc-common-flags gui : -tW ; - } - else - { - flags borland bcc-common-flags dynamic : -tWR ; - } - - flags borland bcc-common-flags $(SHARED_TYPES) : -tWD ; - flags borland bcc-common-flags : -WM- ; - flags borland bcc-common-flags multi : -tWM ; - - flags borland LINKFLAGS : $(bcc-common-flags) ; - flags borland CFLAGS : $(bcc-common-flags) ; -} - - -flags borland LINKFLAGS on : -WU ; -flags borland CFLAGS on : -WU ; - -flags borland CFLAGS ; -flags borland C++FLAGS ; -flags borland DEFINES ; -flags borland UNDEFS ; -flags borland HDRS ; -flags borland SYSHDRS ; -flags borland LINKFLAGS ; -flags borland ARFLAGS ; - -flags borland STDHDRS : $(BCCROOT)$(SLASH)include ; -flags borland STDLIBPATH : $(BCCROOT)$(SLASH)lib ; - -flags borland LIBPATH ; -flags borland NEEDLIBS ; -flags borland FINDLIBS ; - -# suppress some specific warnings - -flags borland C++FLAGS : -w-8001 ; - -# For detailed information about borland tools and their command-line switches, -# see http://www.objectcentral.com/vide/help/videdoc/bcc32.html - -#### Link #### - -rule Link-action -{ - # Make sure that the borland runtime dlls are in the runtime path - gRUN_PATH($(<)) += $(BCC_TOOL_PATH) ; - - with-command-file borland-Link-action $(<) : $(>) $(NEEDLIBS) ; - - if $(3) in $(SHARED_TYPES) - { - borland-IMPLIB-action $(<) : $(>) ; - } -} - -# bcc32 needs to have ilink32 in the path in order to invoke it, so explicitly -# specifying $(BCC_TOOL_PATH)bcc32 doesn't help. You need to add -# $(BCC_TOOL_PATH) to the path -if $(NT) -{ -actions borland-Link-action -{ - set "PATH=$(BCC_TOOL_PATH);%PATH%" - "$(BCC_TOOL_PATH)bcc32" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -e"$(<[1])" @"$(>)" $(FINDLIBS:S=.lib) -} -} -else -{ -actions borland-Link-action -{ - export PATH=$(BCC_TOOL_PATH):$PATH - "$(BCC_TOOL_PATH)bcc32" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -e"$(<[1])" @"$(>)" $(FINDLIBS:S=.lib) -} -} - -actions borland-IMPLIB-action bind IMPLIB -{ - $(BCC_TOOL_PATH)implib $(<[2]) $(<[1]) -} - -#### Cc ##### - -rule Cc-action -{ - borland-Cc-action $(<) : $(>) ; -} - -actions borland-Cc-action -{ - "$(BCC_TOOL_PATH)bcc32" -j5 -g255 -q -c -w -a8 -b- -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - borland-C++-action $(<) : $(>) ; -} - -# -# for C++ compiles the following options are turned on by default: -# -# -j5 stops after 5 errors -# -g255 allow an unlimited number of warnings -# -q no banner -# -c compile to object -# -P C++ code regardless of file extention -# -w turns on all warnings -# -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. -# -actions borland-C++-action -{ - "$(BCC_TOOL_PATH)bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -if ! $(BORLAND_ARCHIVE_LINESEP) -{ - if $(NT) - { - if [ W32_GETREG "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" : CurrentVersion ] - { - BORLAND-ARCHIVE-LINESEP = " ^&" ; - } - } - BORLAND-ARCHIVE-LINESEP ?= " &" ; -} - -#### Archive #### -rule Archive-action -{ - with-command-file borland-Archive-action $(<) : $(>) : + $(BORLAND-ARCHIVE-LINESEP) ; -} - -actions borland-Archive-action -{ - IF EXIST "$(<)" DEL "$(<)" - "$(BCC_TOOL_PATH)tlib" /P64 /u /a /C /$(ARFLAGS) "$(<)" @"$(>)" -} diff --git a/v1/build_system.htm b/v1/build_system.htm deleted file mode 100644 index 9747f719a..000000000 --- a/v1/build_system.htm +++ /dev/null @@ -1,1565 +0,0 @@ - - - - - - - - - - - Boost Build System - - - - - - - - - - - -
-

C++ Boost

-
-

Boost Build System

-
- -

Synopsis

- -

Boost.Build is a system for large project software construction built on - Boost.Jam, a descendant of "Perforce Jam", an open-source - make replacement[1]. Key features are:

- -
    -
  • A simple target description language
  • - -
  • Build with your choice (or multiple) toolsets from a single command - invocation
  • - -
  • Build your choice of basic variants (e.g. debug, release, profile...) - and subvariant modifications (e.g. inlining off) from a single command - invocation
  • - -
  • ``Feature Normalization'' allows target configurations to be - described independently from the toolset used
  • - -
  • Modular toolset description files allow build instructions for - different toolsets to be described independently
  • - -
  • Multiple subproject support
  • - -
  • Automatic building of subproject dependencies
  • -
- -

Status

Boost.Build v1 is a useful, - mature system. However, its design and structure are not easily adapted to - support some of the features we'd like to see in the future. To this end, - the Boost.Build developers are working on Boost.Build v2, which is pretty usable already. If - you are interested in contributing to this effort or you wish to discuss - the design of Boost.Build, please post inquiries to the Boost.Build mailing list. - -

Here are some of the design criteria that - led to these features.

- -

Table of Contents

- - - -

Getting Started

- -

Installing - Boost.Jam

Follow these instructions to acquire a - bjam executable for your platform. Install it somewhere in your path. - -

Initiating a Build

- -

Boost.Build responds to several global variable settings. The easiest - way to get going is usually to use environment variables, though you can - also set them on the command-line, using - -sVARIABLE_NAME=value. In addition to the - toolset configuration - variables, you can use the TOOLS variable to indicate which - toolset(s) to build with, and the BUILD variable to describe how - you want things built. In many cases it should be sufficient to invoke - bjam with no variable settings.

- -

Some example Boost.Jam invocations:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command Line(s)Effects
-
-bjam -sTOOLS=gcc my_target
-
-
default (debug) BUILD of - my_targetwith GCC
-
-bjam "-sTOOLS=msvc gcc"
-
-
default-build all with msvc and gcc
-
-set TOOLS=msvc
-bjam
-
-
Set an NT environment variable to always build with MSVC
- default-build all.
-
-bjam "-sBUILD=release <debug-symbols>on"
-
-
release build with debug symbols of all using default - TOOLS
-
-bjam "-sBUILD=debug release"
-
-
debug and release build all.
set TOOLS=msvc
- bjam "-sBUILD=<cxxflags>-G6"
-  
Set an NT environment variable to always build with MSVC
- default-build all, adding a compiler command line switch
set TOOLS=msvc gcc
- bjam "-sBUILD=<msvc><*><cxxflags>-G6"
-  
Set an NT environment variable to always build with MSVC and - GCC
- default-build all, adding a MSVC-specific compiler command - line switch
bjam "-sBUILD=<define>BOOST_POSIX"build all, with the macro BOOST_POSIX defined for all - compilers
- -

Setting Jam - Variables

- -

The "-s" options in the command lines above are passing - variable settings to the build system. There are actually three ways to do - that:

- -
    -
  • Jam picks up variable settings from your environment by default, so - you can set them there: - -
    -
    -> BUILD="debug release"  # assuming Unix
    -> export BUILD
    -> bjam ...
    -
    -
    This approach can be OK for quick-and-dirty tests, but - environment variable settings tend to be unstable and non-uniform - across users and machines, so it's best not to rely on the environment - much. -
  • - -
  • Explicitly on the command-line, with the "-s" option.
  • - -
  • Directly in Jam code. A project's Jamrules - file is a convenient place to make global settings.
  • -
- -

An Example - Jamfile

Here is an example of a simple subproject Jamfile. In this - example, it is assumed that the user has set BOOST_ROOT, either as - an environment variable, on the command-line or in the project's - Jamrules file: - -
-
-subproject foo/bar/baz ; # path to here from project root
-
-# A static library called 'baz'
-lib baz : baz1.cpp baz2.cpp # C++ sources
-          parser/src/baz4.ll # Lex->C++ sources
-          parser/src/baz5.yy  # Yacc->C++ sources
-        : <include>$(BOOST_PARENT_DIRECTORY)  # Put boost in #include path
-    ;
-
-# An executable called 'test'
-exe test : <lib>baz # use the 'baz' library
-           baz_test.cpp   # C++ source
-         : <include>$(BOOST_ROOT)
-    ;
-
-
- -

That's it! The build system takes care of the rest. If the you want to - be able to build all subprojects from the project root directory, you can - add a Jamfile at the root:

- -
-
-project-root ; # declare this to be the project root directory
-# Read subproject Jamfiles
-subinclude foo/bar/baz foo/bar/... ;
-subinclude a/b/c ... ; # more subincludes
-
-
- -

Support Files

- -

To use the build system, the following must be located in your project's - root directory, or in a directory specified in the - BOOST_BUILD_PATH variable. It is usually convenient to specify the - BOOST_BUILD_PATH in your project's Jamrules file. The Boost - Jamrules file shows an example.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Filename(s)Meaning
toolset-tools.jamFeature-to-command-line mapping for toolset.
features.jamAbstract toolset feature descriptions.
boost-base.jamBoost build system-specific rule definitions.
unit-tests.jamUnit tests and assertions for boost Jam code.
The boost-base.jam file is temporary, and will eventually - be compiled into our Jam executable. - -

Basic Design and Terminology

This - section gives an overview of the way that the system works, outlining the - system's capabilities and overall design. It also introduces the - terminology and concepts necessary to understand the sections on writing - Jamfiles and command-line invocations. - -

Projects and - Subprojects

- -

A project is a source directory tree containing at least one - Jamfile. The root directory of the project is known as the - project root. The root - directory of a project may contain a Jamrules file, which contains - project-specific Jam code. If the Jamrules file is not present - when Jam is invoked, a warning will be issued.

- -

Subdirectories containing Jamfiles are called subproject - directories. Each such Jamfile describes a - subproject.

- -

The build system installation directory is a directory containing - Jam files describing compilers and build variants. The installation - directory can be specified in a file called boost-build.jam in the - project root directory. This file should contain a line boost-build - $path-to-installation-dir. If no such file is available the - environment variable BOOST_BUILD_PATH will be used. This lists a - set of directories to search for the files comprising the build system. If - the installation directory is not specified, it is the same as the project - root, and BOOST_BUILD_PATH is set to include that directory.

- -

Targets

- -

Each Jamfile describes one or more main targets.

- -

Each main target is an abstract description of one or more built - targets which are expressions of the corresponding main target under - particular compilers and build variants. Intermediate files such as - .o/.obj files generated by compiling .cpp files - as a consequence of building a main target are also referred to as built - targets. The term build directory tree refers to the location of - built target files.

- -
    -
  • By default, the build directory tree is overlaid with the project - directory tree, with targets generated into a subtree rooted at the - bin subdirectory of each subproject directory (the name of this - directory can be customized by changing the BIN_DIRECTORY - variable.
  • - -
  • If the variable - ALL_LOCATE_TARGET is set, it specifies an alternate build - directory tree whose structure mirrors that of the project. In this case, - built targets of a subproject are generated into the corresponding - directory of the build directory tree.
  • -
For each main target, there is a corresponding location in the build - directory tree known as the target's build root, where all - intermediate and final targets resulting from that main target are located. - -

Features and Properties

- -

A feature is a normalized (toolset-independent) description of an - individual build parameter, such as whether inlining is enabled. Each - feature usually corresponds to a command-line option of one or more build - tools. Features come in four varieties:

- -
    -
  1. Simple features can take on any of several predetermined - values. For example, the feature optimization might take one of - the values off, speed, or space. Simple - features have a default value. The key aspect of simple features is that - they are assumed to affect link compatibility: object files generated - with different values for a simple feature are generated into a separate - directories, and (with a few exceptions) main targets generated with - different values won't be linked together.
  2. - -
  3. Free features can either be single-valued, as above, or may - take on any number of user-specified values simultaneously. For example, - the define feature for a release build might have the values - NDEBUG and BOOST_RELEASE_BUILD. Free features are - assumed not to affect link compatibility.
  4. - -
  5. Path features are free features whose values describe paths - which may be relative to the subproject (such as linked libraries or - #include search directories). The build system treats the values - of these features specially to ensure that they are interpreted relative - to the subproject directory regardless of the directory where Jam was - invoked.
  6. - -
  7. Dependency features are path features whose values describe a - dependency of built targets. For example, an external library might be - specified with a dependency-feature: if the library is updated, the - target will be updated also. The <library-file> feature - works this way [2].
  8. -
- -

A feature-value pair is known as a build property, or simply - property. The prefixes simple, free, path, and - dependency apply to properties in an analogous way to features.

- -

Build Variants

- -

A build variant, or simply variant is a named set of build - properties describing how targets should be built. Typically you'll want at - least two separate variants: one for debugging, and one for your release - code.

- -

Built targets for distinct build variants and toolsets are generated in - separate parts of the build directory tree, known as the variant - directories. For example, a (sub)project with main targets foo - and bar, compiled with both GCC and KAI for debug and - release variants might generate the following structure (target - directories in bold).

- -
-
- bin
- +-foo  <--- foo's build root
- | +-gcc
- | | +-debug
- | | `-release
- | `-kai
- |   +-debug
- |   `-release
- `-bar  <--- bar's build root
-   +-gcc
-   | +-debug
-   | `-release
-   `-kai
-     +-debug
-     `-release
-
-
- -

The properties constituting a variant may differ according to toolset, - so debug may mean a slightly different set of properties for two - different compilers.

- -

Subvariants

- -

When a target is built with simple properties that don't exactly - match those specified in a build variant, the non-matching features are - called subvariant features and the target is located in a - subvariant directory beneath the directory of the base variant. This - can occur for two reasons:

- -
    -
  1. Some features are only relevant to certain compilers. When relevant - simple features have no value specified in the build variant, a value - must be chosen. Even when the default value is used, the target is - generated into a subvariant directory. For example, the - runtime-link feature may be unspecified in the debug - variant, but relevant to MSVC. In that case, a fragment of the target - tree might look like: - -
    -
    - bin
    - +-foo  <--- foo's build root
    - | +-msvc
    - | | +-debug
    - . . . `-runtime-link-dynamic
    - . . .
    -
    -
    Because the default value of runtime-link is - dynamic, when the debug variant is requested, the - runtime-link-dynamic subvariant of foo is built.
    -
    -
  2. - -
  3. It is possible to request (either on the command-line, or as part of - a main target description) that particular subvariants be built. For - example, it may be desirable to generate builds that link to the runtime - both statically and dynamically. In that case, both subvariant - directories in the example above would be generated: - -
    -
    - bin
    - +-foo  <--- foo's build root
    - | +-msvc
    - | | +-debug
    - . . . +-runtime-link-dynamic
    - . . . `-runtime-link-static
    - . . .
    -
    -
    -
  4. -
In no case will targets be built directly into - bin/foo/msvc/debug, since the debug variant doesn't - include the runtime-link feature, which is relevant to MSVC. - -

When a subvariant includes multiple subvariant features, targets are - built into a subvariant directory whose path is determined by concatenating - the properties sorted in order of their feature names. For example, the - borland compiler, which uses different libraries depending on whether the - target is a console or GUI program, might create the following structure - for a DLL:

- -
-
- bin
- +-foo  <--- foo's build root
- | +-msvc
- | | +-debug
- | | | +-runtime-link-dynamic
- | | | | +-user-interface-console
- | | | | `-user-interface-gui
- . . . `-runtime-link-static
- . . .   +-user-interface-console
- . . .   `user-interface-gui
-
-
- -

Any configuration of properties for which a target is built, whether - base variant or subvariant, is known as a build configuration, or - simply a build.

- -

Dependent Targets

- -

When a main target depends on the product of a second main target (as - when an executable depends on and links to a static library), each build - configuration of the dependent target is depends on the - corresponding build of the dependency. Because only simple features - participate in build identity, the dependent and dependency targets may - have completely different free features. This puts the onus on the user for - ensuring link-compatibility when certain free properties are used. For - example, when assert() is used in header files, the preprocessor - symbol NDEBUG can impact link-compatibility of separate - compilation units. This danger can be minimized by encapsulating such - feature differences inside of build variants.

- -

Usage

- -

This section describes how to start a build from the command-line and - how to write project and subproject Jamfiles. It also describes the other - files written in the Jam language: build-tool specification files, feature - descriptions files.

- -

The Command Line

- -

This section describes in detail how the build system can be - invoked.

- -

User Targets

- -

The Jam command line ends with an optional list of target names; if no - target names are supplied, the built-in pseudotarget all is built. - In a large project, naming targets can be dicey because of collisions. Jam - uses a mechanism called grist to distinguish targets that would otherwise - have the same name. Fortunately, you won't often have to supply grist at - the command-line. When you declare a main target, a Jam pseudotarget of the - same name is created which depends on all of the subvariants - requested for your invocation of the build system. For example, if your - subproject declares:

- -
-
-exe my_target : my_source1.cpp my_source2.c ;
-
-
and you invoke Jam with -sBUILD="debug - release" my_target, you will build both the debug and release - versions of my_target. - -

These simple, ungristed names are called user targets, and are - only available for the subproject where Jam is invoked. That way, builds - from the top level (which may include many Jamfiles through the subinclude - rule) and builds of library dependencies (which may live in other - subprojects), don't collide. If it is necessary to refer more explicitly to - a particular target from the command-line, you will have to add ``grist''. - Please see this section for a more complete - description of how to name particular targets in a build.

- -

Global Variables

- -

This is a partial list of global variables that can be set on the - command-line. Of course you are free to write your own Jam rules which - interpret other variables from the command-line. This list just details - some of the variables used by the build system itself. Note also that if - you don't like the default values you can override them in your project's - Jamrules file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable DefaultExampleNotes
TOOLS - Platform-dependent"-sTOOLS=gcc msvc"build with gcc and msvc
-sTOOLS=gccbuild with gcc
BUILD - - debug-sBUILD=releasebuild the release variant
"-sBUILD=debug release"build both debug and release variants
"-sBUILD=<optimization>speed"build a subvariant of the default variant (debug) with - optimization for speed.
"-sBUILD=debug release - <runtime-link>static/dynamic"build subvariants of the debug and release variants that link to - the runtime both statically and dynamically.
ALL_LOCATE_TARGET - - empty-sALL_LOCATE_TARGET=~/buildGenerate all build results in the build subdirectory of - the user's home directory (UNIX).
This section describes how to write a Jamfile for a subproject. - -

SubProject - Jamfiles

- -

The subproject - rule

- -

A subproject's Jamfile begins with an invocation of the - subproject rule that specifies the subproject's location relative - to the top of the project tree:

- -
-
-subproject path-from-top ;
-
-
- -

The subproject rule tells the build system where to place built - targets from the subproject in case ALL_LOCATE_TARGET is used to - specify the build directory tree. If there is a Jamfile in the project root - directory, you should use the project-root rule instead:

- -
-
-project-root ;
-
-
- -

Describing Main - Targets

- -

A main target is described using the following syntax:

- -
-
-target-type name : sources
-    [ : requirements [ : default-BUILD ] ] ;
-
-
- -
    -
  • target-type may be one of exe, lib, - dll, stage or template. These are actually - names of Jam rules. Additional main target rules are possible; see - status/Jamfile or - libs/python/build/Jamfile - for examples.
    -
  • - -
  • name specifies the name of the main target, multiple targets - with the same name are allowed but only if they are of different types. - Normally this is not the name of the final target file generated. The - target file name depends on the type of target which controls how the - base target name is renamed to conform to platform conventions. For - exes the name might be the same or *.exe. For - libs the name might be *.lib or lib*.a. And - for dlls the name might be *.dll or lib*.so. - For platform specific naming consult the allyourbase.jam file in the build system.
    -
  • - -
  • - sources is a list of paths to source files and dependency - targets. The syntax for - dependency targets is described by the following grammar: - -
    -
    -dependency-target -> type-tag location target-name
    -
    -type-tag -> "<template>" | "<lib>" | "<dll>" | "<exe>"
    -
    -location -> ( @project-id/ )? relative-path
    -
    -relative-path -> ( path-element/ ) *
    -
    -
    The location specifies the location of a Jamfile in - which a dependency target called target-name can be - found, declared with the given type-tag. Other type-tags - are possible; for example the python.jam - module defines Python extensions with the "<pyd>" - tag. If @project-id is specified, the - relative-path is interpreted with respect to the root directory - of the specified project. Otherwise, it - is interpreted with respect to the directory of the current Jamfile. - -

    The dependency's type-tag is also used to decide how to link - to it when needed. <lib> targets are linked statically - and <dll> targets are linked dynamically. On Unix - platforms dynamic linking will use (the appropriate platform equivalent - of) LD_LIBRARY_PATH and the "-l" linker flag to avoid - creating executables which expect to find dynamic libraries in - particular locations in the filesystem.

    - -

    NOTE: It is important to match the type-tag dependency - with the type of the dependency target. Trying to specify a - type-tag of <lib> when the target is defined as a - <dll> will cause an error.


    -
  • - -
  • - requirements specifies the build - properties intrinsic to the target. Requirements are given as sets of - optionally-qualified build properties: - -
    -
    -[[<compiler>]<variant>]<feature>value
    -
    -
    <compiler> and - <variant>, if supplied, can be used to restrict - the applicability of the requirement. Either one may be replaced by - <*>, which is the same as omitting it. - -

    The system checks that simple feature requirements are not violated - by explicit subvariant build requests, and will issue a warning - otherwise. Free features specified as requirements are simply added to - each corresponding build configuration.


    -
  • - -
  • - default-BUILD - specifies the configurations that should be built if the BUILD variable is not otherwise specified. Any - elements not beginning with ``<...>'' refer to - build variants. Other elements use the same syntax as the requirements described above, except that - multiple values may be specified for a simple feature by separating - them with a slash, forming (qualified) multi-valued properties: - -
    -
    -[[<compiler>]<variant>]<feature>value1[/value2...]
    -
    -
    When multiple values are specified, it causes all - the implied configurations to be built by default. It is also possible - to prevent any default builds from occurring on this target by using - <suppress>true . This suppresses any local targets, - either implicit or explicit, from building. But, this does not prevent - implied targets as required by a dependency by another target to this - one from being built. This is useful, for example, for defining a set - of libraries generically and having them built only when another target - like an exe is built. Such use might look like: - -
    -
    -lib basic : basic.cpp : : <suppress>true ;
    -
    -exe test : test.cpp <lib>basic ; -
    -
    With that the basic library will only be built - when the test executable is built, and only the variations - required by the executable will be built.
    -
  • -
- -

NOTE: for simple features in both requirements and default-BUILD, more-specific qualification - overrides less-specific.

- -

Describing Template - Targets

- -

Template targets provide a way to handle commonalities between projects - targets. They have the same form as main - targets but do not initiate build requests. A target that lists a - template as a dependency inherits all the settings from the template, i.e. - the templates sources, requirements and default build settings will be - added to the targets settings. Paths mentioned in a template definition are - always relative to the subdirectory of the Jamfile containing the templates - definition, regardless of the subdirectory of the dependent main target. - Typically a project will have at least one template target that handles - defines, include paths and additional compiler flags common to all targets - in the project.

- -

Describing Stage - Targets

- -

Stage targets are a special kind of target that don't build a single - file but to a collection of files. The goal is to create a directory which - is composed of the various files that other targets generate, or individual - files. When built a stage target creates a directory with the same name as - the target, and copies the dependent files to it. The form of the target is - the same as that of main targets with some - differences...

- -
    -
  • target-type is stage. See libs/regex/build/Jamfile for - an example.
    -
  • - -
  • Name specifies the name of the stage and is the name of the - directory created.
    -
  • - -
  • sources is the same as main targets and one can list both - generated targets like <exe>test_exe and individual files, - but not template targets.
    -
  • - -
  • - Requirements the build properties specified are used as with - main targets. But one additional type of requirement is possible: - <tag>... A tag specifies how to "augment" the names of - the copied files. This is needed to distinguish the various files if - you're collecting different builds of the same targets. The syntax is: - -
    -
    -<tag><feature|variant>value
    -
    -

    - If the feature or variant is present - for the a target the file for that target is renamed to include the - given value between the basename and the suffix. Two - special tags, <tag><prefix> and - <tag><postfix>, let one prepend and append a value - to the "augmentation" respectively.
    -
    -
  • - -
  • default-BUILD acts in the same manner as a main - target.
  • -
- -

Example

- -

This artificially complex example shows how two executables called "foo" - and "fop" might be described in a Jamfile. All common settings are factored - out in the templates "base" and "executable". Foo is composed of the - sources ./foo.cpp and ./src/bar.cpp (specified relative - to the directory in which the Jamfile resides). Fop only has one sourcefile - ./fop.cpp. Both executables link against the built target which - results from building the target baz as described in - ../bazlib/Jamfile.

- -
-
-template base : 
-    ## Requirements ##
-    : <include>../bazlib/include 
-      <define>BUILDING_FOO=1
-      <release><define>FOO_RELEASE
-      <msvc><*><define>FOO_MSVC
-      <msvc><release><define>FOO_MSVC_RELEASE
-      <gcc><*><optimization>off
-      <gcc><release><optimization>space
-      <threading>multi
-      <sysinclude>/usr/local/foolib/include
-    
-    ## default-BUILD ##
-    : debug release
-      <debug><runtime-link>static/dynamic
-    ;
-
-template executable : <template>base <lib>../bazlib/baz ;
-
-exe foo : <template>executable foo.cpp src/bar.cpp ;
-
-exe fop : <template>executable fop.cpp ;
-
-
- -

The requirements section:

- -
    -
  • Adds ../bazlib/include to the #include path
  • - -
  • Sets the preprocessor symbol BUILDING_FOO to 1
  • - -
  • In the release builds, #defines - FOO_RELEASE.
  • - -
  • When built with MSVC, #defines FOO_MSVC.
  • - -
  • In release variants built with MSVC, #defines - FOO_MSVC_RELEASE.
  • - -
  • Most builds under GCC have optimization turned off, but...
  • - -
  • ...GCC release builds require optimization for space.
  • - -
  • Requires multithread support on compilers where it's relevant.
  • - -
  • Adds /usr/local/foolib/include to the #include - <*> path
  • -
- -

The default-BUILD section:

- -
    -
  • specifies that debug and release base variants are - built by default.
  • - -
  • on compilers where the feature is relevant, requests both statically- - and dynamically-linked subvariants of the debug variant.
  • -
- -

Using External - Projects

To use dependencies such as libraries from another project - tree, first use the project rule to declare a project id and - location for the external project. Then add the appropriate external - dependency target specification to your program's - list of sources. For example, if you are developing a program which uses - the Boost.Threads library, you might write - -
-
-project boost : /home/dave/boost-cvs ;
-
-
in your Jamrules file, and place - -
-
-<dll>@boost/libs/thread/build/boost_thread
-
-
in your target's list of sources. - -

Requirement - Rules

- -

Target requirements support the use of auxiliary rules to allow for more - complex decisions about the requirements. If specified, by using the name - of a rule in the requirements, the rule is called with the signature: ( - toolset variant : subvariant-path properties * ) and should return the - modified set of properties. There are a number of built-in rules for some - common tasks that Boost uses, and you can use:

- -
- - - - - - - - - - - - - - - - - - - - - - - - -
RuleEffects
std::locale-supportEnsures that locale support is available for the target. For - example some toolsets, like CodeWarrior, locale support is only - available on specific platforms using a static runtime.
std::facet-supportEnsures that facet support is available for the target.
common-variant-tag -

Adds a constructed prefix tag to the target to conform to the - Boost common naming conventions for libraries. The tag is - constructed as:

- -
- [-<toolset-tag>][-<thread-tag>][-<runtime-tag>][-<version-tag>] -
- -
    -
  • <toolset-tag> maps to an abbreviated name of the - toolset and when possible, and applicable, the version of the - toolset.
  • - -
  • <thread-tag> "mt" when multi-threading is enabled.
  • - -
  • <runtime-tag> adds these single letter tags:
    -   "s" when static linking to runtime
    -   "g" when linking to debug runtime
    -   "y" when building debug-python variants
    -   "d" when building debug variants
    -   "p" when building with stlport libraries
    -   "n" when building with stlport and using native - iostreams
  • - -
  • <version-tag> adds "major_minor" from a - <version> property. Defaults to using - $(BOOST_VERSION) if no version property is present.
  • -
-
-
- -

Install - Descriptions

- -

Installable files and targets are described with:

- -
-
-install name type : sources... : [options]... ;
-
-
- -

Install descriptions define files and targets that can be installed by - use of a stage target.

- -
    -
  • name specifies the name to group the given files and targets - as a collective entity. Multiple install descriptions can use - the same name, in which case they are all collected into a single - group.
    -
  • - -
  • type indicates the type of files specified by the - install. This is used to later install files from different - groups but with the same type.
    -
  • - -
  • sources can list both generated targets like - <exe>test_exe and individual files, but not template - targets.
    -
  • - -
  • options additional options, currently none defined.
  • -
- -

Install descriptions are meant to be used by stage targets to - collect the various sources of many install descriptions into one or more - destination directories. For this there are two rules that help in getting - the sources specified:

- -
    -
  • install-subinclude jamfiles... : - [options]...
    -
    - Includes the listed Jamfiles to read in the install descriptions. - Multiple <exclude>name options can be used to - exclude the named groups of install descriptions from getting - defined.
    -
  • - -
  • install-source type
    -
    - Returns the list of sources and targets specified by the install for the - given type. The returned list can be used as the sources for a - stage target which would place all the sources into that - stage.
    -
  • -
- -

Feature - Descriptions

- -

Features are described by stating the feature type (simple features are - specified with "feature"), followed by the feature name. An - optional second argument can be used to list the permissible values of the - feature. Examples can be found in features.jam.

- -

Variant - Descriptions

- -

Variants are described with the following syntax:

- -
-
-variant name [ : parent-name] : [<toolset-name>]<feature>value... ;
-
-
The variant rule specifies the list of properties - comprising a variant. Properties may be optionally qualified with a toolset - name, which specifies that the property applies only to that toolset. One - or more parent variants may be specified to inherit the properties -  from those parent(s). For inherited properties precedence is given on - a left to right order, making the immediate properties override those in - the parent(s). This can be used to great effect for describing global - properties that are shared amongst various variants, and therefore targets. - For example: - -
-
-variant my-globals : <rtti>off ;
-
-variant my-debug : my-globals debug ;
-
-variant my-release : my-globals release ;
-
-
More examples can be found in features.jam. - -

Toolset - Description Files

- -

Toolset descriptions are located in the project's root directory, or a - directory specified by BOOST_BUILD_INSTALLATION, which may be set - in a Jamfile or the project's Jamrules file. Each file is called - toolset-name-tools.jam, where toolset-name is the - name of the toolset. The toolset description file has two main jobs:

- -
    -
  1. redefine the following rules: - -
      -
    • Link-action - links an executable from objects and - libraries
    • - -
    • Archive-action - links a static library from object - files
    • - -
    • C++-action - compiles a 'C++' file into an object - file
    • - -
    • Cc-action - compiles a 'C' file into an object file
    • -
    These rules should simply invoke the action part of a rule whose - name is uniquely defined for the toolset. For example, - -
    -
    -rule C++-action
    -{
    -    msvc-C++-action $(<) : $(>) ;
    -}
    -
    -actions msvc-C++-action
    -{
    -    cl -nologo -GX -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I$(HDRS) -I$(STDHDRS) -Fo$(<) -Tp$(>)
    -}
    -
    -
    -
    Note that Link-action may require special care: - on platforms where the global variable gEXPORT_SUFFIX(DLL) is - defined (e.g. Windows), the first argument may have two elements when - linking a shared library. The first is the shared library target, and - the second is the import library target, with suffix given by - $(gEXPORT_SUFFIX(DLL)). It will always have a third argument - which is either ``EXE'' or ``DLL''. This can be used - to dispatch to different actions for linking DLLs and EXEs if - necessary, but usually it will be easier to take advantage of the - special <target-type> feature, which will have the same - value using the flags rule described below. -
  2. - -
  3. Translate build settings given in the global - gBUILD_PROPERTIES variable into something that can be used by - the toolset. The build system provides the flags rule to help - translate build properties into elements of global variables which are - later attached to targets so that they can affect the build actions. The - flags rule is used as follows: - -
    -
    -flags toolset variable condition [: value...]
    -
    -
    The parameters are: - -
      -
    • toolset - the name of the toolset
    • - -
    • variable - the name of a global variable which can be used - to carry information to a command-line
    • - -
    • - condition - one one or more elements in the following forms: - -
        -
      1. a property-set of the form: - <feature>value[/<feature> - value...]
      2. - -
      3. <feature>
      4. -
      -
    • - -
    • values - anything
    • -
    - -

    Semantics only affect targets built with the specified toolset, and - depend on the target's build configuration:

    - -
      -
    1. if any specified property-set is a subset of the target's build - properties, the values specified in $(3) will be - appended once to variable.
    2. - -
    3. The value of each specified feature that participates in the - target's build properties is appended to variable. In either - case, the variable will be set "on" the target so it may be used in - the build actions.
    4. -
    -
  4. -
- -

Example

- -

The description of the flags rule above is actually more - complicated than it sounds. For example, the following line might be used - to specify how optimization can be turned off for MSVC:

- -
-
-flags msvc CFLAGS <optimization>off : /Od ;
-
-
It says that the string /Od should be added to the - global CFLAGS variable whenever a build configuration includes the - property <optimization>off. - -

Similarly, in the following example,

- -
-
-flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
-
-
we add /MD to the CFLAGS variable when both of the - specified conditions are satisfied. We could grab all of the values of the - free feature <include> in the HDRS variable as - follows: - -
-
-flags msvc HDRS <include> ;
-
-
- -

The use of these variables should be apparent from the declaration of - actions msvc-C++-action in the previous section.

- -

Internals

- -

Target Names

- -

In addition to user targets, which - correspond directly to the names the user writes in her subproject Jamfile, - several additional targets are generated, regardless of the directory from - which Jam was invoked:

- -
    -
  • A main target has all the same dependencies as a user target - (i.e. building it updates all requested subvariants). Its name is the - same except for the addition of $(SOURCE_GRIST), which - identifies the subproject. The identification looks like the names of the - path components from the project root to the subproject, separated by - exclamation points. Thus, if the project is rooted at foo, in - the subproject at foo/bar/baz the target my_target is - identified by <bar!baz>my_target.
  • - -
  • A subvariant target has additional grist identifying its main - target and subvariant. This grist is joined to $(SOURCE_GRIST) - with the platform's directory separator. Thus, on UNIX, a subvariant - target of my_target above might be identified as - <bar!baz/my_target/optimization-space/runtime-link-static>my_source.o. - Note that the part of the grist following the first slash, known as the - subvariant id, also corresponds to a fragment of the subvariant - directory path where the corresponding target is generated. Most built - targets will be identified this way.
  • -
- -

Global - Variables

- -

This section describes some of the global variables used by the build - system. Please note that some parts of the system (particularly those in - allyourbase.jam) are heavily based on the Jambase file supplied - with Jam, and as such do not follow the conventions described below.

- -

Global variables used in the build system fall into three - categories:

- -
    -
  • Global variables intended to be set by the user on the command-line - or in the environment use ALL_UPPER_CASE names.
  • - -
  • Internal global variables begin with a lower-case "g" and continue in - upper-case: gSOME_GLOBAL
  • - -
  • Global variables of the form: - gBASE_NAME(arguments), where arguments is - a comma-separated argument list, are used internally to achieve a kind of - indirection by concatenating variable values: - -
    -
    -    ECHO $(gFUBAR($(x),$(y))) ;
    -
    -
    -
  • -
- -

Please note that the build system commonly takes advantage of Jam's - Dynamic Scoping feature (see the local command in the "Flow of - Control" section below the link target) to temporarily "change" a global - variable by declaring a local of the same name.

- -

Many of the variables that are used to configure how Boost.Build works - internally are listed here with brief - descriptions.

- -

Variables Associated with SubProject Identity

- -
    -
  • SUBDIR_TOKENS - a list of the path elements relative to the - project root of the current subproject.
  • - -
  • SUBDIR - the path from the invocation directory to the - current subproject directory.
  • -
- -

Grist Variables

- -
    -
  • TARGET_GRIST takes the form - subproject!id/target/toolset/variant/subvariant-path.
  • -
- -

Design Criteria

- -

Assumptions

- -

The requirements are driven by several basic assumptions:

- -
    -
  • There is no single Boost developer or test facility with access to or - knowledge of all the platforms and compilers Boost libraries are used - with.
  • - -
  • Boost libraries are used across such a wide range of platforms and - compilers that almost no other assumptions can be made.
  • -
- -

Requirements

- -

This build system was designed to satisfy the following - requirements:

- -
    -
  • A developer adding a new library or test program must only have to - add simple entries naming the source files to a text file, and not have - to know anything about platform specific files. The developer should not - have to supply header dependency information.
  • - -
  • There should be a very high likelihood of builds succeeding on all - platforms if a build succeeds on any platform. In other words, a - developer must not be required to have access to many platforms or - compilers to ensure correct builds
  • - -
  • A user or developer adding support for a new platform or compiler - should only have to add to a single file describing how to do the build - for that platform or compiler, and shouldn't have to identify the files - that will need to be built.
  • - -
  • The build should rely only on tools native to the platform and - compiler, or supplied via the boost download.
  • - -
  • The details of how the build is done for a particular platform or - compiler should be appropriate for that platform.
  • - -
  • It should be possible to build multiple variants (e.g. debug/release) - of a single target.
  • - -
  • It should be possible to build multiple variants of multiple targets - with multiple compilers from a single build command.
  • - -
  • The build tools must be able to handle Boost growth issues such as - identified in Directory Structure proposals and discussion.
  • - -
  • Support for dynamic and static linking should be included.
  • - -
  • It should be relatively straightforward to add support for a new - compiler. In most cases, no modification of files used to describe - existing targets should be required.
  • - -
  • Support for compiler- and variant-specific configuration for each - target
  • - -
  • It should be possible to build targets into a directory unrelated to - the source directories (they may be read-only)
  • -
- -

Footnotes

[1] Boost Jam is actually descended directly from FTJam, which was - itself a variant of Jam/MR. It is hoped that crucial - features we rely on will eventually be incorporated back into the Jam/MR - release. - -

[2] Note: right now, a dependency feature of - a main target makes all resulting built targets dependent, including - intermediate targets. That means that if an executable is dependent on an - external library, and that library changes, all the sources comprising the - executable will be recompiled as well. This behavior should probably be - fixed.

-
- -

Revised $Date$

- -

Copyright © Dave Abrahams 2001.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/como-4_3_3-vc7-tools.jam b/v1/como-4_3_3-vc7-tools.jam deleted file mode 100644 index 06f18b3f4..000000000 --- a/v1/como-4_3_3-vc7-tools.jam +++ /dev/null @@ -1,34 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# (C) Copyright MetaCommunications, Inc. 2003-2004. - -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# 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. -#//Comeau
C++
- -{ - include-tools vc7 ; - C++FLAGS = ; - CFLAGS = ; - DEFINES = ; - UNDEFS = ; - HDRS = ; - STDHDRS = ; - LINKFLAGS = ; - ARFLAGS = ; - NO_WARN = ; - STDHDRS = ; - STDLIB_PATH = ; - LIBPATH = ; - NEEDLIBS = ; - FINDLIBS = ; - - COMO_BASE = $(COMO_4_3_3_BASE) ; - - extends-toolset como-win32 ; - - C++FLAGS += -DBOOST_DISABLE_WIN32 --wchar_t ; -} diff --git a/v1/como-4_3_3-vc7_1-tools.jam b/v1/como-4_3_3-vc7_1-tools.jam deleted file mode 100644 index 326258c1e..000000000 --- a/v1/como-4_3_3-vc7_1-tools.jam +++ /dev/null @@ -1,18 +0,0 @@ - -# (C) Copyright MetaCommunications, Inc. 2004. - -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# 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. -#//Comeau
C++
- -{ - include-tools vc-7_1 ; - local COMO_BACKEND = "vc71" ; - local COMO_BACKEND_PATH = $(VC71_ROOT) ; - - extends-toolset como-4_3_3-vc7 ; -} diff --git a/v1/como-tools.html b/v1/como-tools.html deleted file mode 100644 index 2455e276b..000000000 --- a/v1/como-tools.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - Boost.Build - como toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

como and como-win32 toolsets

-
-
- -

Introduction

- -

Boost.Build's como and como-win32 toolsets support the Comeau Computing C/C++ Compiler.

- -

Configuration Variables

- -

The como and como-win32 toolsets respond to the following variables - which can be set in the environment or configured on the jam command-line - using -sVARIABLE_NAME=value:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
COMO_PATHPath to installation of compiler tools.(none)If not set tools must be available in the executable path.
COMO_BASEPath to installation of compiler tools.$(COMO_PATH)This is a backward compatability alternate for COMO_PATH.
COMO_BIN_PATHPath to bin directory of compiler excutables.$(COMO_PATH)/bin/ 
COMO_INCLUDE_PATHPath to libcomo headers.$(COMO_PATH)/libcomo$(COMO_INCLUDE_PATH)/cnames is automatically - added.
COMO_STDLIB_PATHPath to built libcomo object.$(COMO_PATH)/libcomo 
COMO_BACKENDBackend abbreviation, e.g. vc7, bcc, - dig, etc.vc7como-win32 toolset only.
COMO_BACKEND_PATHPath to backend compiler.$(VC7_TOOLS)como-win32 toolset only.
-
- -

Revised - - 31 July, 2004 -

- -

Copyright © Dave Abrahams 2002.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/como-tools.jam b/v1/como-tools.jam deleted file mode 100644 index 872cf7956..000000000 --- a/v1/como-tools.jam +++ /dev/null @@ -1,100 +0,0 @@ -#~ Copyright 2001-2002 David Abrahams. -#~ Copyright 2002 Rene Rivera. -#~ Copyright 2002 Beman Dawes. -#~ Copyright 2003 Joel de Guzman. -#~ Copyright 2003 Jens Maurer. -#~ Copyright 2003 Matin Wille. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or copy at -#~ 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. -#//Comeau
C++
- -# variables used to configure como-tools.jam -# -# COMO_PATH - path to installation -# COMO - name of como executable - -COMO_PATH ?= "" ; -COMO ?= $(COMO_PATH)/bin/como ; - -flags como C++FLAGS off : --no_exceptions ; -flags como C++FLAGS on : --exceptions ; - -flags como CFLAGS off : --no_inlining ; -flags como CFLAGS on full : --inlining ; - -flags como CFLAGS off : -O0 ; -flags como CFLAGS speed : -O3 ; -flags como CFLAGS size : -Os ; - -flags como CFLAGS on : -g ; -flags como LINKFLAGS on : -g ; - -flags como FINDLIBS : m ; -flags como FINDLIBS : rt ; - -flags como CFLAGS ; -flags como C++FLAGS ; -flags como DEFINES ; -flags como UNDEFS ; -flags como HDRS ; -flags como SYSHDRS ; -flags como LINKFLAGS ; -flags como ARFLAGS ; - -flags como LIBPATH ; -flags como NEEDLIBS ; -flags como FINDLIBS ; - -#### Link #### - -rule Link-action -{ - como-Link-action $(<) : $(>) ; -} - -# for como, we repeat all libraries so that dependencies are always resolved -actions como-Link-action bind NEEDLIBS -{ - $(COMO) $(LINKFLAGS) -o "$(<[1])" "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l"$(FINDLIBS)" -} - - -#### Cc ##### - -rule Cc-action -{ - como-Cc-action $(<) : $(>) ; -} - -actions como-Cc-action -{ - $(COMO) -c --c99 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - como-C++-action $(<) : $(>) ; -} - -actions como-C++-action -{ - $(COMO) -tused -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - como-Archive-action $(<) : $(>) ; -} - -actions como-Archive-action -{ - ar rcu $(<) $(>) -} - diff --git a/v1/como-win32-tools.jam b/v1/como-win32-tools.jam deleted file mode 100644 index 3ae74535b..000000000 --- a/v1/como-win32-tools.jam +++ /dev/null @@ -1,160 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# (C) Copyright MetaCommunications, Inc. 2004. - -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# 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. -#//Comeau
C++
- -# Feature to allow specifying files that will compile with warnings disabled. -# This is usefull for files that use windows headers. -free-feature no-warn ; - -# variables used to configure como-tools.jam -# -# COMO_PATH - path to installation -# COMO_BIN_PATH - path to como executable, defaults to $(COMO_PATH)/bin/ -# COMO_INCLUDE_PATH - path to libcomo headers, defaults to $(COMO_PATH)/libcomo -# COMO_STDLIB_PATH - path to built libcomo object, defaults to $(COMO_PATH)/libcomo -# COMO_BACKEND - backend abbreviation, e.g. "vc71", "bcc", "dig", etc. Defaults to "vc7" -# COMO_BACKEND_PATH - path to backend compiler root directory, defaults to $(VC7_ROOT) - -# Keep using COMO_BASE for backward compatibility -set-as-singleton COMO_BASE COMO_PATH COMO_BIN_PATH COMO_INCLUDE_PATH COMO_STDLIB_PATH COMO_BACKEND COMO_BACKEND_PATH ; -COMO_BASE ?= $(COMO_PATH) ; - -# compute directories for invoking como -if ! $(COMO_PATH_SETUP) # do this once -{ - # Keep using COMO_BIN_DIRECTORY for backward compatibility. - COMO_BIN_DIRECTORY ?= $(COMO_BIN_PATH) ; - COMO_BIN_DIRECTORY ?= $(COMO_BASE)$(SLASH)bin$(SLASH) ; - COMO_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if COMO_ROOT_DIRECTORY not - # set - - COMO_INCLUDE_PATH ?= $(COMO_BASE)$(SLASH)libcomo ; - COMO_INCLUDE_PATH += $(COMO_INCLUDE_PATH)$(SLASH)cnames ; - - COMO_STDLIB_PATH ?= $(COMO_BASE)$(SLASH)libcomo ; - - COMO_BACKEND_SETUP = $(COMO_BACKEND_SETUP) ; - newline = " -" ; - COMO_BACKEND ?= "vc7" ; - COMO_BACKEND_PATH ?= $(VC7_ROOT) ; - COMO_BACKEND_INCLUDE_SETUP ?= "set \"COMO_MS_INCLUDE="$(COMO_BACKEND_PATH)"/include\"" ; - COMO_BACKEND_LIB_SETUP ?= "set \"LIB="$(COMO_STDLIB_PATH)";%LIB%\"" ; - COMO_PATH_SETUP ?= "set \"PATH="$(COMO_BIN_DIRECTORY)";%PATH%\"" ; - COMO_BACKEND_SETUP ?= "call "\"$(COMO_BACKEND_PATH)\\..\\Common7\\Tools\\vsvars32"\" >nul" ; - COMO_BASE_SETUP ?= "set \"COMO_BASE=$(COMO_BASE)\"" ; - COMO_PATH_SETUP ?= "" ; - COMO_CMD = \"$(COMO_BIN_DIRECTORY)como\" --$(COMO_BACKEND) ; -} - - -flags como-win32 C++FLAGS off : --no_exceptions ; -flags como-win32 C++FLAGS on : --exceptions ; - -flags como-win32 CFLAGS off : --no_inlining ; -flags como-win32 CFLAGS on full : --inlining ; - -flags como-win32 CFLAGS on : /Zi ; -flags como-win32 CFLAGS off : /Od ; - -flags como-win32 CFLAGS ; -flags como-win32 CFLAGS : -D_WIN32 ; # make sure that we get the Boost Win32 platform config header. -flags como-win32 CFLAGS single : -DBOOST_SP_DISABLE_THREADS ; -flags como-win32 CFLAGS multi : -D_MT ; # make sure that our config knows that threading is on. -flags como-win32 C++FLAGS ; -flags como-win32 DEFINES ; -flags como-win32 UNDEFS ; -flags como-win32 HDRS ; -flags como-win32 SYSHDRS ; -flags como-win32 LINKFLAGS ; -flags como-win32 ARFLAGS ; -flags como-win32 NO_WARN ; - -flags como-win32 STDHDRS : $(COMO_INCLUDE_PATH) ; -flags como-win32 STDLIB_PATH : $(COMO_STDLIB_PATH)$(SLASH) ; - -flags como-win32 LIBPATH ; -flags como-win32 NEEDLIBS ; -flags como-win32 FINDLIBS ; - -#### Link #### - -rule Link-action -{ - with-command-file como-Link-action $(<) : $(>) ; -} - -# for como, we repeat all libraries so that dependencies are always resolved -actions como-Link-action bind NEEDLIBS -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(>)" "$(NEEDLIBS)" "$(FINDLIBS:S=.lib)" -} - - -#### Cc ##### - -rule Cc-action -{ - if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; } - else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; } - como-Cc-action $(<) : $(>) ; -} - -actions como-Cc-action -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) -c --c99 -e5 --no_version --display_error_number --diag_suppress=9,21,161,748,940,962 -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<:D=)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; } - else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; } - como-C++-action $(<) : $(>) ; -} - -actions como-C++-action -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 -D__STL_LONG_LONG -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - with-command-file como-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal como-Archive-action -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) --no_version --no_prelink_verbose --prelink_object @"$(>)" - lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(>)" -} - diff --git a/v1/cw-8_3-tools.jam b/v1/cw-8_3-tools.jam deleted file mode 100644 index d479199b4..000000000 --- a/v1/cw-8_3-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ 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. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 8.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-9_2-tools.jam b/v1/cw-9_2-tools.jam deleted file mode 100644 index 4894eb33c..000000000 --- a/v1/cw-9_2-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ 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. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 9.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-9_3-tools.jam b/v1/cw-9_3-tools.jam deleted file mode 100644 index 4894eb33c..000000000 --- a/v1/cw-9_3-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ 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. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 9.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-9_4-tools.jam b/v1/cw-9_4-tools.jam deleted file mode 100644 index 4894eb33c..000000000 --- a/v1/cw-9_4-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ 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. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 9.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-tools.html b/v1/cw-tools.html deleted file mode 100644 index 34456b62e..000000000 --- a/v1/cw-tools.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - Boost.Build - cw toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

cw toolset

-
-
- -

Introduction

- -

Boost.Build's cw toolset supports the Metrowerks CodeWarrior Pro 6.x, 7.x, 8.x - and 9.x tools. This toolsets handles allteh variations for the CodeWarrior - command line compiler tools.

- -

Configuration Variables

The cw toolset responds to the following - variables which can be set in the environment or configured on the jam - command-line using -sVARIABLE_NAME=value: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
CW_ROOTPath to installation of Metrowerks Codewarrior.emptyThe toolset attempts to figure out what the version and - root of the tools are by looking at the environment and at the registry - (on Windows). If nothing is given the newest available toolset is - used.
CW_VERSIONVersion to use. Valid values are: 6.0, 7.0, 8.0, 9.0.empty
-
- -

Revised - - 23 February, 2004 -

- -

Copyright Rene Rivera 2004.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/cw-tools.jam b/v1/cw-tools.jam deleted file mode 100644 index 42d06ea3b..000000000 --- a/v1/cw-tools.jam +++ /dev/null @@ -1,377 +0,0 @@ -#~ Copyright 2004-2005 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. -#//Metrowerks
CodeWarrior
- -# For adding framwork libraries; like Python, Carbon, etc. -free-feature framework ; - -# singleton variables... -set-as-singleton CW_ROOT CWFOLDER CWFolder CWINSTALL ; - -flags cw cw-version : $(CW_VERSION) ; -flags cw cw-root : $(CW_ROOT) ; - -cw-root ?= $(CWFolder) ; -cw-root ?= $(CWFOLDER) ; - -if $(NT) -{ - for local v in 9.0 8.0 7.0 6.0 - { - cw-root-$(v) ?= [ W32_GETREG "HKEY_LOCAL_MACHINE\\SOFTWARE\\Metrowerks\\CodeWarrior for Windows\\$(v)" : "PATH" ] ; - cw-version ?= [ conditional $(cw-root-$(v)) : $(v) ] ; - } -} - -cw-root ?= $(cw-root-$(cw-version)) ; - -flags cw CFLAGS ; -flags cw C++FLAGS ; -flags cw DEFINES ; -flags cw UNDEFS ; -flags cw HDRS ; -flags cw SYSHDRS ; -flags cw LINKFLAGS ; -flags cw ARFLAGS ; -flags cw LIBPATH ; -flags cw NEEDLIBS ; -flags cw FINDLIBS ; -flags cw PREFIX ; -if $(OS) = MACOSX -{ - flags cw FRAMEWORKS ; -} - -flags cw cw-errors ; -flags cw cw-warnings ; - -# Debug information -flags cw CFLAGS on : -g ; -flags cw LINKFLAGS on : -g ; - -# Optimizations -flags cw CFLAGS off : -O0 ; -flags cw CFLAGS speed : -opt full ; -flags cw CFLAGS space : -O4,s "-opt intrinsics" ; - -flags cw CFLAGS off : -inline off ; -flags cw CFLAGS on : -inline on ; -flags cw CFLAGS full : -inline auto -inline level=8 ; - -# Target type -flags cw LINKFLAGS $(SHARED_TYPES) : -shared ; -if $(NT) -{ - flags cw LINKFLAGS $(SHARED_TYPES) : "-export dllexport" ; -} - -# Some language related options -flags cw CFLAGS msvc : -exc ms ; -flags cw CFLAGS directory : "-cwd proj" ; -flags cw CFLAGS source : "-cwd source" ; -flags cw CFLAGS paths : "-cwd explicit" ; -flags cw CFLAGS relative : "-cwd include" ; -flags cw C++FLAGS off : "-RTTI off" ; -flags cw C++FLAGS on : "-RTTI on" ; -# CodeWarrior on MacOS defaults to wchar_t support off, contrary -# to what it does on Windows. So "fix" this discrepancy. Don't -# bother with OS type just set this to on for all. After all it's -# standard! -flags cw CFLAGS : "-wchar_t on" ; - -# OS subsystem target -if $(NT) -{ - flags cw LINKFLAGS console : "-subsystem console" ; - flags cw LINKFLAGS gui : "-subsystem windows" ; - flags cw LINKFLAGS wince : "-subsystem wince" ; - flags cw LINKFLAGS native : "-subsystem native" ; - flags cw LINKFLAGS auto : "-subsystem auto" ; -} - -# Errors, default to maximum 5 errors -flags cw FLAGS : [ conditional $(cw-errors) : "-maxerrors $(cw-errors[1])" : "-maxerrors 5" ] ; - -# Warnings, default to maximum 20 warnings -if off in $(cw-warnings) -{ - flags cw FLAGS : "-warnings off" ; -} -else if error in $(cw-warnings) -{ - flags cw FLAGS : "-warnings error" ; -} -else -{ - flags cw FLAGS : "-warnings on" ; -} -if ! ( off in $(cw-warnings) ) -{ - if [ MATCH "^([0-9]+)" : $(cw-warnings) ] - { - local cw-maxwarnings = [ MATCH "^([0-9]+)" : $(cw-warnings) ] ; - cw-warnings = [ difference $(cw-warnings) : $(cw-maxwarnings) ] ; - flags cw FLAGS : "-maxwarnings $(cw-maxwarnings[1])" ; - } - else - { - flags cw FLAGS : "-maxwarnings 20" ; - } -} -cw-warnings = [ difference $(cw-warnings) : on off error ] ; -if $(cw-warnings) -{ - flags cw CFLAGS no-illegal-pragmas : "-warnings nopragmas" ; - flags cw CFLAGS illegal-pragmas : "-warnings pragmas" ; - flags cw CFLAGS no-empty-declarations : "-warnings noempty" ; - flags cw CFLAGS empty-declarations : "-warnings empty" ; - flags cw CFLAGS no-empty-declarations : "-warnings noempty" ; - flags cw CFLAGS empty-declarations : "-warnings empty" ; - flags cw CFLAGS no-unwanted-effect : "-warnings nounwanted" ; - flags cw CFLAGS unwanted-effect : "-warnings unwanted" ; - flags cw CFLAGS no-unused-arg : "-warnings nounusedarg" ; - flags cw CFLAGS unused-arg : "-warnings unsedarg" ; - flags cw CFLAGS no-unused-var : "-warnings nounusedvar" ; - flags cw CFLAGS unused-var : "-warnings unsedvar" ; - flags cw CFLAGS no-extra-comma : "-warnings nocomma" ; - flags cw CFLAGS extra-comma : "-warnings comma" ; - flags cw CFLAGS no-pedantic : "-warnings nopedantic" ; - flags cw CFLAGS pedantic : "-warnings pedantic" ; - flags cw CFLAGS no-hidden-virtual : "-warnings nohidden" ; - flags cw CFLAGS hidden-virtual : "-warnings hidden" ; - flags cw CFLAGS no-implicit-convert : "-warnings noimplicit" ; - flags cw CFLAGS implicit-convert : "-warnings implicit" ; - flags cw CFLAGS no-not-inlined : "-warnings nonotinlined" ; - flags cw CFLAGS not-inlined : "-warnings notinlined" ; - flags cw CFLAGS no-inconsistent-class : "-warnings nostructclass" ; - flags cw CFLAGS inconsistent-class : "-warnings structclass" ; - if $(NT) - { - flags cw CFLAGS no-unused-expresssion : "-warnings nounusedexpr" ; - flags cw CFLAGS unused-expresssion : "-warnings unsedexpr" ; - flags cw CFLAGS no-structure-pad : "-warnings nopadding" ; - flags cw CFLAGS structure-pad : "-warnings padding" ; - flags cw CFLAGS no-unused-return : "-warnings nonotused" ; - flags cw CFLAGS unused-return : "-warnings notused" ; - flags cw CFLAGS no-pointer-conversion : "-warnings noptrintconv" ; - flags cw CFLAGS pointer-conversion : "-warnings ptrintconv" ; - } -} -else -{ - if $(NT) - { - flags cw CFLAGS : "-warnings nounusedexpr,nounused" ; - } - else - { - flags cw CFLAGS : "-warnings nounused" ; - } -} - -# Search for files in search paths -flags cw LINKFLAGS : -search ; -flags cw ARFLAGS : -search ; - -# Version specific options -if $(cw-version) in 8.0 9.0 -{ - # Use latest ISO conforming templates - flags cw C++FLAGS : -iso_templates on ; - - if $(NT) - { - # The runtime libraries - flags cw CFLAGS static/single/release : -runtime ss ; - flags cw CFLAGS static/single/debug : -runtime ssd ; - - flags cw CFLAGS static/multi/release : -runtime sm ; - flags cw CFLAGS static/multi/debug : -runtime smd ; - - flags cw CFLAGS dynamic/release : -runtime dm ; - flags cw CFLAGS dynamic/debug : -runtime dmd ; - } -} -if $(NT) && $(cw-version) in 6.0 7.0 8.0 -{ - flags cw PREFIX console/dynamic : UseDLLPrefix.h ; -} -if $(NT) && $(cw-version) in 7.0 -{ - # The runtime libraries - flags cw STDLIBS static/release : - MSL_C_x86.lib MSL_Runtime_x86.lib msl_c++_x86.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS dynamic/release : - MSL_All-DLL_x86.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS static/debug : - MSL_C_x86_D.lib MSL_Runtime_x86_D.lib msl_c++_x86_D.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS dynamic/debug : - MSL_All-DLL_x86_D.lib gdi32.lib user32.lib kernel32.lib ; -} -if $(NT) && $(cw-version) in 6.0 -{ - # The runtime libraries - flags cw STDLIBS static : - ansicx86.lib mwcrtl.lib ansicppx86.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS dynamic : - mwcrtldll.lib gdi32.lib user32.lib kernel32.lib ; -} - -# The paths to system and runtime libraries -if $(NT) -{ - flags cw CW_SETUP : "call \"$(cw-root)\\Other Metrowerks Tools\\Command Line Tools\\cwenv.bat\" -quiet" ; - # This is needed after the setup because the CW-9 setup erronously sets the - # ERRORLEVEL pseudo-var directly overriding the real value. The aregument is - # quoted to prevent the value from getting set to " " because bjam insertes - # extra spaces at the end of action commands. - flags cw CW_CLEAR_ERROR : "set \"ERRORLEVEL=\"" ; - flags cw CW_LINK_SETUP : "set MWWinx86LibraryFiles=" ; - flags cw CW_IMPLIB_COMMAND : "-implib " ; - flags cw CW_RUN_PATH : - "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime" - "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ; - - flags cw STDLIBPATH : "$(cw-root)\\Win32-x86 Support\\Libraries\\Win32 SDK" ; - flags cw STDLIBPATH static : "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs" ; - flags cw STDLIBPATH dynamic : "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ; -} - -# Don't wrap tool messages, they just confuse everyone :-) -flags cw FLAGS : -nowraplines ; - -flags cw CW_PREFIX : "-prefix " ; - -# CodeWarrior has it's own set of standard headers, so ignore the default. -flags cw STDHDRS : ; - -# MacOSX.. only the MSL/Carbon/Mach-O combination is working. -if $(OS) = MACOSX -{ - # We use the compiler for both compiles and link, because we may need - # to compile the console stubs source. The compiler passes all options - # down to the linker anyway. - flags cw MWCC : mwcc ; - flags cw MWLD : mwcc ; - # For Carbon we need this prefix file to tell CW that's what we are targetting. - flags cw PREFIX : MSLCarbonPrefix.h ; - # We need to add the framework, as it's not added automatically. - flags cw FRAMEWORKS : Carbon ; - # For comsole apps we need to compile in the MSL functions that will - # talk to the MacOSX console. - flags cw LINKFLAGS console : - "-prefix MSLCarbonPrefix.h" - "\"$(CWINSTALL)/MSL/MSL_C/MSL_MacOS/Src/console_OS_X.c\"" ; -} - -if $(NT) -{ - flags cw MWCC : mwcc ; - flags cw MWLD : mwld ; -} - -#~ flags cw CFLAGS : -verbose ; -#~ flags cw LINKFLAGS : -verbose ; - -#### Link #### -rule Link-action -{ - _ on $(<) = " " ; - gRUN_PATH($(<)) += $(CW_RUN_PATH) ; - if $(NT) - { - # We can't have the mixture of the same libs going in NEEDLIBS and FINDLIBS. - # So remove the extras from FINDLIBS. - local find-libs = - [ difference - [ on $(<[1]) return $(FINDLIBS) ] : - $(gTARGET_BASENAME($(gTARGET_SUBVARIANT($(NEEDLIBS))))) ] ; - FINDLIBS on $(<) = $(find-libs)$(SUFLIB) ; - - CMD on $(<) = "@" ; - with-command-file cw-Link-action $(<) : $(>) $(NEEDLIBS) $(NEEDIMPS) ; - } - else if $(OS) = MACOSX - { - local find-libs = [ on $(<[1]) return $(FINDLIBS) ] ; - FINDLIBS on $(<) = -l$(find-libs) ; - - CMD on $(<) = "" ; - cw-Link-action $(<) : $(>) $(NEEDLIBS) $(NEEDIMPS) ; - } -} - -actions cw-Link-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(CW_LINK_SETUP)$(STDLIBS:J=;) - $(MWLD) $(FLAGS) $(LINKFLAGS) "-L$(LIBPATH)" "-L$(STDLIBPATH)" -framework$(_)"$(FRAMEWORKS)" $(CW_IMPLIB_COMMAND)"$(<[2])" -o "$(<[1])" $(CMD)"$(>)" "$(FINDLIBS)" -} - -#### Cc ##### -rule Cc-action -{ - _ on $(<) = " " ; - cw-Cc-action $(<) : $(>) ; -} - -actions cw-Cc-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(MWCC) -c -lang c -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) "-I$(HDRS)" -I-$(_)"-I$(STDHDRS)" -I-$(_)"-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - _ on $(<) = " " ; - cw-C++-action $(<) : $(>) ; -} - -actions cw-C++-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(MWCC) -c -lang c++ -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) $(C++FLAGS) "-I$(HDRS)" -I-$(_)"-I$(STDHDRS)" -I-$(_)"-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)" -} - -#### Archive #### -rule Archive-action -{ - _ on $(<) = " " ; - if $(NT) - { - local find-libs = [ on $(<[1]) return $(FINDLIBS) ] ; - FINDLIBS on $(<) = $(find-libs)$(SUFLIB) ; - - CMD on $(<) = "@" ; - with-command-file cw-Archive-action $(<) : $(>) [ on $(<) return $(NEEDLIBS) ] ; - } - else if $(OS) = MACOSX - { - local find-libs = [ on $(<[1]) return $(FINDLIBS) ] ; - FINDLIBS on $(<) = -l$(find-libs) ; - - CMD on $(<) = "" ; - cw-Archive-action $(<) : $(>) [ on $(<) return $(NEEDLIBS) ] ; - } -} - -## CW in general doesn't produce archive that ranlib is intereted in. So -## don't run ranlib. -rule Ranlib-action -{ -} - -actions together cw-Archive-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(MWLD) -library $(FLAGS) $(ARFLAGS) "-L$(LIBPATH)" "-L$(STDLIBPATH)" -o "$(<)" $(CMD)"$(>)" "$(FINDLIBS)" -} diff --git a/v1/darwin-tools.html b/v1/darwin-tools.html deleted file mode 100644 index be240c5ec..000000000 --- a/v1/darwin-tools.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - Boost.Build - darwin toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

darwin toolset

-
-
- -

Introduction

- -

Boost.Build's darwin toolset supports the Apple modified GNU GCC command-line - tools. Although the underlying tools are GCC this toolset is specifically - tailored to account for the various "features" that Apple implemented to - work in the Darwin OS Mach kernel.

- -

Configuration - Variables

Because of the already specific nature of this toolset - there are no additional configuration variables. - -

Toolset-Specific Features

The - following darwin-specific features can be used in target build - requirements or in the BUILD variable: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureValuesDefaultSemantics
framework(free feature)N/AAdds application "Frameworks" to use for linking.
bundle-loader(free feature)N/ASpecifies the path to the application that will be loading this - "bundle". When this is specified, and building a DLL target, a "bundle" - version of the target is built instead of the regular shared library - version.
-
- -

Revised - - 16 November, 2002 -

- -

Copyright © Dave Abrahams 2002.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/darwin-tools.jam b/v1/darwin-tools.jam deleted file mode 100644 index 301393fa4..000000000 --- a/v1/darwin-tools.jam +++ /dev/null @@ -1,230 +0,0 @@ -# (C) Copyright Rene Rivera, 2002-2003. -# 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. -#//GNU
GCC
- -# For adding framwork libraries; like Python, Carbon, etc. -free-feature framework ; - -# Specify the loader for bundles. -free-feature bundle-loader ; - -# Controll generation of compiler warnings. -feature warnings : on off ; - -# Type of shared object to create. -free-feature link-format ; - -# compute directories for invoking GCC -# -# The gcc toolset can be user-configured using the following -# variables: -# -# GCC_ROOT_DIRECTORY -# The directory in which GCC was installed. Defaults to -# unset. Usually, there is no need to set this variable at -# all. However, if G++ is not in the path it is usually -# sufficient to configure this one variable. More fine-grained -# configuration is available by setting the following: -# -# GCC_BIN_DIRECTORY -# the directory prefix used to find the gcc executables. Defaults to -# $(GCC_ROOT_DIRECTORY)/bin/, or "" if GCC_ROOT_DIRECTORY is -# not set. -# -# GCC_INCLUDE_DIRECTORY -# the directory in which to find system includes. Defaults to -# empty. -# -# GCC_STDLIB_DIRECTORY -# the directory in which to find the standard library -# objects associated with this build of gcc. Defaults to -# $(GCC_ROOT_DIRECTORY)/lib. -# -# GXX -# The name by which g++ is invoked. You can also use this in -# lieu of setting the property to force options such -# as "-V3.0.4" into the g++ command line: "-sGXX=g++ -V3.0.4". -# -# GCC -# Similar to GXX, the name by which gcc is invoked for "C" -# language targets. - -# singleton variables... -set-as-singleton GCC_ROOT_DIRECTORY GCC_BIN_DIRECTORY GCC_INCLUDE_DIRECTORY GCC_STDLIB_DIRECTORY ; - -flags darwin GCC_BIN_DIRECTORY : $(GCC_BIN_DIRECTORY) ; -flags darwin GCC_INCLUDE_DIRECTORY : $(GCC_INCLUDE_DIRECTORY) ; -flags darwin GCC_STDLIB_DIRECTORY : $(GCC_STDLIB_DIRECTORY) ; - -if ! $(GCC_BIN_DIRECTORY) { flags darwin GCC_BIN_DIRECTORY : $(GCC_ROOT_DIRECTORY)/bin/ ; } -if ! $(GCC_BIN_DIRECTORY) { flags darwin GCC_BIN_DIRECTORY : "" ; } -if ! $(GCC_STDLIB_DIRECTORY) { flags darwin GCC_STDLIB_DIRECTORY : $(GCC_ROOT_DIRECTORY)/lib ; } - -flags darwin .GCC_BIN_DIR : $(GCC_BIN_DIRECTORY) ; -flags darwin .GXX : $(GXX) ; -flags darwin .GCC : $(GCC) ; - -if ! $(.GXX) && $(GCC_ROOT_DIRECTORY) { flags darwin .GXX : g++ ; } -if ! $(.GXX) { flags darwin .GXX : c++ ; } -if ! $(.GCC) && $(GCC_ROOT_DIRECTORY) { flags darwin .GCC : gcc ; } -if ! $(.GCC) { flags darwin .GCC : cc ; } - -flags darwin CFLAGS ; -flags darwin C++FLAGS ; -flags darwin DEFINES ; -flags darwin UNDEFS ; -flags darwin HDRS ; -flags darwin SYSHDRS ; -flags darwin LIBPATH ; -flags darwin NEEDLIBS ; -flags darwin FINDLIBS ; -flags darwin ARFLAGS ; -flags darwin TARGET_TYPE ; -flags darwin FRAMEWORKS ; -flags darwin DLLVERSION ; -flags darwin DLLVERSION : $(DLLVERSION[1]) ; -flags darwin BUNDLE_LOADER ; -flags darwin ARFLAGS ; - -if ! $(ARFLAGS) { flags darwin ARFLAGS : "" ; } -if ! $(DLLVERSION) { flags darwin DLLVERSION : $(BOOST_VERSION) ; } - -if ! [ MATCH "(gcc)" : $(.GCC) ] -{ - flags darwin CFLAGS : -Wno-long-double -no-cpp-precomp ; -} -# GCC 4.0, the default compiler in Darwin 8.0.0, does not have -# -fcoalesce-templates. GCC 3.3 needs it. -if ! [ MATCH "(g[+][+])" : $(.GXX) ] && $(JAMUNAME[3]) < "8.0.0" || - [ MATCH "(g[+][+]-3.3)" : $(.GXX) ] -{ - flags darwin C++FLAGS : -fcoalesce-templates ; -} -flags darwin LINKFLAGS static : -static-libgcc ; -flags darwin CFLAGS on : -g ; -flags darwin LINKFLAGS on : -g ; -flags darwin LINKFLAGS off : -Wl,-x ; -flags darwin CFLAGS off : -O0 ; -flags darwin CFLAGS speed : -O3 ; -flags darwin CFLAGS space : -Os ; -flags darwin CFLAGS off : -fno-inline ; -flags darwin CFLAGS on : -Wno-inline ; -flags darwin CFLAGS full : -finline-functions -Wno-inline ; -flags darwin CFLAGS on : -pg ; -flags darwin LINKFLAGS on : -pg ; -flags darwin C++FLAGS off : -fno-rtti ; -flags darwin C++FLAGS on : -fvtable-thunks ; -flags darwin C++FLAGS off : -fvtable-thunks=0 ; -flags darwin CFLAGS true : -fPIC ; -flags darwin CFLAGS on : -Wall ; -flags darwin CFLAGS off : -w ; - -flags darwin LINK_FORMAT $(SHARED_TYPES)/bundle : bundle ; -flags darwin LINK_FORMAT $(SHARED_TYPES)/dynamic : dynamic ; -if $(BUNDLE_LOADER) && ! $(LINK_FORMAT) -{ - flags darwin LINK_FORMAT $(SHARED_TYPES) : bundle ; -} - -if $(LINK_FORMAT) = bundle -{ - flags darwin LINKFLAGS $(SHARED_TYPES) : - -bundle ; -} -else -{ -# flags darwin LINKFLAGS $(SHARED_TYPES) : -# -Wl,-dynamic -nostartfiles -Wl,-dylib -Wl,-ldylib1.o ; -} - -flags darwin .LINKFLAGS ; -flags darwin DLLFLAGS : ; -if -bind_at_load in $(.LINKFLAGS) -{ - flags darwin DLLFLAGS $(SHARED_TYPES) : -bind_at_load ; - .LINKFLAGS = [ difference $(.LINKFLAGS) : -bind_at_load ] ; -} -flags darwin LINKFLAGS : $(.LINKFLAGS) ; - - -#### Link #### - -rule Link-action -{ - _ on $(<) = " " ; - DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; - if $(TARGET_TYPE) in $(SHARED_TYPES) && $(LINK_FORMAT) != bundle - { - #~ LINKFLAGS on $(<) += - #~ "-Wl,-dylib_compatibility_version,$(DLLVERSION) -W,l-dylib_current_version,$(DLLVERSION)" ; - darwin-Link-DyLib-action $(<) : $(>) ; - } - else - { - darwin-Link-action $(<) : $(>) ; - } -} - -actions darwin-Link-action bind NEEDLIBS NEEDIMPS -{ - $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH) - $(SHELL_EXPORT)$(gSHELL_LIBPATH) - $(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(>)" \ - -F$(FRAMEWORKS:D) -framework$(_)$(FRAMEWORKS:D=) \ - -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \ - -bundle_loader$(_)"$(BUNDLE_LOADER)" "$(BUNDLE_LOADER)" -} - -actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS -{ - $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH) - $(SHELL_EXPORT)$(gSHELL_LIBPATH) - ld -dynamic -m -r -d $(DLLFLAGS) -o "$(<[1]:S=.lo)" "$(>)" \ - && \ - $(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \ - -F$(FRAMEWORKS:D) -framework$(_)$(FRAMEWORKS:D=) \ - -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -dynamiclib -install_name "$(<[1]:D=:S=.dylib)" \ - && \ - rm -f "$(<[1]:S=.lo)" -} - -#### Cc ##### - -rule Cc-action -{ - _ on $(<) = " " ; - darwin-Cc-action $(<) : $(>) ; -} - -actions darwin-Cc-action -{ - $(.GCC_BIN_DIR)$(.GCC) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -F$(FRAMEWORKS:D) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - _ on $(<) = " " ; - darwin-C++-action $(<) : $(>) ; -} - -actions darwin-C++-action -{ - $(.GCC_BIN_DIR)$(.GXX) -c -ftemplate-depth-256 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -F$(FRAMEWORKS:D) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - darwin-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal darwin-Archive-action -{ - ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)" -} diff --git a/v1/distribution.jam b/v1/distribution.jam deleted file mode 100644 index 07d96c1a0..000000000 --- a/v1/distribution.jam +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 2002 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) - -## -## Distribution module, contains rules for management of distributions. -## Like management of version headers, packaging, etc. -## All the rules here operate on a set of global target all of which -## start with "dist", are NOTFILES, and can only be built from the -## top-level. -## - -# Add the version information for the given 'name' component, to the -# given target header. Instructions are generated to construct a C header file -# with the version information specified by 'target'. -# -# EXAMPLE: -# -# SEARCH on distribution.jam = $(BOOST_BUILD_PATH) ; -# module distribution { include distribution.jam ; } -# -# distribution.version-header boost/version.hpp -# : Boost 1.27 -# "// boost version.hpp header file -------------------------------------------//" -# "" -# "// (C) Copyright boost.org 1999. 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." -# "" -# "// See http://www.boost.org for most recent version including documentation." -# ; -# -# PRODUCES: -# -# [boost/version.hpp] -# -# // boost version.hpp header file -------------------------------------------// -# -# // (C) Copyright boost.org 1999. 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. -# -# // See http://www.boost.org for most recent version including documentation. -# -# #ifndef BOOST_VERSION_DEF -# #define BOOST_VERSION_DEF -# #define BOOST_VERSION_STRING "Boost 1.27" -# #define BOOST_VERSION_MAJOR 1 -# #define BOOST_VERSION_MINOR 27 -# #define BOOST_VERSION_SUBMINOR 0 -# #define BOOST_VERSION 102700 -# #endif -# -# IFF: -# -# [When at the root of the project.] -# $shell> jam dist -# -rule version-header ( target : name version comment-text * ) -{ - local target-dir = - [ tokens-to-simple-path [ top-relative-tokens [ directory-of $(target) ] ] ] ; - local target-id = - [ target-id-of $(target) ] ; - - # Translat the name & version into the various version info definitions. - # - local s = " " ; - local target-suffix = [ MATCH .(.*) : $(target:S) ] ; - local target-tag = [ join [ split-path $(target-dir) ] $(target:B) $(target-suffix) : "_" ] ; - target-tag = $(target-tag:U) ; - local name-tag = [ join [ split $(name:U) "\\." ] : "_" ] ; - local version-parts = ; - local t ; - t = [ MATCH ^(.*)\\.(.*) : $(version) ] ; - version-parts += $(t[1]) ; - t = [ MATCH ^(.*)\\.(.*)\\.* : $(version) ] ; - version-parts += $(t[2]) ; - t = [ MATCH ^(.*)\\.(.*)\\.(.*) : $(version) ] ; - version-parts += $(t[3]) ; - if ! $(version-parts[2]) { version-parts += 0 0 ; } - if ! $(version-parts[3]) { version-parts += 0 ; } - local version-id = $(version-parts[1]) ; - switch $(version-parts[2]) - { - case ? : version-id = $(version-id)00$(version-parts[2]) ; - case ?? : version-id = $(version-id)0$(version-parts[2]) ; - case ??? : version-id = $(version-id)$(version-parts[2]) ; - case * : version-id = $(version-id)000 ; - } - switch $(version-parts[3]) - { - case ? : version-id = $(version-id)0$(version-parts[3]) ; - case ?? : version-id = $(version-id)$(version-parts[3]) ; - case * : version-id = $(version-id)00 ; - } - - # Set Jam variables to the version info definitions for use in things like - # sonaming, etc. - # - $(name:U)_VERSION ?= $(version) ; - $(name:U)_VERSION_MAJOR ?= $(version-parts[1]) ; - $(name:U)_VERSION_MINOR ?= $(version-parts[2]) ; - $(name:U)_VERSION_SUBMINOR ?= $(version-parts[3]) ; - $(name:U)_VERSION_STRING ?= $(name)$(s)$(version) ; - - # Generate instructions to build the header file, but only if not in - # dependency stage. - # - if ! $(gIN_LIB_INCLUDE) - { - TARGET_TAG on $(target-id) = - $(target-tag) ; - VERSION($(name-tag)) on $(target-id) = - "$(name) $(version)" - $(version-parts[1]) $(version-parts[2]) $(version-parts[3]) - $(version-id) ; - NOCARE $(name-tag) ; - NOTFILE $(name-tag) ; - MODE on $(target-id) = $(FILEMODE) ; - ALWAYS $(target-id) ; - - MakeLocate $(target-id) : $(target-dir) ; - Clean dist-clean : $(target-id) ; - version-header-create $(target-id) ; - local comment-line-tag = COMMENT_TEXT_ ; - for local comment-line in $(comment-text) - { - comment-line-tag = $(comment-line-tag)% ; - NOCARE $(comment-line-tag) ; - NOTFILE $(comment-line-tag) ; - $(comment-line-tag) on $(target-id) = $(comment-line) ; - version-header-comment $(target-id) : $(comment-line-tag) ; - } - version-header-def $(target-id) : $(name-tag) ; - } - - # Add the header to the top-level "dist" target. - # - if $($(gTOP)) = "." - { - declare-fake-targets dist : $(target-id) ; - } -} - -# Creates initial empty version header, with correct permissions. -# -actions together version-header-create -{ - echo > $(<) - $(CHMOD) $(MODE) $(<) -} - -# Append a single comment line to the header. -# -actions version-header-comment -{ - echo '$($(>))' >> $(<) -} - -# Append the version info definitions of a single module to the header. -# -actions version-header-def -{ - echo >> $(<) - echo '#ifndef $(>)_VERSION_DEF' >> $(<) - echo '#define $(>)_VERSION_DEF' >> $(<) - echo '#define $(>)_VERSION_STRING "$(VERSION($(>))[1])"' >> $(<) - echo '#define $(>)_VERSION_MAJOR $(VERSION($(>))[2])' >> $(<) - echo '#define $(>)_VERSION_MINOR $(VERSION($(>))[3])' >> $(<) - echo '#define $(>)_VERSION_SUBMINOR $(VERSION($(>))[4])' >> $(<) - echo '#define $(>)_VERSION $(VERSION($(>))[5])' >> $(<) - echo "#endif" >> $(<) -} diff --git a/v1/dmc-stlport-tools.html b/v1/dmc-stlport-tools.html deleted file mode 100644 index f917a3c7e..000000000 --- a/v1/dmc-stlport-tools.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - Boost.Build - dmc-stlport toolset - - - - - - - - - - - -
-

C++ Boost

-
-

Boost.Build

- -

dmc-stlport toolset

-
-
- -

Introduction

- -

Boost.Build's dmc-stlport toolset - supports the Digital Mars C++ - command-line tools, using the STLport - standard library implementation. It is designed to allow you to build and - test with multiple installed versions of STLPort, so that objects build in - each configuration will be built into separate directories.

- -

In addition to what this toolset provides, configuration and extended - functionality is available through the common stlport library support.

-
- -

Revised $Date$

- -

Copyright © Dave Abrahams 2002, Aleksey Gurtovoy 2004, Rene Rivera - 2005.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/dmc-stlport-tools.jam b/v1/dmc-stlport-tools.jam deleted file mode 100644 index aa8c60d54..000000000 --- a/v1/dmc-stlport-tools.jam +++ /dev/null @@ -1,21 +0,0 @@ -# Digital Mars C++/STLPort - -# (C) Copyright Aleksey Gurtovoy 2004. -# -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# 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. -#//Digital
Mars C++
- -extends-toolset dmc ; - -flags $(gCURRENT_TOOLSET) STLPORT_LIB_BASE_NAME ; - -STLPORT_LIB_BASE_NAME ?= stlp45dm ; - -SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ; -include stlport.jam ; - diff --git a/v1/dmc-tools.html b/v1/dmc-tools.html deleted file mode 100644 index 4ebf102f8..000000000 --- a/v1/dmc-tools.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - Boost.Build - dmc toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

dmc toolset

-
-
- -

Introduction

- -

Boost.Build's dmc toolset supports the - Digital Mars C++ command-line - tools.

- -

Configuration - Variables

- -

The dmc toolset responds to the following variables, which - can be set in the environment or configured on the jam command-line using - -sVARIABLE_NAME=value:

- - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
DMC_ROOTThe path to the Digital Mars C++ installation directoryemptyFor example, C:\Program Files\Digital Mars
-
- -

Revised - - 31 July, 2004 -

- -

Copyright © Dave Abrahams 2002, Aleksey Gurtovoy 2004.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/dmc-tools.jam b/v1/dmc-tools.jam deleted file mode 100644 index 38d5e5e35..000000000 --- a/v1/dmc-tools.jam +++ /dev/null @@ -1,106 +0,0 @@ -# Digital Mars C++ - -# (C) Copyright Christof Meerwald 2003. -# (C) Copyright Aleksey Gurtovoy 2004. -# -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# 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. -#//Digital
Mars C++
- -set-as-singleton DMC_ROOT DMC_BIN_DIR ; - -DMC_COMPILER = dmc ; -DMC_LINKER = link ; -DMC_ARCHIVE = lib ; - -DMC_ROOT = $(DMC_ROOT:J=" ") ; -DMC_BIN_DIR ?= "$(DMC_ROOT)"$(SLASH)bin$(SLASH) ; - -flags dmc CFLAGS on/object : -g ; -flags dmc LINKFLAGS on : -co ; - -flags dmc CFLAGS off : -S -o+none ; -flags dmc CFLAGS speed : -o+time ; -flags dmc CFLAGS space : -o+space ; -flags dmc CFLAGS on : -Ae ; -flags dmc CFLAGS on : -Ar ; - -# Note that these two options actually imply multithreading support on DMC -# because there is no single-threaded dynamic runtime library. Specifying -# multi would be a bad idea, though, because no option would be -# matched when the build uses the default settings of dynamic -# and single. -flags dmc CFLAGS release/dynamic : -ND ; -flags dmc CFLAGS debug/dynamic : -ND ; - -flags dmc CFLAGS release/static/single : ; -flags dmc CFLAGS debug/static/single : ; -flags dmc CFLAGS release/static/multi : -D_MT ; -flags dmc CFLAGS debug/static/multi : -D_MT ; - -flags dmc CFLAGS ; -flags dmc C++FLAGS ; -flags dmc DEFINES ; -flags dmc UNDEFS ; -flags dmc HDRS ; -flags dmc SYSHDRS ; -flags dmc LINKFLAGS ; -flags dmc ARFLAGS ; - -flags dmc LIBPATH ; -flags dmc NEEDLIBS ; -flags dmc FINDLIBS ; -flags dmc LINKFLAGS $(SHARED_TYPES) : ; - -flags msvc STDHDRS : $(DMC_ROOT)$(SLASH)include ; - - -#### Link #### - -rule Link-action ( target implib ? : sources + : target-type ? ) -{ - dmc-Link-action $(<) : $(sources) $(NEEDLIBS) ; -} - -actions together dmc-Link-action -{ - "$(DMC_BIN_DIR)$(DMC_LINKER)" $(LINKFLAGS) -delexecutable -noi -implib:"$(<[2])" "$(>)" , "$(<[1])" , NUL , user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def" -} - -#### Cc ##### - -rule Cc-action -{ - dmc-Cc-action $(<) : $(>) ; -} - -actions dmc-Cc-action -{ - "$(DMC_BIN_DIR)$(DMC_COMPILER)" -c -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - dmc-C++-action $(<) : $(>) ; -} - -actions dmc-C++-action -{ - "$(DMC_BIN_DIR)$(DMC_COMPILER)" -cpp -c -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -#### Archive #### -rule Archive-action -{ - dmc-Archive-action $(<) : $(>) ; -} - -actions together piecemeal dmc-Archive-action -{ - "$(DMC_BIN_DIR)$(DMC_ARCHIVE)" $(ARFLAGS) -c -n -p128 "$(<)" "$(>)" -} diff --git a/v1/edg-tools.html b/v1/edg-tools.html deleted file mode 100644 index b7246795f..000000000 --- a/v1/edg-tools.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - Boost.Build - edg toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

edg toolset

-
-
- -

Introduction

- -

Boost.Build's edg toolset supports the Edison Design Group C/C++ compiler front-end - (evaluation version).

- -

Configuration Variables

The edg toolset responds to the following - variables which can be set in the environment or configured on the jam - command-line using -sVARIABLE_NAME=value: - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
ECCPName and (optional) path of the eccp executable.(none)If not set, eccp must be available in the search - path.
-
- -

Revised - - 09 Jul, 2003

- -

Copyright 2003 Jens - Maurer.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/edg-tools.jam b/v1/edg-tools.jam deleted file mode 100644 index 84bca8848..000000000 --- a/v1/edg-tools.jam +++ /dev/null @@ -1,91 +0,0 @@ -# (C) Copyright Jens Maurer 2003. -# 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. -#//EDG
C++
- -# variables used to configure eccp-tools.jam -# -# ECCP - name of eccp executable - -ECCP ?= eccp ; - -flags edg C++FLAGS off : --no_exceptions ; -flags edg C++FLAGS on : --exceptions ; - -flags edg CFLAGS off : --no_inlining ; -flags edg CFLAGS on full : --inlining ; - -flags edg CFLAGS off : -O0 ; -flags edg CFLAGS speed : -O3 ; -flags edg CFLAGS size : -Os ; - -flags edg CFLAGS true : --pic ; -flags edg CFLAGS on : -g ; -flags edg LINKFLAGS on : -g ; -flags edg CFLAGS on : -pg ; -flags edg LINKFLAGS on : -pg ; - -flags edg CFLAGS ; -flags edg C++FLAGS ; -flags edg DEFINES ; -flags edg UNDEFS ; -flags edg HDRS ; -flags edg SYSHDRS ; -flags edg LINKFLAGS ; -flags edg ARFLAGS ; - -flags edg LIBPATH ; -flags edg NEEDLIBS ; -flags edg FINDLIBS ; - -#### Link #### - -rule Link-action -{ - edg-Link-action $(<) : $(>) ; -} - -actions edg-Link-action bind NEEDLIBS -{ - $(ECCP) $(LINKFLAGS) -tused -o "$(<[1])" "$(>)" "$(NEEDLIBS)" "$(FINDLIBS:S=.so)" -} - - -#### Cc ##### - -rule Cc-action -{ - edg-Cc-action $(<) : $(>) ; -} - -actions edg-Cc-action -{ - $(ECCP) -c --c99 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - edg-C++-action $(<) : $(>) ; -} - -actions edg-C++-action -{ - $(ECCP) -tused -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - edg-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal edg-Archive-action -{ - ar rc $(<) $(>) -} - diff --git a/v1/example/boost-build.jam b/v1/example/boost-build.jam deleted file mode 100644 index 1bd4e62bf..000000000 --- a/v1/example/boost-build.jam +++ /dev/null @@ -1,5 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# 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) - -boost-build .. ; diff --git a/v1/example/lib_use/Jamfile b/v1/example/lib_use/Jamfile deleted file mode 100644 index efdf49ee7..000000000 --- a/v1/example/lib_use/Jamfile +++ /dev/null @@ -1,51 +0,0 @@ -# (C) Copyright Rene Rivera, 2002, 2005. -# 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) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -subproject tools/build/v1/example/lib_use ; - -# Declare the library target. Composed of a single source file. -# The real name of the target will vary according to the build -# build platform. For example in Unix it will generate a file -# named "libsimple.a". -# -# In this example the default build is given so that it builds -# two default versions of the library: debug with single-threading, -# and debug with multi-threading. -# -lib simple - : - # SOURCES - simple_lib.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug single/multi - ; - -# Declare an executable target that uses the library. -# Here the executable has a single source file, but also -# depends on the above library. Therefore this executable -# has the additional source file as generated by the library -# target. -# -# This target also specifies the requirement that it be built -# as multi-threaded. This also forces which variant of the library -# is used, and in this case, regardless of the build requested on this -# target. -# -exe simple - : - # SOURCES - simple.cpp - simple - : - # REQUIREMENTS - multi - : - # DEFAULT BUILDS - ; diff --git a/v1/example/lib_use/simple.cpp b/v1/example/lib_use/simple.cpp deleted file mode 100644 index bd3595f31..000000000 --- a/v1/example/lib_use/simple.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** 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) -*/ - -#include - -extern int lib_call(int x); - -int main(int /* argc */, char ** /* argv */) -{ - for (int i = 0; i < 16; ++i) - { - std::printf("%d * 2 = %d\n",i,lib_call(i)); - } - return 0; -} diff --git a/v1/example/lib_use/simple_lib.cpp b/v1/example/lib_use/simple_lib.cpp deleted file mode 100644 index 842759c73..000000000 --- a/v1/example/lib_use/simple_lib.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** 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) -*/ - -extern int lib_call(int x); - -int lib_call(int x) -{ - return x*2; -} diff --git a/v1/example/property_rule/Jamfile b/v1/example/property_rule/Jamfile deleted file mode 100644 index 66ff0c11e..000000000 --- a/v1/example/property_rule/Jamfile +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright David Abrahams 2002. -# 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) - -subproject tools/build/examples/property_rule ; - -rule add-include ( toolset variant : properties * ) -{ - return $(properties) $($(gTOP))/inc ; -} - -lib foo : foo.cpp : add-include on ; -exe bar : bar.cpp foo : add-include ; diff --git a/v1/example/property_rule/bar.cpp b/v1/example/property_rule/bar.cpp deleted file mode 100644 index 5ca5d1652..000000000 --- a/v1/example/property_rule/bar.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright David Abrahams 2002. -// 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) -#include -int main() { foo(); return 0; } diff --git a/v1/example/property_rule/foo.cpp b/v1/example/property_rule/foo.cpp deleted file mode 100644 index 622c03ff7..000000000 --- a/v1/example/property_rule/foo.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright David Abrahams 2002. -// 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) -#include -void foo() {} diff --git a/v1/example/property_rule/inc/foo.hpp b/v1/example/property_rule/inc/foo.hpp deleted file mode 100644 index b68878bd6..000000000 --- a/v1/example/property_rule/inc/foo.hpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright David Abrahams 2002. -// 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) -#ifndef FOO_DWA2002712_HPP -# define FOO_DWA2002712_HPP - -void foo(); - -#endif // FOO_DWA2002712_HPP diff --git a/v1/example/property_rule/project-root.jam b/v1/example/property_rule/project-root.jam deleted file mode 100644 index 0ca8cbef5..000000000 --- a/v1/example/property_rule/project-root.jam +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright David Abrahams 2002. -# 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) - -# empty diff --git a/v1/example/stage_source_selection/Jamfile b/v1/example/stage_source_selection/Jamfile deleted file mode 100644 index 552a40230..000000000 --- a/v1/example/stage_source_selection/Jamfile +++ /dev/null @@ -1,55 +0,0 @@ -# (C) Copyright Rene Rivera, 2002. -# 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) - -# Example of how to select the targets included in a stage depending -# on the variant to build. -# -# This is for Boost.Build-V1 - -subproject tools/build/examples/stage_source_selection ; - -# Simple executable. -# -exe simple0 - : - # SOURCES - simple.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug - ; - -# Another simple executable. Here it's the same program source -# as the above, but this is only to simplify the example. -# -exe simple1 - : - # SOURCES - simple.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug - ; - -# The stage that builds the two different targets into the -# single stage directory. Both debug and release builds are -# done by default. When soing a "debug" build only the -# "simple0" source is copied to the stage. And conversly -# on a "release" build only the "simple1" source is copied. -# -stage run - : - # SOURCES - simple0 - simple1 - : - # TAGS - : - # DEFAULT BUILDS - debug release - ; diff --git a/v1/example/stage_source_selection/simple.cpp b/v1/example/stage_source_selection/simple.cpp deleted file mode 100644 index c8995e0f0..000000000 --- a/v1/example/stage_source_selection/simple.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** 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) -*/ - -#include - -int main(int /* argc */, char ** /* argv */) -{ - for (int i = 0; i < 16; ++i) - { - std::printf("%d * 2 = %d\n",i,i*2); - } - return 0; -} diff --git a/v1/example/sublib_use/Jamfile b/v1/example/sublib_use/Jamfile deleted file mode 100644 index 731c2f044..000000000 --- a/v1/example/sublib_use/Jamfile +++ /dev/null @@ -1,10 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# 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) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -project-root ; -subinclude sublib ; -subinclude subexe ; diff --git a/v1/example/sublib_use/sub/Jamfile b/v1/example/sublib_use/sub/Jamfile deleted file mode 100644 index b67cbefcc..000000000 --- a/v1/example/sublib_use/sub/Jamfile +++ /dev/null @@ -1,31 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# 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) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -subproject sub ; - -# Declare an executable target that uses the library. -# Here the executable has a single source file, but also -# depends on the above library. Therefore this executable -# has the additional source file as generated by the library -# target. -# -# This target also specifies the requirement that it be built -# as multi-threaded. This also forces which variant of the library -# is used, and in this case, regardless of the build requested on this -# target. -# -exe simple - : - # SOURCES - simple.cpp - ../sublib/simple - : - # REQUIREMENTS - multi - : - # DEFAULT BUILDS - ; diff --git a/v1/example/sublib_use/sub/simple.cpp b/v1/example/sublib_use/sub/simple.cpp deleted file mode 100644 index 8e13c96e8..000000000 --- a/v1/example/sublib_use/sub/simple.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* (C) Copyright Rene Rivera, 2003. -** 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) -*/ - -#include - -extern int lib_call(int x); - -int main(int /* argc */, char ** /* argv */) -{ - for (int i = 0; i < 16; ++i) - { - std::printf("%d * 2 = %d\n",i,lib_call(i)); - } - return 0; -} diff --git a/v1/example/sublib_use/sublib/Jamfile b/v1/example/sublib_use/sublib/Jamfile deleted file mode 100644 index 6b2931936..000000000 --- a/v1/example/sublib_use/sublib/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# 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) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -subproject sublib ; - -# Declare the library target. Composed of a single source file. -# The real name of the target will vary according to the build -# build platform. For example in Unix it will generate a file -# named "libsimple.a". -# -# In this example the default build is given so that it builds -# two default versions of the library: debug with single-threading, -# and debug with multi-threading. -# -lib simple - : - # SOURCES - simple_lib.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug single/multi - ; diff --git a/v1/example/sublib_use/sublib/simple_lib.cpp b/v1/example/sublib_use/sublib/simple_lib.cpp deleted file mode 100644 index a218c27f6..000000000 --- a/v1/example/sublib_use/sublib/simple_lib.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2003. -** 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) -*/ - -extern int lib_call(int x); - -int lib_call(int x) -{ - return x*2; -} diff --git a/v1/example/target_test_arg/Jamfile b/v1/example/target_test_arg/Jamfile deleted file mode 100644 index 2102f91e8..000000000 --- a/v1/example/target_test_arg/Jamfile +++ /dev/null @@ -1,29 +0,0 @@ -# (C) Copyright Rene Rivera, 2005. -# 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) - -subproject tools/build/v1/example/target_test_arg ; - -import testing ; - -dll simple - : # SOURCES - simple_lib.cpp - : # REQUIREMENTS - : # DEFAULT BUILDS - debug release - ; - -run simple.cpp - : # ARGS - : # INPUT FILES - simple - simple_lib.cpp - ../lib_use/simple - : # REQUIREMENTS - : # TEST NAME - simple - : # DEFAULT BUILDS - debug - release - ; diff --git a/v1/example/target_test_arg/simple.cpp b/v1/example/target_test_arg/simple.cpp deleted file mode 100644 index ace3872f5..000000000 --- a/v1/example/target_test_arg/simple.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* (C) Copyright Rene Rivera, 2005. -** 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) -*/ - -#include - -int main(int argc, char ** argv) -{ - for (int i = 0; i < argc; ++i) - { - std::printf("arg #%u = '%s'\n",i,argv[i]); - } - return 1; -} diff --git a/v1/example/target_test_arg/simple_lib.cpp b/v1/example/target_test_arg/simple_lib.cpp deleted file mode 100644 index 842759c73..000000000 --- a/v1/example/target_test_arg/simple_lib.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** 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) -*/ - -extern int lib_call(int x); - -int lib_call(int x) -{ - return x*2; -} diff --git a/v1/example/template_use/Jamfile b/v1/example/template_use/Jamfile deleted file mode 100644 index 4014dd65d..000000000 --- a/v1/example/template_use/Jamfile +++ /dev/null @@ -1,23 +0,0 @@ -# (C) Copyright Rene Rivera, 2002. -# 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) - -# Example of how to define a template. -# This is for Boost.Build-V1 - -subproject tools/build/examples/template_use ; - -# Declare the template as a target. The sources, requirements, and -# default builds sections are copied to the targets that depend (use) -# this template. -# -template t-common - : - # SOURCES - : - # REQUIREMENTS - $(SUBDIR)/include - SOME_DEFINE - : - # DEFAULT BUILDS - ; diff --git a/v1/example/template_use/include/simple.h b/v1/example/template_use/include/simple.h deleted file mode 100644 index 076aad0e8..000000000 --- a/v1/example/template_use/include/simple.h +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** 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) -*/ - -#ifndef simple_h -#define simple_h - -extern int lib_call(int x); - -#endif diff --git a/v1/example/template_use/sub/Jamfile b/v1/example/template_use/sub/Jamfile deleted file mode 100644 index e23fba86c..000000000 --- a/v1/example/template_use/sub/Jamfile +++ /dev/null @@ -1,43 +0,0 @@ -# (C) Copyright Rene Rivera, 2002. -# 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) - -# Example of how to use a template target declared in another project. -# This is for Boost.Build-V1 - -subproject tools/build/examples/template_use/sub ; - -# Declare a library target. This 'inherits' the attributes of -# the template which in this case adds the needed include -# directory. Because templates are "special" targets they -# appear in the source dependencies section and must be -# a relative reference to the template target in it's declared -# location. -# -lib simple - : - # SOURCES -