From b3d09c6a2e4c319d92799d87663518e510e28214 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 08:17:47 +0000 Subject: [PATCH 01/90] 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] --- src/tools/gcc.jam | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index b67e9001e..06dd7bcbd 100644 --- a/src/tools/gcc.jam +++ b/src/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 b933fc26571028167a84b86c73a6055522a83b67 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 08:26:13 +0000 Subject: [PATCH 02/90] 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] --- src/tools/msvc.jam | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index c80f5f98e..10fa58732 100644 --- a/src/tools/msvc.jam +++ b/src/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 3b4cca1b352ccbc693c97ecb9b81004bb12c6f6f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 10:28:03 +0000 Subject: [PATCH 03/90] 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] --- src/build/alias.jam | 2 +- src/build/targets.jam | 21 ++++++++++++----- src/tools/builtin.jam | 1 + src/tools/python.jam | 11 ++++++++- src/tools/testing.jam | 22 ++++++------------ test/inline.py | 53 ++++++++++++++++++++++++++++++------------- 6 files changed, 71 insertions(+), 39 deletions(-) diff --git a/src/build/alias.jam b/src/build/alias.jam index 35bcfea61..d7d68a376 100644 --- a/src/build/alias.jam +++ b/src/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/src/build/targets.jam b/src/build/targets.jam index 94bfc6b28..8f9134f32 100644 --- a/src/build/targets.jam +++ b/src/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/src/tools/builtin.jam b/src/tools/builtin.jam index e96fcc645..26019df41 100644 --- a/src/tools/builtin.jam +++ b/src/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/src/tools/python.jam b/src/tools/python.jam index 9f1389fce..7791e71fb 100644 --- a/src/tools/python.jam +++ b/src/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/src/tools/testing.jam b/src/tools/testing.jam index 8bb2612f1..542c9f525 100644 --- a/src/tools/testing.jam +++ b/src/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 ; diff --git a/test/inline.py b/test/inline.py index c35865cfe..45f0a5b8c 100644 --- a/test/inline.py +++ b/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() From b5d272013764f5f44eba831298ee4d80dd7ea006 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 10:37:54 +0000 Subject: [PATCH 04/90] build/ * generators.jam (construct): Remove the 'allowed-type' parameter. Adjust other files. [SVN r35608] --- src/build/generators.jam | 7 +------ src/tools/builtin.jam | 2 +- src/tools/stage.jam | 2 +- src/tools/stlport.jam | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/build/generators.jam b/src/build/generators.jam index e037bab77..3c7cfe365 100644 --- a/src/build/generators.jam +++ b/src/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/src/tools/builtin.jam b/src/tools/builtin.jam index 26019df41..859f232bf 100644 --- a/src/tools/builtin.jam +++ b/src/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/src/tools/stage.jam b/src/tools/stage.jam index cb3806eab..ab9ea585d 100644 --- a/src/tools/stage.jam +++ b/src/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/src/tools/stlport.jam b/src/tools/stlport.jam index cda3be262..ad1c1eb15 100644 --- a/src/tools/stlport.jam +++ b/src/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 349d1deea08f04087848f6b68bc7004081fffc8d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 10:45:31 +0000 Subject: [PATCH 05/90] 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] --- src/tools/python.jam | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tools/python.jam b/src/tools/python.jam index 7791e71fb..66c05bb2b 100644 --- a/src/tools/python.jam +++ b/src/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 85fff6225e9da6cefb0f57369bc1703a8070f1a7 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 15 Oct 2006 19:05:45 +0000 Subject: [PATCH 06/90] Fix comment [SVN r35620] --- src/build/project.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/project.jam b/src/build/project.jam index 08565be90..1ee6b1ec5 100644 --- a/src/build/project.jam +++ b/src/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 4a8bdad5545ac681d66f60f9430865cb83e5a875 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 16 Oct 2006 02:08:34 +0000 Subject: [PATCH 07/90] 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] --- src/build/project.jam | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/build/project.jam b/src/build/project.jam index 1ee6b1ec5..9041a2ade 100644 --- a/src/build/project.jam +++ b/src/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 78806fafd3782900ba4dfd0f0ed8cd4ce3c047d6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 16 Oct 2006 02:11:02 +0000 Subject: [PATCH 08/90] Fix some bugs in the common format-name functionality, and add some documentation. [SVN r35623] --- src/tools/common.jam | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index 5ad6ce235..5cbc21eae 100644 --- a/src/tools/common.jam +++ b/src/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 93cd350f59f14d3f467b9be17787381ad22f3f02 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 16 Oct 2006 20:43:26 +0000 Subject: [PATCH 09/90] 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] --- src/util/path.jam | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/util/path.jam b/src/util/path.jam index c63ddb2da..33403887b 100644 --- a/src/util/path.jam +++ b/src/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 1f589bcdf5c28595983342f9685a247dab1f1998 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 17 Oct 2006 02:00:56 +0000 Subject: [PATCH 10/90] Cleanup format-name docs. [SVN r35645] --- src/tools/common.jam | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index 5cbc21eae..f74de3979 100644 --- a/src/tools/common.jam +++ b/src/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 cd44da9fc36475f6828e9844ef52ad4a275ff657 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 18 Oct 2006 05:40:37 +0000 Subject: [PATCH 11/90] Improve wording of an error message. [SVN r35649] --- src/build/targets.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/targets.jam b/src/build/targets.jam index 8f9134f32..533845511 100644 --- a/src/build/targets.jam +++ b/src/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 2e6d0c4a099cea27b625ac44a828a4cee4143826 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 18 Oct 2006 13:02:31 +0000 Subject: [PATCH 12/90] Fix building on Windows. tools/ * builtin.jam: linking-generator.run (Return nothing if it failed). [SVN r35657] --- src/tools/builtin.jam | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam index 859f232bf..8e63d2c53 100644 --- a/src/tools/builtin.jam +++ b/src/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 9cf28a041e187f0175eb4a623f3c683f80ac684d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 21 Oct 2006 10:39:48 +0000 Subject: [PATCH 13/90] Don't include toolset version in libs built with bcb [SVN r35684] --- src/tools/common.jam | 8 ++++++++ src/tools/stage.jam | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/tools/common.jam b/src/tools/common.jam index f74de3979..df2a7bee5 100644 --- a/src/tools/common.jam +++ b/src/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/src/tools/stage.jam b/src/tools/stage.jam index ab9ea585d..5d4793ed8 100644 --- a/src/tools/stage.jam +++ b/src/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 99000ba15be512da32aa8269b07ec796f434ae4e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 22 Oct 2006 14:15:54 +0000 Subject: [PATCH 14/90] build/ * generators.jam (add-usage-requirements): New. [SVN r35690] --- src/build/generators.jam | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/build/generators.jam b/src/build/generators.jam index 3c7cfe365..d1013e7c3 100644 --- a/src/build/generators.jam +++ b/src/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 7498325549034b982eb955ab1b9d8843a55518c9 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 22 Oct 2006 17:41:31 +0000 Subject: [PATCH 15/90] Automatically set BOOST_BUILD_PCH_ENABLED when pch is enabled. [SVN r35692] --- src/tools/pch.jam | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/pch.jam b/src/tools/pch.jam index 575cbf568..e06a92143 100644 --- a/src/tools/pch.jam +++ b/src/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 1302f61cef0791ed36d4da3549b5d02dd6fdb52f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 23 Oct 2006 16:30:38 +0000 Subject: [PATCH 16/90] 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] --- src/util/os.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/os.jam b/src/util/os.jam index 67f1ab7f6..9e2ea1925 100644 --- a/src/util/os.jam +++ b/src/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 913bc2cadc095a1c0aa9882f57bbc3959ada1d9c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:17:44 +0000 Subject: [PATCH 17/90] * 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] --- src/tools/msvc.jam | 48 +++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 10fa58732..da83dff0a 100644 --- a/src/tools/msvc.jam +++ b/src/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 3d61766cfaba06d065d62768b41a48a257db872e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:22:21 +0000 Subject: [PATCH 18/90] Followup fix [SVN r35702] --- src/tools/msvc.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index da83dff0a..5d51d4292 100644 --- a/src/tools/msvc.jam +++ b/src/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 e8dcf9ef868fa0134d355cf67dd646fc0c641709 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:25:02 +0000 Subject: [PATCH 19/90] Adjust example [SVN r35704] --- example/pch/Jamroot | 2 +- example/pch/source/pch.cpp | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 example/pch/source/pch.cpp diff --git a/example/pch/Jamroot b/example/pch/Jamroot index 509de203a..115164aae 100644 --- a/example/pch/Jamroot +++ b/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/example/pch/source/pch.cpp b/example/pch/source/pch.cpp deleted file mode 100644 index 995e1f803..000000000 --- a/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 db4f3cacf93aeb3e87e3008ca177aa5878709f03 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 18:47:43 +0000 Subject: [PATCH 20/90] Set BOOST_BUILD_PCH_ENABLED when compiling PCH itself. [SVN r35709] --- src/tools/pch.jam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/pch.jam b/src/tools/pch.jam index e06a92143..15f9e293b 100644 --- a/src/tools/pch.jam +++ b/src/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 c316268127560e44ec8f05d4a1da4211d0c1d685 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 23 Oct 2006 19:02:12 +0000 Subject: [PATCH 21/90] Use -Winvalid-pch [SVN r35710] --- src/tools/gcc.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 06dd7bcbd..f72b33723 100644 --- a/src/tools/gcc.jam +++ b/src/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 abd8cdcc476dd68ceec55155ca25b801143c8af1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 23 Oct 2006 23:57:42 +0000 Subject: [PATCH 22/90] Remove now outdated stage renaming of targets, moved to common.jam. [SVN r35713] --- src/tools/stage.jam | 130 -------------------------------------------- 1 file changed, 130 deletions(-) diff --git a/src/tools/stage.jam b/src/tools/stage.jam index 5d4793ed8..aa27dfcc9 100644 --- a/src/tools/stage.jam +++ b/src/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 349952599cd8a937bae321f6c722b14836c7feda Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 04:15:26 +0000 Subject: [PATCH 23/90] Add MinGW tag from BBv1 (mgw) when the gcc flavor indicates it's the MinGW compiler. [SVN r35715] --- src/tools/common.jam | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index df2a7bee5..f2cef95fb 100644 --- a/src/tools/common.jam +++ b/src/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 8e287a2735e023f7fc879bbecfdd25de534c6f49 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 15:59:10 +0000 Subject: [PATCH 24/90] Add result-equal test which passes when the expected and result have the same elements. [SVN r35718] --- src/util/assert.jam | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/util/assert.jam b/src/util/assert.jam index 24525d998..2c526d92a 100644 --- a/src/util/assert.jam +++ b/src/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 40b0f5ed91486b82e2de3740d643a67104c880d3 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 16:03:22 +0000 Subject: [PATCH 25/90] Adjust unit tests to pass, to account for some results not being order-stable. [SVN r35720] --- src/build/property.jam | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/build/property.jam b/src/build/property.jam index 3ad0cd340..981a45680 100644 --- a/src/build/property.jam +++ b/src/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 3b9a41e48f8a85a7df5bb176f3f9f729b538cea5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 16:32:31 +0000 Subject: [PATCH 26/90] Adjust to make test pass on Windows. [SVN r35723] --- test/module-actions/bootstrap.jam | 15 +++------------ test/module_actions.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/test/module-actions/bootstrap.jam b/test/module-actions/bootstrap.jam index b2b752d06..ff52a60d3 100644 --- a/test/module-actions/bootstrap.jam +++ b/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/test/module_actions.py b/test/module_actions.py index 93e6d1ccd..f0c4315f8 100644 --- a/test/module_actions.py +++ b/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 f67cc20757ec958c5a5290f8f7e09b1776e6d819 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 18:07:50 +0000 Subject: [PATCH 27/90] Output the initialized toolsets when given "--show-configuration" option. [SVN r35726] --- src/tools/common.jam | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tools/common.jam b/src/tools/common.jam index f2cef95fb..35fe34615 100644 --- a/src/tools/common.jam +++ b/src/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 da98fd5c48ee927a22939b25d2e1866ae3372a6a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 23:25:19 +0000 Subject: [PATCH 28/90] 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] --- test/BoostBuild.py | 61 +++++++++++++++++++++++------ test/project-test3/project-root.jam | 12 ++++-- test/{glob.py => project_glob.py} | 8 ++-- test/regression.py | 10 ++--- test/test_all.py | 9 ++++- 5 files changed, 73 insertions(+), 27 deletions(-) rename test/{glob.py => project_glob.py} (87%) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 2aa2822f2..2e7c10ad8 100644 --- a/test/BoostBuild.py +++ b/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/test/project-test3/project-root.jam b/test/project-test3/project-root.jam index b660ceb52..8de43be51 100644 --- a/test/project-test3/project-root.jam +++ b/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/test/glob.py b/test/project_glob.py similarity index 87% rename from test/glob.py rename to test/project_glob.py index 768c59a51..412bf77db 100644 --- a/test/glob.py +++ b/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/test/regression.py b/test/regression.py index 50a0ab477..d090314d7 100644 --- a/test/regression.py +++ b/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/test/test_all.py b/test/test_all.py index e89e10594..1ded06fee 100644 --- a/test/test_all.py +++ b/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 5d66e5697b241acaf6719f5ef5c27620b503fe59 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 24 Oct 2006 23:43:08 +0000 Subject: [PATCH 29/90] Add detection of gcc compiler flavor so that we can correctly tag generated libraries to not conflict with each other. [SVN r35733] --- src/tools/gcc.jam | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index f72b33723..779a8eeec 100644 --- a/src/tools/gcc.jam +++ b/src/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 0b6c1bb75592af676ca201f0601625a99d4edfca Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Oct 2006 12:51:05 +0000 Subject: [PATCH 30/90] 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] --- src/tools/gcc.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 779a8eeec..e8e21e115 100644 --- a/src/tools/gcc.jam +++ b/src/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 2a701e9de32ea79ee5ec6c22771a83a44e54f4ad Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Oct 2006 14:25:05 +0000 Subject: [PATCH 31/90] Fix guard for autodetect of command version and flavor. [SVN r35743] --- src/tools/gcc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index e8e21e115..f903a920e 100644 --- a/src/tools/gcc.jam +++ b/src/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 aa3962bfc5cf19f179b22579413c94efb92982a5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Oct 2006 19:43:35 +0000 Subject: [PATCH 32/90] Limit the flavor to certain toolsets. For now only MinGW. [SVN r35745] --- src/tools/gcc.jam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index f903a920e..d767436d6 100644 --- a/src/tools/gcc.jam +++ b/src/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 1ef37f2e80a05de97004713fbeb20876e0cf3421 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 26 Oct 2006 09:10:55 +0000 Subject: [PATCH 33/90] Unbreak compile.c++.pch: Use -TP not -TC [SVN r35750] --- src/tools/msvc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 5d51d4292..a629853d9 100644 --- a/src/tools/msvc.jam +++ b/src/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 d5cf518648de6f5a5f2db52550edb71fdb327ed8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 28 Oct 2006 15:22:17 +0000 Subject: [PATCH 34/90] Restore BBv1 install functionality of installing to c:/Boost by default. [SVN r35761] --- src/tools/package.jam | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/package.jam b/src/tools/package.jam index e44f851bf..1bbf4a42d 100644 --- a/src/tools/package.jam +++ b/src/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 557f48d76f5ca5b2e703095552060fe2acfc174f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 28 Oct 2006 19:23:12 +0000 Subject: [PATCH 35/90] Ugly trick to handle like in V1 [SVN r35769] --- src/tools/common.jam | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index 35fe34615..2e188742b 100644 --- a/src/tools/common.jam +++ b/src/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 d652aa9fabf7d065f1025a8509416343ba0a784d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 30 Oct 2006 08:35:33 +0000 Subject: [PATCH 36/90] Unbreak multi-element gcc commands [SVN r35791] --- src/tools/gcc.jam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index d767436d6..1870e6827 100644 --- a/src/tools/gcc.jam +++ b/src/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 d6c1bd7dfd3cd98870d2933870a31faf5bbfedb6 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/90] 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] --- src/tools/qt4.jam | 172 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 119 insertions(+), 53 deletions(-) diff --git a/src/tools/qt4.jam b/src/tools/qt4.jam index 7b3baa4fb..7da33dc20 100644 --- a/src/tools/qt4.jam +++ b/src/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 addb7085a1f157c6e2e6586d46a12a99832b7ebd 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/90] Fix: enable "_debug" suffix for OSX again. [SVN r35820] --- src/tools/qt4.jam | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/qt4.jam b/src/tools/qt4.jam index 7da33dc20..020456f25 100644 --- a/src/tools/qt4.jam +++ b/src/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 08691c875a46ef4bd5e5a442bb2197aa0765901a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 4 Nov 2006 17:37:35 +0000 Subject: [PATCH 39/90] Improve PCH example [SVN r35837] --- example/pch/include/pch.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example/pch/include/pch.hpp b/example/pch/include/pch.hpp index 22df8443f..8f05cc43d 100644 --- a/example/pch/include/pch.hpp +++ b/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 45fcd476ee38beb8d2e94490c693f7c280364c9e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 4 Nov 2006 18:36:02 +0000 Subject: [PATCH 40/90] More docs [SVN r35839] --- doc/src/advanced.xml | 28 ++++++++++++++++ doc/src/tasks.xml | 79 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/doc/src/advanced.xml b/doc/src/advanced.xml index ac7fb615c..b6377858c 100644 --- a/doc/src/advanced.xml +++ b/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/doc/src/tasks.xml b/doc/src/tasks.xml index d92ec2ebf..f9e6e444f 100644 --- a/doc/src/tasks.xml +++ b/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 c5859fe13cef34cabaa9ba60f13123ffea069bc4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 00:06:35 +0000 Subject: [PATCH 41/90] Add "--default-bjam" option to force using bjam present in the system (ie the search path). [SVN r35845] --- test/BoostBuild.py | 113 +++++++++++++++++++++++---------------------- test/TestCmd.py | 18 ++++++-- 2 files changed, 74 insertions(+), 57 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 2e7c10ad8..a1aff2cba 100644 --- a/test/BoostBuild.py +++ b/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/test/TestCmd.py b/test/TestCmd.py index 6ccafc911..6096e7122 100644 --- a/test/TestCmd.py +++ b/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 02920589c45fbda99ca6227894b993bcc6c10003 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 06:24:05 +0000 Subject: [PATCH 42/90] Add copyrights+license (with help of a shell script). [SVN r35848] --- boost-build.jam | 6 ++++++ src/build-system.jam | 10 +++++----- website/boost.css | 4 ++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/boost-build.jam b/boost-build.jam index 99ebee345..73db0497b 100644 --- a/boost-build.jam +++ b/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/src/build-system.jam b/src/build-system.jam index e327d0b48..51f253bcd 100755 --- a/src/build-system.jam +++ b/src/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 diff --git a/website/boost.css b/website/boost.css index cf5c8a97f..8401b29c3 100644 --- a/website/boost.css +++ b/website/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% From ef21153e5948ebabcc31deca309004bec878496f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 06:40:20 +0000 Subject: [PATCH 43/90] Add/update copyrights+license (with help of a shell script). [SVN r35849] --- src/build/alias.jam | 7 +++---- src/build/feature.jam | 9 +++++---- src/build/project.jam | 10 +++++----- src/build/property-set.jam | 8 ++++---- src/build/property.jam | 9 +++++---- src/build/scanner.jam | 8 ++++---- src/build/toolset.jam | 9 +++++---- src/build/type.jam | 8 ++++---- src/build/version.jam | 7 +++---- src/build/virtual-target.jam | 9 +++++---- 10 files changed, 43 insertions(+), 41 deletions(-) diff --git a/src/build/alias.jam b/src/build/alias.jam index d7d68a376..993243b03 100644 --- a/src/build/alias.jam +++ b/src/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/src/build/feature.jam b/src/build/feature.jam index e6ad37f35..b9b9e8822 100644 --- a/src/build/feature.jam +++ b/src/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/src/build/project.jam b/src/build/project.jam index 9041a2ade..f37161f88 100644 --- a/src/build/project.jam +++ b/src/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/src/build/property-set.jam b/src/build/property-set.jam index 00e8383e6..bed3b4b4f 100644 --- a/src/build/property-set.jam +++ b/src/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/src/build/property.jam b/src/build/property.jam index 981a45680..21b4e389b 100644 --- a/src/build/property.jam +++ b/src/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/src/build/scanner.jam b/src/build/scanner.jam index b070f0fa5..2dae65d29 100644 --- a/src/build/scanner.jam +++ b/src/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/src/build/toolset.jam b/src/build/toolset.jam index db94c9bba..95996af6f 100644 --- a/src/build/toolset.jam +++ b/src/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/src/build/type.jam b/src/build/type.jam index 5c98b379c..2c40d89f4 100644 --- a/src/build/type.jam +++ b/src/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/src/build/version.jam b/src/build/version.jam index 3eb71a172..62177b7f0 100644 --- a/src/build/version.jam +++ b/src/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/src/build/virtual-target.jam b/src/build/virtual-target.jam index fb30279d5..34ca0475f 100644 --- a/src/build/virtual-target.jam +++ b/src/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 9ef6242538d655873663b52e1d2d98c8d84b671a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 07:13:39 +0000 Subject: [PATCH 44/90] Add/update copyrights+license (with help of a shell script). [SVN r35851] --- example/boost-build.jam | 6 +++++- example/customization/Jamfile | 6 +++++- example/customization/inline_file.py | 7 +++---- example/customization/project-root.jam | 6 +++++- example/customization/verbatim.jam | 10 ++++------ example/gettext/Jamfile | 4 ++++ example/gettext/project-root.jam | 6 +++++- example/libraries/app/Jamfile | 6 +++++- example/libraries/util/foo/Jamfile | 6 +++++- example/site-config.jam | 5 ++++- example/user-config.jam | 9 +++++---- example/variant/Jamfile | 4 ++++ example/variant/libs/Jamfile | 6 +++++- example/variant/project-root.jam | 6 +++++- example/versioned/jamfile.jam | 7 +++---- example/versioned/project-root.jam | 8 ++++---- generators_prototype.py | 8 +++----- scripts/nightly.sh | 4 ++++ scripts/roll.sh | 8 +++++++- src/kernel/boost-build.jam | 11 +++++------ src/kernel/bootstrap.jam | 10 +++++----- src/kernel/class.jam | 11 ++++++----- src/kernel/errors.jam | 8 ++++---- src/kernel/modules.jam | 8 ++++---- src/options/help.jam | 10 +++++----- src/tools/bison.jam | 9 ++++----- src/tools/boostbook.jam | 11 ++++++----- src/tools/borland.jam | 12 +++++------- src/tools/builtin.jam | 11 +++++++---- src/tools/common.jam | 10 ++++++---- src/tools/como-linux.jam | 7 +++---- src/tools/darwin.jam | 10 +++++----- src/tools/doxygen.jam | 11 +++++------ src/tools/gettext.jam | 9 ++++----- src/tools/kylix.jam | 7 +++---- src/tools/lex.jam | 9 ++++----- src/tools/make.jam | 10 ++++++---- src/tools/qt3.jam | 7 +++---- src/tools/stage.jam | 9 +++++---- src/tools/stlport.jam | 13 +++++-------- src/tools/symlink.jam | 9 +++++---- src/tools/testing.jam | 10 ++++------ src/util/assert.jam | 11 ++++++----- src/util/container.jam | 9 +++++---- src/util/doc.jam | 9 +++++---- src/util/indirect.jam | 12 ++++++------ src/util/numbers.jam | 8 ++++---- src/util/os.jam | 9 +++++---- src/util/print.jam | 9 +++++---- src/util/regex.jam | 10 ++++++---- src/util/sequence.jam | 9 +++++---- src/util/set.jam | 8 ++++---- src/util/string.jam | 9 ++++----- src/util/utility.jam | 8 ++++---- 54 files changed, 253 insertions(+), 202 deletions(-) diff --git a/example/boost-build.jam b/example/boost-build.jam index 776bf004a..efcc231fe 100644 --- a/example/boost-build.jam +++ b/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/example/customization/Jamfile b/example/customization/Jamfile index 08e0f8b8a..eee0f4f4c 100644 --- a/example/customization/Jamfile +++ b/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/example/customization/inline_file.py b/example/customization/inline_file.py index 4b8d82751..a48c5fc9d 100644 --- a/example/customization/inline_file.py +++ b/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/example/customization/project-root.jam b/example/customization/project-root.jam index b822c673d..ab8bbf880 100644 --- a/example/customization/project-root.jam +++ b/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/example/customization/verbatim.jam b/example/customization/verbatim.jam index a6bbf8b41..931fdce33 100644 --- a/example/customization/verbatim.jam +++ b/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/example/gettext/Jamfile b/example/gettext/Jamfile index f937bcb4f..d5096df30 100644 --- a/example/gettext/Jamfile +++ b/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/example/gettext/project-root.jam b/example/gettext/project-root.jam index ad03c4d23..862f8930c 100644 --- a/example/gettext/project-root.jam +++ b/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/example/libraries/app/Jamfile b/example/libraries/app/Jamfile index 1d542039c..ed2054e13 100644 --- a/example/libraries/app/Jamfile +++ b/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/example/libraries/util/foo/Jamfile b/example/libraries/util/foo/Jamfile index c5a6e91d2..7b6359ea4 100644 --- a/example/libraries/util/foo/Jamfile +++ b/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/example/site-config.jam b/example/site-config.jam index f2734a111..ad22d6744 100644 --- a/example/site-config.jam +++ b/example/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/example/user-config.jam b/example/user-config.jam index 2df39ab43..db327685c 100644 --- a/example/user-config.jam +++ b/example/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/example/variant/Jamfile b/example/variant/Jamfile index a14fe282b..8ae5990d0 100644 --- a/example/variant/Jamfile +++ b/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/example/variant/libs/Jamfile b/example/variant/libs/Jamfile index e3749a26a..4366b7624 100644 --- a/example/variant/libs/Jamfile +++ b/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/example/variant/project-root.jam b/example/variant/project-root.jam index 0de93a8e7..e19476ccc 100644 --- a/example/variant/project-root.jam +++ b/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/example/versioned/jamfile.jam b/example/versioned/jamfile.jam index ef30354db..913cdf4d7 100644 --- a/example/versioned/jamfile.jam +++ b/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/example/versioned/project-root.jam b/example/versioned/project-root.jam index dec7f8d33..981d3eb50 100644 --- a/example/versioned/project-root.jam +++ b/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/generators_prototype.py b/generators_prototype.py index 45f10c01e..80d910a09 100644 --- a/generators_prototype.py +++ b/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/scripts/nightly.sh b/scripts/nightly.sh index 8ccb1cda4..14298c13f 100644 --- a/scripts/nightly.sh +++ b/scripts/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/scripts/roll.sh b/scripts/roll.sh index eb0415b46..5fa840f0c 100644 --- a/scripts/roll.sh +++ b/scripts/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/src/kernel/boost-build.jam b/src/kernel/boost-build.jam index 561c362af..377f6ec02 100755 --- a/src/kernel/boost-build.jam +++ b/src/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/src/kernel/bootstrap.jam b/src/kernel/bootstrap.jam index 67b681449..59b46762d 100755 --- a/src/kernel/bootstrap.jam +++ b/src/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/src/kernel/class.jam b/src/kernel/class.jam index 92b970ad8..2857718ab 100644 --- a/src/kernel/class.jam +++ b/src/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/src/kernel/errors.jam b/src/kernel/errors.jam index 20e61092c..40bb7c94f 100755 --- a/src/kernel/errors.jam +++ b/src/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/src/kernel/modules.jam b/src/kernel/modules.jam index 0ee2b27eb..580c1bac4 100755 --- a/src/kernel/modules.jam +++ b/src/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/src/options/help.jam b/src/options/help.jam index c087592ee..16e448457 100755 --- a/src/options/help.jam +++ b/src/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/src/tools/bison.jam b/src/tools/bison.jam index 4e6c8de9f..0689d4bd8 100644 --- a/src/tools/bison.jam +++ b/src/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/src/tools/boostbook.jam b/src/tools/boostbook.jam index c92dbce74..e1b5db19a 100644 --- a/src/tools/boostbook.jam +++ b/src/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/src/tools/borland.jam b/src/tools/borland.jam index e19c9005b..1c099d6d2 100644 --- a/src/tools/borland.jam +++ b/src/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/src/tools/builtin.jam b/src/tools/builtin.jam index 8e63d2c53..e057567d8 100644 --- a/src/tools/builtin.jam +++ b/src/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/src/tools/common.jam b/src/tools/common.jam index 2e188742b..fee26a2b2 100644 --- a/src/tools/common.jam +++ b/src/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/src/tools/como-linux.jam b/src/tools/como-linux.jam index c6e6a23fe..4af2628c3 100644 --- a/src/tools/como-linux.jam +++ b/src/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/src/tools/darwin.jam b/src/tools/darwin.jam index 14dd0008e..b14ff5407 100644 --- a/src/tools/darwin.jam +++ b/src/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/src/tools/doxygen.jam b/src/tools/doxygen.jam index 8acbea5ff..e471e99fe 100644 --- a/src/tools/doxygen.jam +++ b/src/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/src/tools/gettext.jam b/src/tools/gettext.jam index 604fbc4fe..c72eb9e8b 100644 --- a/src/tools/gettext.jam +++ b/src/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/src/tools/kylix.jam b/src/tools/kylix.jam index 2a4162593..342aee089 100644 --- a/src/tools/kylix.jam +++ b/src/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/src/tools/lex.jam b/src/tools/lex.jam index 1f0126901..75d641318 100644 --- a/src/tools/lex.jam +++ b/src/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/src/tools/make.jam b/src/tools/make.jam index 4880eeee1..0328b6c1b 100644 --- a/src/tools/make.jam +++ b/src/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/src/tools/qt3.jam b/src/tools/qt3.jam index ba7c63928..bf8036631 100644 --- a/src/tools/qt3.jam +++ b/src/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/src/tools/stage.jam b/src/tools/stage.jam index aa27dfcc9..d955f40b3 100644 --- a/src/tools/stage.jam +++ b/src/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/src/tools/stlport.jam b/src/tools/stlport.jam index ad1c1eb15..3e83d7365 100644 --- a/src/tools/stlport.jam +++ b/src/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/src/tools/symlink.jam b/src/tools/symlink.jam index ae785d08c..deec452cb 100644 --- a/src/tools/symlink.jam +++ b/src/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/src/tools/testing.jam b/src/tools/testing.jam index 542c9f525..e195c93d2 100644 --- a/src/tools/testing.jam +++ b/src/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/src/util/assert.jam b/src/util/assert.jam index 2c526d92a..d4eacc47d 100644 --- a/src/util/assert.jam +++ b/src/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/src/util/container.jam b/src/util/container.jam index 6ad63d857..673f11ac6 100644 --- a/src/util/container.jam +++ b/src/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/src/util/doc.jam b/src/util/doc.jam index 5f4829709..697bff487 100644 --- a/src/util/doc.jam +++ b/src/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/src/util/indirect.jam b/src/util/indirect.jam index 1ed0c9799..41fda47d1 100755 --- a/src/util/indirect.jam +++ b/src/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/src/util/numbers.jam b/src/util/numbers.jam index 2a23af698..1d3d68692 100644 --- a/src/util/numbers.jam +++ b/src/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/src/util/os.jam b/src/util/os.jam index 9e2ea1925..f95c69a24 100644 --- a/src/util/os.jam +++ b/src/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/src/util/print.jam b/src/util/print.jam index ceaeaace9..63ee70023 100644 --- a/src/util/print.jam +++ b/src/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/src/util/regex.jam b/src/util/regex.jam index 1b9b885e9..c805abb2c 100644 --- a/src/util/regex.jam +++ b/src/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/src/util/sequence.jam b/src/util/sequence.jam index 4b2d4e935..00a60c5aa 100644 --- a/src/util/sequence.jam +++ b/src/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/src/util/set.jam b/src/util/set.jam index af05cfa5b..6e75546be 100644 --- a/src/util/set.jam +++ b/src/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/src/util/string.jam b/src/util/string.jam index 153d8deec..dc19b2d13 100644 --- a/src/util/string.jam +++ b/src/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/src/util/utility.jam b/src/util/utility.jam index 8d2524931..01d100806 100644 --- a/src/util/utility.jam +++ b/src/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 602b6d8b13affd234282f3767d0686b2f8d134f2 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 Nov 2006 18:13:42 +0000 Subject: [PATCH 45/90] Add/update copyrights+license (with help of a shell script). [SVN r35856] --- test/Jamfile | 4 ++++ test/absolute_sources.py | 4 ++++ test/alias.py | 5 +++++ test/alternatives.py | 5 +++++ test/assert-equal.jam | 4 ++++ test/bad_dirname.py | 8 +++----- test/boost-build.jam | 4 ++++ test/boostbook.py | 7 +++---- test/build_dir.py | 5 +++++ test/c_file.py | 7 +++---- test/chain.py | 5 +++++ test/check-arguments.jam | 8 +++----- test/check-bindrule.jam | 6 +++++- test/check-jam-patches.jam | 6 +++++- test/check-test-tools.jam | 4 ++++ test/composite.py | 7 +++---- test/conditionals.py | 5 +++++ test/conditionals2.py | 7 +++---- test/conditionals3.py | 7 +++---- test/core_d12.py | 4 ++++ test/core_delete_module.py | 4 ++++ test/core_dependencies.py | 4 ++++ test/core_import_module.py | 7 +++---- test/core_modifiers.py | 4 ++++ test/core_typecheck.py | 4 ++++ test/core_varnames.py | 4 ++++ test/custom_generator.py | 7 +++---- test/default_build.py | 5 +++++ test/default_features.py | 7 +++---- test/generators_test.py | 5 +++++ test/inherit_toolset.py | 7 +++---- test/inline.py | 7 +++---- test/library_chain.py | 7 +++---- test/library_order.py | 7 +++---- test/library_property.py | 7 +++---- test/loop.py | 7 +++---- test/m1-01.py | 5 +++++ test/m1-02.py | 4 ++++ test/m1-03.py | 5 +++++ test/make_rule.py | 5 +++++ test/module_actions.py | 6 ++++++ test/ndebug.py | 7 +++---- test/no_type.py | 4 ++++ test/ordered_properties.py | 7 +++---- test/path_features.py | 5 +++++ test/prebuilt.py | 4 ++++ test/print.py | 5 +++++ test/project-test1.jam | 6 ++++++ test/project_dependencies.py | 5 +++++ test/project_root_constants.py | 7 +++---- test/project_test1.py | 5 +++++ test/project_test3.py | 5 +++++ test/project_test4.py | 5 +++++ test/property_expansion.py | 7 +++---- test/railsys.py | 7 +++---- test/rebuilds.py | 4 ++++ test/recursive.jam | 9 ++++----- test/relative_sources.py | 5 +++++ test/searched_lib.py | 5 +++++ test/skipping.py | 7 +++---- test/stage.py | 5 +++++ test/standalone.py | 8 +++----- test/startup_v1.py | 5 +++++ test/startup_v2.py | 5 +++++ test/suffix.py | 7 +++---- test/symlink.py | 5 +++++ test/test-config-example.jam | 6 +++++- test/test.jam | 6 ++++++ test/test1.py | 4 ++++ test/test2.py | 5 +++++ test/test_nt_line_length.jam | 8 +++----- test/testing_primitives.py | 4 ++++ test/tree.py | 9 ++++----- test/unit-tests.jam | 10 ++++------ test/unit_test.py | 7 +++---- test/unit_tests.py | 4 ++++ test/unused.py | 4 ++++ test/use_requirements.py | 5 +++++ test/v1_testing.py | 5 +++++ test/wrapper.py | 7 +++---- 80 files changed, 327 insertions(+), 131 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 1b9a73df8..9d186f3c1 100644 --- a/test/Jamfile +++ b/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/test/absolute_sources.py b/test/absolute_sources.py index a7664be0e..cd658765e 100644 --- a/test/absolute_sources.py +++ b/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/test/alias.py b/test/alias.py index 1a68ec559..a4f1be260 100644 --- a/test/alias.py +++ b/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/test/alternatives.py b/test/alternatives.py index 0c1d91abb..9d10c6f1d 100644 --- a/test/alternatives.py +++ b/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/test/assert-equal.jam b/test/assert-equal.jam index 0c1229f8a..6ed501e74 100644 --- a/test/assert-equal.jam +++ b/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/test/bad_dirname.py b/test/bad_dirname.py index 57e43abd7..c6c2ead49 100644 --- a/test/bad_dirname.py +++ b/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/test/boost-build.jam b/test/boost-build.jam index 63431b2a2..ad68a288e 100644 --- a/test/boost-build.jam +++ b/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/test/boostbook.py b/test/boostbook.py index 5e07f1e09..17edc636c 100644 --- a/test/boostbook.py +++ b/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/test/build_dir.py b/test/build_dir.py index 5bfe5b0df..578e498c3 100644 --- a/test/build_dir.py +++ b/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/test/c_file.py b/test/c_file.py index 0239673b2..cf6121e9d 100644 --- a/test/c_file.py +++ b/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/test/chain.py b/test/chain.py index 2cd8e17d9..b11979928 100644 --- a/test/chain.py +++ b/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/test/check-arguments.jam b/test/check-arguments.jam index c87bf3a51..20e025074 100644 --- a/test/check-arguments.jam +++ b/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/test/check-bindrule.jam b/test/check-bindrule.jam index aecc77592..f8eb986e3 100644 --- a/test/check-bindrule.jam +++ b/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/test/check-jam-patches.jam b/test/check-jam-patches.jam index 8f88ae254..7e00bec20 100644 --- a/test/check-jam-patches.jam +++ b/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/test/check-test-tools.jam b/test/check-test-tools.jam index ac03aa505..adf78cc3b 100644 --- a/test/check-test-tools.jam +++ b/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/test/composite.py b/test/composite.py index 7faeba419..d1a795be7 100644 --- a/test/composite.py +++ b/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/test/conditionals.py b/test/conditionals.py index 63afe173e..ec31d4412 100644 --- a/test/conditionals.py +++ b/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/test/conditionals2.py b/test/conditionals2.py index 3145a14d2..88877573a 100644 --- a/test/conditionals2.py +++ b/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/test/conditionals3.py b/test/conditionals3.py index 9e6c2b88b..fefb97798 100644 --- a/test/conditionals3.py +++ b/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/test/core_d12.py b/test/core_d12.py index 72ec9de53..94f3cdb33 100644 --- a/test/core_d12.py +++ b/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/test/core_delete_module.py b/test/core_delete_module.py index 92ac99906..6a5fa7c03 100644 --- a/test/core_delete_module.py +++ b/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/test/core_dependencies.py b/test/core_dependencies.py index 24155e416..ee6de2aba 100644 --- a/test/core_dependencies.py +++ b/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/test/core_import_module.py b/test/core_import_module.py index d4a1d5426..0f1d6cea1 100644 --- a/test/core_import_module.py +++ b/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/test/core_modifiers.py b/test/core_modifiers.py index 69b9f7b1f..bebcc5fde 100644 --- a/test/core_modifiers.py +++ b/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/test/core_typecheck.py b/test/core_typecheck.py index 2de82e686..31f408356 100644 --- a/test/core_typecheck.py +++ b/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/test/core_varnames.py b/test/core_varnames.py index 82fcf3c91..8e48bb3b8 100644 --- a/test/core_varnames.py +++ b/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/test/custom_generator.py b/test/custom_generator.py index 5a66daa35..7b73e2f22 100644 --- a/test/custom_generator.py +++ b/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/test/default_build.py b/test/default_build.py index cde428e91..90a188aef 100644 --- a/test/default_build.py +++ b/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/test/default_features.py b/test/default_features.py index d01267ee6..2924d8dfc 100644 --- a/test/default_features.py +++ b/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/test/generators_test.py b/test/generators_test.py index ca5d29840..209960845 100644 --- a/test/generators_test.py +++ b/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/test/inherit_toolset.py b/test/inherit_toolset.py index 947af6e46..1c95df68b 100644 --- a/test/inherit_toolset.py +++ b/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/test/inline.py b/test/inline.py index 45f0a5b8c..39bfecd75 100644 --- a/test/inline.py +++ b/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/test/library_chain.py b/test/library_chain.py index f98de9646..e211b9baf 100644 --- a/test/library_chain.py +++ b/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/test/library_order.py b/test/library_order.py index e6e4e2465..f5638a7ba 100644 --- a/test/library_order.py +++ b/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/test/library_property.py b/test/library_property.py index 1b95f7415..933e25aa8 100644 --- a/test/library_property.py +++ b/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/test/loop.py b/test/loop.py index 558e99cf8..f45ebea7c 100644 --- a/test/loop.py +++ b/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/test/m1-01.py b/test/m1-01.py index f9b0a3429..34d82db98 100644 --- a/test/m1-01.py +++ b/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/test/m1-02.py b/test/m1-02.py index df5d66bc6..86e6312da 100644 --- a/test/m1-02.py +++ b/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/test/m1-03.py b/test/m1-03.py index 4dc9db372..15b0ff0ed 100644 --- a/test/m1-03.py +++ b/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/test/make_rule.py b/test/make_rule.py index 6ee423774..c204d7a40 100644 --- a/test/make_rule.py +++ b/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/test/module_actions.py b/test/module_actions.py index f0c4315f8..c35fb0ba5 100644 --- a/test/module_actions.py +++ b/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/test/ndebug.py b/test/ndebug.py index 1d7179cbe..b4d071f80 100644 --- a/test/ndebug.py +++ b/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/test/no_type.py b/test/no_type.py index fbf6f6661..509e93538 100644 --- a/test/no_type.py +++ b/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/test/ordered_properties.py b/test/ordered_properties.py index 0fe448fb9..3025acfba 100644 --- a/test/ordered_properties.py +++ b/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/test/path_features.py b/test/path_features.py index 7640e4a04..582b05e7e 100644 --- a/test/path_features.py +++ b/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/test/prebuilt.py b/test/prebuilt.py index 5f367eb56..58590aae7 100644 --- a/test/prebuilt.py +++ b/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/test/print.py b/test/print.py index 77d83f619..62d2c7260 100644 --- a/test/print.py +++ b/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/test/project-test1.jam b/test/project-test1.jam index 9fe1ab988..c2d6ae576 100644 --- a/test/project-test1.jam +++ b/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/test/project_dependencies.py b/test/project_dependencies.py index a59a50bf5..e0cdcb686 100644 --- a/test/project_dependencies.py +++ b/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/test/project_root_constants.py b/test/project_root_constants.py index 8642eb335..1129ed801 100644 --- a/test/project_root_constants.py +++ b/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/test/project_test1.py b/test/project_test1.py index a0753c3e4..c4a3a8c2f 100644 --- a/test/project_test1.py +++ b/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/test/project_test3.py b/test/project_test3.py index d8d4b57e0..cd1afadc7 100644 --- a/test/project_test3.py +++ b/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/test/project_test4.py b/test/project_test4.py index 60ccb1220..ec735df0f 100644 --- a/test/project_test4.py +++ b/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/test/property_expansion.py b/test/property_expansion.py index fce792b80..2371d87bd 100644 --- a/test/property_expansion.py +++ b/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/test/railsys.py b/test/railsys.py index 1581a0e31..10db5c3a0 100644 --- a/test/railsys.py +++ b/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/test/rebuilds.py b/test/rebuilds.py index ce63117f2..87c4d26da 100644 --- a/test/rebuilds.py +++ b/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/test/recursive.jam b/test/recursive.jam index b83649e64..8087f7da7 100644 --- a/test/recursive.jam +++ b/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/test/relative_sources.py b/test/relative_sources.py index 8bab211ad..e03f999bc 100644 --- a/test/relative_sources.py +++ b/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/test/searched_lib.py b/test/searched_lib.py index 353d21dea..9e3ea7f48 100644 --- a/test/searched_lib.py +++ b/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/test/skipping.py b/test/skipping.py index 34e41066c..0c74a89f4 100644 --- a/test/skipping.py +++ b/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/test/stage.py b/test/stage.py index e116baffd..ba7ff693f 100644 --- a/test/stage.py +++ b/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/test/standalone.py b/test/standalone.py index 94e62593a..70a95ee88 100644 --- a/test/standalone.py +++ b/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/test/startup_v1.py b/test/startup_v1.py index 2d80c8a02..3598c9351 100644 --- a/test/startup_v1.py +++ b/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/test/startup_v2.py b/test/startup_v2.py index cdf31026a..abffbb828 100644 --- a/test/startup_v2.py +++ b/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/test/suffix.py b/test/suffix.py index 7a73feb1d..38b8ad2a3 100644 --- a/test/suffix.py +++ b/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/test/symlink.py b/test/symlink.py index 86fa0a06a..92c06248f 100644 --- a/test/symlink.py +++ b/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/test/test-config-example.jam b/test/test-config-example.jam index 4e4822aab..b2f3170c5 100644 --- a/test/test-config-example.jam +++ b/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/test/test.jam b/test/test.jam index b3aa7bf89..5e1aae9bc 100644 --- a/test/test.jam +++ b/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/test/test1.py b/test/test1.py index d02ea29aa..9253269a9 100644 --- a/test/test1.py +++ b/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/test/test2.py b/test/test2.py index cb74b851f..b982d4001 100644 --- a/test/test2.py +++ b/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/test/test_nt_line_length.jam b/test/test_nt_line_length.jam index 9fce71b97..bc003964e 100644 --- a/test/test_nt_line_length.jam +++ b/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/test/testing_primitives.py b/test/testing_primitives.py index 8e8c04490..b2607390b 100644 --- a/test/testing_primitives.py +++ b/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/test/tree.py b/test/tree.py index ade46718f..561f8e4f8 100644 --- a/test/tree.py +++ b/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/test/unit-tests.jam b/test/unit-tests.jam index 67fdf5d8b..212f4c388 100644 --- a/test/unit-tests.jam +++ b/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/test/unit_test.py b/test/unit_test.py index 7184dc3a8..bb0d0474f 100644 --- a/test/unit_test.py +++ b/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/test/unit_tests.py b/test/unit_tests.py index a5e2af4e1..7da89f609 100644 --- a/test/unit_tests.py +++ b/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/test/unused.py b/test/unused.py index c369983c1..976efed89 100644 --- a/test/unused.py +++ b/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/test/use_requirements.py b/test/use_requirements.py index fb40573af..679436e1a 100644 --- a/test/use_requirements.py +++ b/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/test/v1_testing.py b/test/v1_testing.py index 77ffc47bf..b1de60fb1 100644 --- a/test/v1_testing.py +++ b/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/test/wrapper.py b/test/wrapper.py index 345034f91..74e8516f0 100644 --- a/test/wrapper.py +++ b/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 5b5b339cf11aa8ae6e8d55802a4370a77cb157a6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 6 Nov 2006 01:44:13 +0000 Subject: [PATCH 46/90] Add copyrights+license (with help of a shell script). [SVN r35861] --- doc/development_plan.html | 5 +++++ doc/src/tasks.xml | 4 ++++ doc/src/v1_vs_v2.xml | 4 ++++ doc/tools.html | 5 +++++ example/customization/readme.txt | 4 ++++ example/gettext/readme.txt | 4 ++++ example/make/readme.txt | 4 ++++ example/python_modules/readme.txt | 6 +++++- example/qt/README.txt | 4 ++++ example/variant/readme.txt | 6 +++++- notes/README.txt | 4 ++++ notes/build_dir_option.txt | 4 ++++ notes/changes.txt | 4 ++++ notes/hacking.txt | 4 ++++ notes/relative_source_paths.txt | 4 ++++ notes/release_procedure.txt | 4 ++++ src/build/readme.txt | 5 +++++ test/boostbook/a.hpp | 6 +++++- test/boostbook/docs.xml | 5 +++++ test/dependency-test/Jamfile | 4 ++++ test/dependency-test/foo.jam | 5 +++++ test/dependency-test/project-root.jam | 4 ++++ test/dependency-test/src1/z.h | 4 ++++ test/direct-request-test/Jamfile | 6 +++++- test/direct-request-test/project-root.jam | 4 ++++ test/generators-test/Jamfile | 4 ++++ test/generators-test/extra.jam | 4 ++++ test/generators-test/lex.jam | 9 ++++----- test/generators-test/lib/Jamfile | 7 ++++++- test/generators-test/nm.jam | 5 +++++ test/generators-test/project-root.jam | 4 ++++ test/generators-test/qt.jam | 5 +++++ test/module-actions/boost-build.jam | 4 ++++ test/module-actions/bootstrap.jam | 5 +++++ test/prebuilt/Jamfile | 4 ++++ test/prebuilt/ext/Jamfile | 6 +++++- test/prebuilt/ext/project-root.jam | 4 ++++ test/prebuilt/project-root.jam | 4 ++++ test/project-test1/Jamfile | 5 +++++ test/project-test1/dir/Jamfile | 7 ++++++- test/project-test1/dir2/Jamfile | 5 +++++ test/project-test1/dir2/project-root.jam | 4 ++++ test/project-test1/project-root.jam | 6 +++++- test/project-test1/project-test1.jam | 5 +++++ test/project-test1/readme.txt | 7 ++++++- test/project-test1/standalone-project.jam | 6 +++++- test/project-test3/Jamfile | 6 +++++- test/project-test3/lib/Jamfile | 6 +++++- test/project-test3/lib2/Jamfile | 4 ++++ test/project-test3/lib2/helper/Jamfile | 4 ++++ test/project-test3/lib3/project-root.jam | 5 +++++ test/project-test3/readme.txt | 4 ++++ test/project-test4/Jamfile | 5 +++++ test/project-test4/lib/Jamfile | 4 ++++ test/project-test4/lib2/Jamfile | 4 ++++ test/project-test4/project-root.jam | 4 ++++ test/project-test4/readme.txt | 6 +++++- test/startup/boost-root/boost-build.jam | 5 +++++ test/startup/boost-root/build/boost-build.jam | 4 ++++ test/startup/boost-root/build/bootstrap.jam | 4 ++++ test/startup/bootstrap-env/boost-build.jam | 6 +++++- test/startup/bootstrap-explicit/boost-build.jam | 7 ++++++- test/startup/bootstrap-implicit/readme.txt | 6 +++++- test/startup/no-bootstrap1/boost-build.jam | 4 ++++ test/startup/no-bootstrap1/subdir/readme.txt | 6 +++++- test/startup/no-bootstrap2/boost-build.jam | 6 +++++- test/startup/no-bootstrap3/boost-build.jam | 6 +++++- test/test2/Jamfile | 6 +++++- test/testing-primitives/boost-build.jam | 4 ++++ test/testing-primitives/bootstrap.jam | 4 ++++ test/unused/Jamfile | 6 +++++- test/unused/b.cpp | 4 ++++ test/unused/project-root.jam | 4 ++++ test/v1-testing/Jamfile | 6 +++++- test/v1-testing/boost-build.jam | 4 ++++ test/v1_testing/Jamfile | 6 +++++- test/v1_testing/boost-build.jam | 6 +++++- test/v1_testing/project-root.jam | 6 +++++- website/index.html | 5 +++++ 79 files changed, 360 insertions(+), 30 deletions(-) diff --git a/doc/development_plan.html b/doc/development_plan.html index b18aa1e95..598c23dae 100644 --- a/doc/development_plan.html +++ b/doc/development_plan.html @@ -1,5 +1,10 @@ + + + + + + + + + Common tasks diff --git a/doc/src/v1_vs_v2.xml b/doc/src/v1_vs_v2.xml index 7223175e7..8b77b8f01 100644 --- a/doc/src/v1_vs_v2.xml +++ b/doc/src/v1_vs_v2.xml @@ -2,6 +2,10 @@ + + + + Differences to Boost.Build V1 + + + + + + + + + src1 diff --git a/test/dependency-test/foo.jam b/test/dependency-test/foo.jam index 56e406822..1cf44681d 100644 --- a/test/dependency-test/foo.jam +++ b/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/test/dependency-test/project-root.jam b/test/dependency-test/project-root.jam index 3ff7e59bf..e779ecc91 100644 --- a/test/dependency-test/project-root.jam +++ b/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/test/dependency-test/src1/z.h b/test/dependency-test/src1/z.h index 57084f4a9..7b8ca34e6 100644 --- a/test/dependency-test/src1/z.h +++ b/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/test/direct-request-test/Jamfile b/test/direct-request-test/Jamfile index 48541ca30..f57874d3f 100644 --- a/test/direct-request-test/Jamfile +++ b/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/test/direct-request-test/project-root.jam b/test/direct-request-test/project-root.jam index 487eef980..845aca854 100644 --- a/test/direct-request-test/project-root.jam +++ b/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/test/generators-test/Jamfile b/test/generators-test/Jamfile index 8091b2264..e5d9242d3 100644 --- a/test/generators-test/Jamfile +++ b/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/test/generators-test/extra.jam b/test/generators-test/extra.jam index ef639e1ef..01f086a88 100644 --- a/test/generators-test/extra.jam +++ b/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/test/generators-test/lex.jam b/test/generators-test/lex.jam index 80fc651e8..4ae5422e9 100644 --- a/test/generators-test/lex.jam +++ b/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/test/generators-test/lib/Jamfile b/test/generators-test/lib/Jamfile index 5f9c7ade0..48ff90fd2 100644 --- a/test/generators-test/lib/Jamfile +++ b/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/test/generators-test/nm.jam b/test/generators-test/nm.jam index a3044add0..ae5cda8a5 100644 --- a/test/generators-test/nm.jam +++ b/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/test/generators-test/project-root.jam b/test/generators-test/project-root.jam index 7878cf2d2..abe08bc43 100644 --- a/test/generators-test/project-root.jam +++ b/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/test/generators-test/qt.jam b/test/generators-test/qt.jam index 1a4450791..ec0ee3374 100644 --- a/test/generators-test/qt.jam +++ b/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/test/module-actions/boost-build.jam b/test/module-actions/boost-build.jam index d3ce8b45b..377f6ec02 100644 --- a/test/module-actions/boost-build.jam +++ b/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/test/module-actions/bootstrap.jam b/test/module-actions/bootstrap.jam index ff52a60d3..9ea9e738c 100644 --- a/test/module-actions/bootstrap.jam +++ b/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/test/prebuilt/Jamfile b/test/prebuilt/Jamfile index 02c8e5899..18b731ae1 100644 --- a/test/prebuilt/Jamfile +++ b/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/test/prebuilt/ext/Jamfile b/test/prebuilt/ext/Jamfile index 3393bbea9..6ae423514 100644 --- a/test/prebuilt/ext/Jamfile +++ b/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/test/prebuilt/ext/project-root.jam b/test/prebuilt/ext/project-root.jam index 8b1378917..c7617d5d3 100644 --- a/test/prebuilt/ext/project-root.jam +++ b/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/test/prebuilt/project-root.jam b/test/prebuilt/project-root.jam index e69de29bb..f022c0d64 100644 --- a/test/prebuilt/project-root.jam +++ b/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/test/project-test1/Jamfile b/test/project-test1/Jamfile index 34bca8fdb..d343ba6df 100644 --- a/test/project-test1/Jamfile +++ b/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/test/project-test1/dir/Jamfile b/test/project-test1/dir/Jamfile index 6d989cd4d..3434eb791 100644 --- a/test/project-test1/dir/Jamfile +++ b/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/test/project-test1/dir2/Jamfile b/test/project-test1/dir2/Jamfile index cce0e26dc..8d1c48b65 100644 --- a/test/project-test1/dir2/Jamfile +++ b/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/test/project-test1/dir2/project-root.jam b/test/project-test1/dir2/project-root.jam index e69de29bb..8cfc3a28e 100644 --- a/test/project-test1/dir2/project-root.jam +++ b/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/test/project-test1/project-root.jam b/test/project-test1/project-root.jam index 2c2f84a4f..a61a11c1d 100644 --- a/test/project-test1/project-root.jam +++ b/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/test/project-test1/project-test1.jam b/test/project-test1/project-test1.jam index e09e6750c..2f2aad25c 100644 --- a/test/project-test1/project-test1.jam +++ b/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/test/project-test1/readme.txt b/test/project-test1/readme.txt index b92e93208..000179924 100644 --- a/test/project-test1/readme.txt +++ b/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/test/project-test1/standalone-project.jam b/test/project-test1/standalone-project.jam index 6e630015e..48249b561 100644 --- a/test/project-test1/standalone-project.jam +++ b/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/test/project-test3/Jamfile b/test/project-test3/Jamfile index 3bb01cd07..f07960770 100644 --- a/test/project-test3/Jamfile +++ b/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/test/project-test3/lib/Jamfile b/test/project-test3/lib/Jamfile index 2c8bf97af..76b0829a9 100644 --- a/test/project-test3/lib/Jamfile +++ b/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/test/project-test3/lib2/Jamfile b/test/project-test3/lib2/Jamfile index 409f9e6ba..b6b0abc44 100644 --- a/test/project-test3/lib2/Jamfile +++ b/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/test/project-test3/lib2/helper/Jamfile b/test/project-test3/lib2/helper/Jamfile index 8480d4361..0c82f9248 100644 --- a/test/project-test3/lib2/helper/Jamfile +++ b/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/test/project-test3/lib3/project-root.jam b/test/project-test3/lib3/project-root.jam index e69de29bb..971f03096 100644 --- a/test/project-test3/lib3/project-root.jam +++ b/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/test/project-test3/readme.txt b/test/project-test3/readme.txt index 296c50155..da27e54b2 100644 --- a/test/project-test3/readme.txt +++ b/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/test/project-test4/Jamfile b/test/project-test4/Jamfile index f82de659f..a34d5f2db 100644 --- a/test/project-test4/Jamfile +++ b/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/test/project-test4/lib/Jamfile b/test/project-test4/lib/Jamfile index be2c3649a..1bdb7c122 100644 --- a/test/project-test4/lib/Jamfile +++ b/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/test/project-test4/lib2/Jamfile b/test/project-test4/lib2/Jamfile index 71360d959..389492bf0 100644 --- a/test/project-test4/lib2/Jamfile +++ b/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/test/project-test4/project-root.jam b/test/project-test4/project-root.jam index 99e62cf69..801f0afb2 100644 --- a/test/project-test4/project-root.jam +++ b/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/test/project-test4/readme.txt b/test/project-test4/readme.txt index ec68724af..0c0ba2ca4 100644 --- a/test/project-test4/readme.txt +++ b/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/test/startup/boost-root/boost-build.jam b/test/startup/boost-root/boost-build.jam index ad718c3b0..098889f7b 100644 --- a/test/startup/boost-root/boost-build.jam +++ b/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/test/startup/boost-root/build/boost-build.jam b/test/startup/boost-root/build/boost-build.jam index 4bd1f6fe4..610ec79ee 100644 --- a/test/startup/boost-root/build/boost-build.jam +++ b/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/test/startup/boost-root/build/bootstrap.jam b/test/startup/boost-root/build/bootstrap.jam index 7cc467bf5..2ee3507c3 100644 --- a/test/startup/boost-root/build/bootstrap.jam +++ b/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/test/startup/bootstrap-env/boost-build.jam b/test/startup/bootstrap-env/boost-build.jam index 4a1856ed6..67a285e7c 100644 --- a/test/startup/bootstrap-env/boost-build.jam +++ b/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/test/startup/bootstrap-explicit/boost-build.jam b/test/startup/bootstrap-explicit/boost-build.jam index 3c7be1b7b..27d9108b7 100644 --- a/test/startup/bootstrap-explicit/boost-build.jam +++ b/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/test/startup/bootstrap-implicit/readme.txt b/test/startup/bootstrap-implicit/readme.txt index 9191721c2..0278716e5 100644 --- a/test/startup/bootstrap-implicit/readme.txt +++ b/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/test/startup/no-bootstrap1/boost-build.jam b/test/startup/no-bootstrap1/boost-build.jam index d1c56d659..b1b4dc696 100644 --- a/test/startup/no-bootstrap1/boost-build.jam +++ b/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/test/startup/no-bootstrap1/subdir/readme.txt b/test/startup/no-bootstrap1/subdir/readme.txt index 84703f408..00f428d44 100644 --- a/test/startup/no-bootstrap1/subdir/readme.txt +++ b/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/test/startup/no-bootstrap2/boost-build.jam b/test/startup/no-bootstrap2/boost-build.jam index b306ec7d4..505dcd775 100644 --- a/test/startup/no-bootstrap2/boost-build.jam +++ b/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/test/startup/no-bootstrap3/boost-build.jam b/test/startup/no-bootstrap3/boost-build.jam index bbf25baa0..252a3993c 100644 --- a/test/startup/no-bootstrap3/boost-build.jam +++ b/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/test/test2/Jamfile b/test/test2/Jamfile index ca3adadbc..670583964 100644 --- a/test/test2/Jamfile +++ b/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/test/testing-primitives/boost-build.jam b/test/testing-primitives/boost-build.jam index d3ce8b45b..667355a16 100644 --- a/test/testing-primitives/boost-build.jam +++ b/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/test/testing-primitives/bootstrap.jam b/test/testing-primitives/bootstrap.jam index 15a3b96ba..2b1ad4854 100644 --- a/test/testing-primitives/bootstrap.jam +++ b/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/test/unused/Jamfile b/test/unused/Jamfile index ad0c38425..58ef45605 100644 --- a/test/unused/Jamfile +++ b/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/test/unused/b.cpp b/test/unused/b.cpp index e69de29bb..5551e35f6 100644 --- a/test/unused/b.cpp +++ b/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/test/unused/project-root.jam b/test/unused/project-root.jam index b3dd5ebc9..75832afd2 100644 --- a/test/unused/project-root.jam +++ b/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/test/v1-testing/Jamfile b/test/v1-testing/Jamfile index c9f12b688..011940f8a 100644 --- a/test/v1-testing/Jamfile +++ b/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/test/v1-testing/boost-build.jam b/test/v1-testing/boost-build.jam index f84e8619d..d9e748ec2 100644 --- a/test/v1-testing/boost-build.jam +++ b/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/test/v1_testing/Jamfile b/test/v1_testing/Jamfile index 601bba762..2e0bedac7 100644 --- a/test/v1_testing/Jamfile +++ b/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/test/v1_testing/boost-build.jam b/test/v1_testing/boost-build.jam index 371d6272a..d9e748ec2 100644 --- a/test/v1_testing/boost-build.jam +++ b/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/test/v1_testing/project-root.jam b/test/v1_testing/project-root.jam index be364c892..fe6942458 100644 --- a/test/v1_testing/project-root.jam +++ b/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 diff --git a/website/index.html b/website/index.html index 9b68c2f53..2726d8555 100644 --- a/website/index.html +++ b/website/index.html @@ -1,5 +1,10 @@ + + + + + Date: Wed, 8 Nov 2006 06:16:24 +0000 Subject: [PATCH 47/90] Corrections to PCH docs from Charles Brockman. Documentation for the debug-symbols feature. [SVN r35912] --- doc/src/tasks.xml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/src/tasks.xml b/doc/src/tasks.xml index 929c57e06..5189e277a 100644 --- a/doc/src/tasks.xml +++ b/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 bd1b1d2cd8ab023531c496716243ff6ab31f68a2 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 07:18:00 +0000 Subject: [PATCH 48/90] Corrections to target docs from Charles Brockman. Created a new section with a list of main target rules. [SVN r35914] --- doc/src/advanced.xml | 30 +++++++++++++----------- doc/src/reference.xml | 54 +++++++++++++++++++++++++++++++++++++++++++ doc/src/tasks.xml | 8 +++---- 3 files changed, 74 insertions(+), 18 deletions(-) diff --git a/doc/src/advanced.xml b/doc/src/advanced.xml index b6377858c..0e1e49961 100644 --- a/doc/src/advanced.xml +++ b/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/doc/src/reference.xml b/doc/src/reference.xml index d3c6796f6..3d9e79522 100644 --- a/doc/src/reference.xml +++ b/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/doc/src/tasks.xml b/doc/src/tasks.xml index 5189e277a..9932b35c2 100644 --- a/doc/src/tasks.xml +++ b/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 7c96b542f084c7937c66609f72bcd3aae4a335c6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:36:02 +0000 Subject: [PATCH 49/90] Unbreak notfile.py [SVN r35916] --- test/BoostBuild.py | 17 ++++++++++++++++- test/notfile.py | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index a1aff2cba..846034344 100644 --- a/test/BoostBuild.py +++ b/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/test/notfile.py b/test/notfile.py index a50a0c8fa..02b1ee238 100644 --- a/test/notfile.py +++ b/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 6851604c0efda62511ed6ad4dac66c6feed21494 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:37:28 +0000 Subject: [PATCH 50/90] Robustify Tester.expect_content [SVN r35917] --- test/BoostBuild.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 846034344..18920c743 100644 --- a/test/BoostBuild.py +++ b/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 c10a1de17840df08e0dbc67e4c7eb6286cfa07c6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:42:12 +0000 Subject: [PATCH 51/90] Unbreak rebuilds.py [SVN r35918] --- test/rebuilds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rebuilds.py b/test/rebuilds.py index 87c4d26da..60df62f1d 100644 --- a/test/rebuilds.py +++ b/test/rebuilds.py @@ -19,7 +19,7 @@ rule make actions make { echo "******" making $(<) from $(>) "******" - echo made from $(>) >> $(<) + echo made from $(>) > $(<) } make aux1 : bar ; From c4ea7d28c2f323810fcc3f6c2a15ddbe5c434cfa Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 08:42:55 +0000 Subject: [PATCH 52/90] Fix thinko [SVN r35919] --- test/BoostBuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 18920c743..209ab0219 100644 --- a/test/BoostBuild.py +++ b/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 5c57d836b6343f923a4d4ffc4072f0f886fcaa78 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 09:07:01 +0000 Subject: [PATCH 53/90] Don't emit any messages when no is in properties. [SVN r35921] --- src/build/targets.jam | 9 ++++----- test/build_no.py | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/build/targets.jam b/src/build/targets.jam index 533845511..23962a258 100644 --- a/src/build/targets.jam +++ b/src/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/test/build_no.py b/test/build_no.py index f10daeaed..ce5c51e46 100644 --- a/test/build_no.py +++ b/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 568b9e9d42067d90b7acfdd4991d7465701bbd32 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 09:59:42 +0000 Subject: [PATCH 54/90] Test that project's path requirements can be removed by a main target. [SVN r35923] --- test/remove_requirement.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/remove_requirement.py b/test/remove_requirement.py index 5f49baeb0..6bbc20938 100644 --- a/test/remove_requirement.py +++ b/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 bb80ad520fec2be68aa0977417a1d84d8cdfbb4e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Nov 2006 10:01:35 +0000 Subject: [PATCH 55/90] Fix removing of path features. [SVN r35924] --- src/build/property-set.jam | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/build/property-set.jam b/src/build/property-set.jam index bed3b4b4f..0dd7d958c 100644 --- a/src/build/property-set.jam +++ b/src/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 9ab60ec835bdee60168b31b6eb5bb07c018d768b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 07:40:42 +0000 Subject: [PATCH 56/90] Revive some more tests [SVN r35968] --- test/BoostBuild.py | 24 +++++++++++++++++++----- test/dll_path.py | 5 ++--- test/library_chain.py | 7 ++++--- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 209ab0219..1779455e9 100644 --- a/test/BoostBuild.py +++ b/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/test/dll_path.py b/test/dll_path.py index 4e37363a0..cdf640e20 100644 --- a/test/dll_path.py +++ b/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/test/library_chain.py b/test/library_chain.py index e211b9baf..958609027 100644 --- a/test/library_chain.py +++ b/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 3a9e25045aadf7d1e6957ec4d4aded9d5965b11a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 08:35:39 +0000 Subject: [PATCH 57/90] Summarize some changes [SVN r35970] --- notes/changes.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/notes/changes.txt b/notes/changes.txt index f6c9ddaff..8346d03d4 100644 --- a/notes/changes.txt +++ b/notes/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 6b2aeb939ca2bef7efa12eb9f635922a45cfb750 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 08:45:03 +0000 Subject: [PATCH 58/90] New rule common.hard-link [SVN r35972] --- src/tools/common.jam | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/common.jam b/src/tools/common.jam index fee26a2b2..e737a907a 100644 --- a/src/tools/common.jam +++ b/src/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 bdebe456af1aab51787a6f47287f5dafe0201e0d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 17:18:55 +0000 Subject: [PATCH 59/90] Make it possible to suppress generation of version symlinks [SVN r35979] --- src/tools/stage.jam | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/tools/stage.jam b/src/tools/stage.jam index d955f40b3..ddded70ed 100644 --- a/src/tools/stage.jam +++ b/src/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 863701106eb3c0b93d0363498fab2d6a651764e8 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 10 Nov 2006 17:24:16 +0000 Subject: [PATCH 60/90] New main target rule 'generate' [SVN r35983] --- src/tools/builtin.jam | 1 + src/tools/generate.jam | 108 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 src/tools/generate.jam diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam index e057567d8..5ccd02eed 100644 --- a/src/tools/builtin.jam +++ b/src/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/src/tools/generate.jam b/src/tools/generate.jam new file mode 100644 index 000000000..2bbce8062 --- /dev/null +++ b/src/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 cd67762d15395f1dfdb1a475efaa73b20acc0682 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 11 Nov 2006 22:33:15 +0000 Subject: [PATCH 61/90] 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] --- src/build-system.jam | 165 ++++++++++++++++++++++++++++++------------ src/build/feature.jam | 69 +++++++++++++++--- 2 files changed, 177 insertions(+), 57 deletions(-) diff --git a/src/build-system.jam b/src/build-system.jam index 51f253bcd..0c9cbf481 100755 --- a/src/build-system.jam +++ b/src/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/src/build/feature.jam b/src/build/feature.jam index b9b9e8822..2e0f91a78 100644 --- a/src/build/feature.jam +++ b/src/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 9be6a0b04933e07eca05d85c9a6a8c0e819ac10c Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 11 Nov 2006 22:58:18 +0000 Subject: [PATCH 62/90] Fixed various bugs in my last checkin, and one old one in assert.jam. [SVN r36008] --- src/build-system.jam | 7 +++++-- src/build/feature.jam | 12 ++++++++---- src/util/assert.jam | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/build-system.jam b/src/build-system.jam index 0c9cbf481..f99da9456 100755 --- a/src/build-system.jam +++ b/src/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/src/build/feature.jam b/src/build/feature.jam index 2e0f91a78..83d928cdc 100644 --- a/src/build/feature.jam +++ b/src/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/src/util/assert.jam b/src/util/assert.jam index d4eacc47d..3fa52dfe2 100644 --- a/src/util/assert.jam +++ b/src/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 dc12989ccb5d578b98457063d466a2776b32bc69 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 12 Nov 2006 06:25:09 +0000 Subject: [PATCH 63/90] 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] --- src/engine/build.jam | 4 ++++ src/engine/mem.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/engine/build.jam b/src/engine/build.jam index 49af13c5a..e3693bba9 100644 --- a/src/engine/build.jam +++ b/src/engine/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/src/engine/mem.c b/src/engine/mem.c index 44c0e5a84..da20acf8c 100644 --- a/src/engine/mem.c +++ b/src/engine/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 bbdbfbd4fdf5e08663d8102c84df43ab44e909d3 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 12 Nov 2006 15:16:28 +0000 Subject: [PATCH 64/90] Slightly less hack-y: stop poke-ing the toolset into argv just to get it into the build request. [SVN r36012] --- src/build-system.jam | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/build-system.jam b/src/build-system.jam index f99da9456..d2f8306dc 100755 --- a/src/build-system.jam +++ b/src/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 271a66777a1353c8831709361281d212f295a264 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 14 Nov 2006 05:35:45 +0000 Subject: [PATCH 65/90] Add generic feature. Fix minor validation problem with boostbook. [SVN r36029] --- src/tools/boostbook.jam | 27 +++++++-------------------- src/tools/builtin.jam | 3 +++ src/tools/xsltproc.jam | 7 ++++++- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/tools/boostbook.jam b/src/tools/boostbook.jam index e1b5db19a..e8d8217dc 100644 --- a/src/tools/boostbook.jam +++ b/src/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/src/tools/builtin.jam b/src/tools/builtin.jam index 5ccd02eed..e86d2e50f 100644 --- a/src/tools/builtin.jam +++ b/src/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/src/tools/xsltproc.jam b/src/tools/xsltproc.jam index 021ef58ea..71e1b72ae 100644 --- a/src/tools/xsltproc.jam +++ b/src/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 df091e4c9b8139793efff569e45249f3de005d50 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 14 Nov 2006 05:39:26 +0000 Subject: [PATCH 66/90] Add 6.5 as an alias to 6.0. [SVN r36031] --- src/tools/msvc.jam | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index a629853d9..30d8843ef 100644 --- a/src/tools/msvc.jam +++ b/src/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 c8f6d39cae23d548a8aec2fa6ffd0f9f024fc6d1 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 15 Nov 2006 19:05:45 +0000 Subject: [PATCH 67/90] Implement automatic removal of test executables [SVN r36048] --- src/tools/testing.jam | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/tools/testing.jam b/src/tools/testing.jam index e195c93d2..1416bcf55 100644 --- a/src/tools/testing.jam +++ b/src/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 f2e4ab9ae99ec4b74f24ee9df569a79f126af602 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 17 Nov 2006 06:26:12 +0000 Subject: [PATCH 68/90] Fix typo that causes all run tests to be always relinked and rerun. Thanks to Juergen Hunold for the bug report. [SVN r36064] --- src/tools/testing.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/testing.jam b/src/tools/testing.jam index 1416bcf55..f8d8b9076 100644 --- a/src/tools/testing.jam +++ b/src/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 be5b9377d6fa0719ec44a1aba1efc7dbd400be30 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 08:56:43 +0000 Subject: [PATCH 69/90] Don't remove python scripts for Python tests. [SVN r36073] --- src/tools/python.jam | 5 ++++- src/tools/testing.jam | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/tools/python.jam b/src/tools/python.jam index 66c05bb2b..e3cb287cc 100644 --- a/src/tools/python.jam +++ b/src/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/src/tools/testing.jam b/src/tools/testing.jam index f8d8b9076..53911b564 100644 --- a/src/tools/testing.jam +++ b/src/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 9c65d5b982f8a42e5160d1395274de7396d8fa5d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 18:34:42 +0000 Subject: [PATCH 70/90] Introduce 'toolset requirements' [SVN r36076] --- src/build/targets.jam | 3 +++ src/build/toolset.jam | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/build/targets.jam b/src/build/targets.jam index 23962a258..8a1fbd632 100644 --- a/src/build/targets.jam +++ b/src/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/src/build/toolset.jam b/src/build/toolset.jam index 95996af6f..36c0a21da 100644 --- a/src/build/toolset.jam +++ b/src/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 c3aff43843792323903808c793462559c4703662 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 18:47:22 +0000 Subject: [PATCH 71/90] Add toolset requirements that specify that shared runtime is multithreaded, for most windows toolsets. [SVN r36077] --- src/tools/cw.jam | 2 ++ src/tools/intel-win.jam | 2 ++ src/tools/msvc.jam | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/src/tools/cw.jam b/src/tools/cw.jam index 4c3a2f03a..07eec5a52 100644 --- a/src/tools/cw.jam +++ b/src/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/src/tools/intel-win.jam b/src/tools/intel-win.jam index 68d707298..8b8f110bc 100644 --- a/src/tools/intel-win.jam +++ b/src/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/src/tools/msvc.jam b/src/tools/msvc.jam index 30d8843ef..1b7935380 100644 --- a/src/tools/msvc.jam +++ b/src/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 ab4d1b8b998f8a800341d254f9b968b621fb799a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 18 Nov 2006 19:11:53 +0000 Subject: [PATCH 72/90] Robustify the test [SVN r36078] --- test/prebuilt/ext/Jamfile | 3 +++ test/prebuilt/ext/Jamfile2 | 4 ++-- test/prebuilt/ext/Jamfile3 | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/prebuilt/ext/Jamfile b/test/prebuilt/ext/Jamfile index 6ae423514..e563f0d74 100644 --- a/test/prebuilt/ext/Jamfile +++ b/test/prebuilt/ext/Jamfile @@ -8,3 +8,6 @@ project ext ; lib a : a.cpp ; + +install dist : a : release:release + debug:debug ; diff --git a/test/prebuilt/ext/Jamfile2 b/test/prebuilt/ext/Jamfile2 index be29fb693..2030b6465 100644 --- a/test/prebuilt/ext/Jamfile2 +++ b/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/test/prebuilt/ext/Jamfile3 b/test/prebuilt/ext/Jamfile3 index 071691dee..868761cb5 100644 --- a/test/prebuilt/ext/Jamfile3 +++ b/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 4f4df7f58e9b1692a4905fafd09fc2edaf7febc9 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 20 Nov 2006 17:14:52 +0000 Subject: [PATCH 73/90] Improved warning message Updated changelog [SVN r36114] --- notes/changes.txt | 5 ++++- src/build-system.jam | 15 +++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/notes/changes.txt b/notes/changes.txt index 8346d03d4..aaf9da07b 100644 --- a/notes/changes.txt +++ b/notes/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. diff --git a/src/build-system.jam b/src/build-system.jam index d2f8306dc..f32460469 100755 --- a/src/build-system.jam +++ b/src/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) { From 6488ce31d90eb98dc405382508c84c1392c45049 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 22 Nov 2006 09:33:07 +0000 Subject: [PATCH 74/90] Enable pch test on msvc [SVN r36143] --- test/test_all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_all.py b/test/test_all.py index 1ded06fee..234a17680 100644 --- a/test/test_all.py +++ b/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 fe44e60b28b7096b173e88272d25266664e1ea77 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 22 Nov 2006 09:36:45 +0000 Subject: [PATCH 75/90] Handle indirect conditional properties in usage requirements [SVN r36145] --- src/build/targets.jam | 111 ++++++++++++++++++++++++++++----------- test/use_requirements.py | 31 +++++++++++ 2 files changed, 110 insertions(+), 32 deletions(-) diff --git a/src/build/targets.jam b/src/build/targets.jam index 8a1fbd632..e737a9847 100644 --- a/src/build/targets.jam +++ b/src/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/test/use_requirements.py b/test/use_requirements.py index 679436e1a..546abde54 100644 --- a/test/use_requirements.py +++ b/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 9fd7a6eba945685bb2330e5dbfd1137d42db364a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Nov 2006 09:01:47 +0000 Subject: [PATCH 76/90] Make the 'glob' rule accept the patterns to exclude. [SVN r36159] --- src/build/project.jam | 7 ++++--- src/util/path.jam | 15 ++++++++++++--- test/project_glob.py | 10 ++++++++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/build/project.jam b/src/build/project.jam index f37161f88..4a3a2e96e 100644 --- a/src/build/project.jam +++ b/src/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/src/util/path.jam b/src/util/path.jam index 33403887b..2f516347f 100644 --- a/src/util/path.jam +++ b/src/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 diff --git a/test/project_glob.py b/test/project_glob.py index 412bf77db..a902ae1bc 100644 --- a/test/project_glob.py +++ b/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") From 42304753f1a13738e4041392acbe2a358f29b655 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Nov 2006 09:16:51 +0000 Subject: [PATCH 77/90] Fix a bug that caused path.glob-tree to ignore exclude patterns except for top-level names. [SVN r36160] --- src/util/path.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/path.jam b/src/util/path.jam index 2f516347f..dbf153aec 100644 --- a/src/util/path.jam +++ b/src/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 3fae00b0a0bcaaa690d14ae9ec0ae668f62d08f6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Nov 2006 09:25:16 +0000 Subject: [PATCH 78/90] New project rule 'glob-tree'. [SVN r36161] --- src/build/project.jam | 78 +++++++++++++++++++++++++------------------ test/project_glob.py | 22 ++++++++++++ 2 files changed, 68 insertions(+), 32 deletions(-) diff --git a/src/build/project.jam b/src/build/project.jam index 4a3a2e96e..e27791380 100644 --- a/src/build/project.jam +++ b/src/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/test/project_glob.py b/test/project_glob.py index a902ae1bc..39ec39305 100644 --- a/test/project_glob.py +++ b/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 e18d9cf2818b73191888ac06a4757f5c87e4add3 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 25 Nov 2006 17:20:23 +0000 Subject: [PATCH 79/90] Improve formatting of --debug-building output [SVN r36175] --- src/build/targets.jam | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/build/targets.jam b/src/build/targets.jam index e737a9847..e8bf7328b 100644 --- a/src/build/targets.jam +++ b/src/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 e5ccf0542e9b0b4b4e4d88dc92f7a7594e845b2b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 25 Nov 2006 18:48:12 +0000 Subject: [PATCH 80/90] New example [SVN r36176] --- example/generator/Jamroot | 3 ++ example/generator/README.txt | 4 ++ example/generator/foo.gci | 5 +++ example/generator/soap.jam | 73 ++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 example/generator/Jamroot create mode 100644 example/generator/README.txt create mode 100644 example/generator/foo.gci create mode 100644 example/generator/soap.jam diff --git a/example/generator/Jamroot b/example/generator/Jamroot new file mode 100644 index 000000000..a67e24ca0 --- /dev/null +++ b/example/generator/Jamroot @@ -0,0 +1,3 @@ + +import soap ; +exe foo : foo.gci : on ; \ No newline at end of file diff --git a/example/generator/README.txt b/example/generator/README.txt new file mode 100644 index 000000000..340b9a7bd --- /dev/null +++ b/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/example/generator/foo.gci b/example/generator/foo.gci new file mode 100644 index 000000000..7d5f90dff --- /dev/null +++ b/example/generator/foo.gci @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} \ No newline at end of file diff --git a/example/generator/soap.jam b/example/generator/soap.jam new file mode 100644 index 000000000..169a9a9da --- /dev/null +++ b/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 c78e2b019d4bb96b99c97b65bd3d73e94832332c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 27 Nov 2006 05:53:05 +0000 Subject: [PATCH 81/90] Add 'to-boostbook' main target rule to allow generating only the boostbook xml. I.e. only running quickbook. [SVN r36183] --- src/tools/quickbook.jam | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/tools/quickbook.jam b/src/tools/quickbook.jam index e794d085e..0402a7bcf 100644 --- a/src/tools/quickbook.jam +++ b/src/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 b6d73335d8f1e4ed94ae2834e8e342fe5e5d4269 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 29 Nov 2006 21:14:20 +0000 Subject: [PATCH 82/90] 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] --- src/tools/msvc.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 1b7935380..1597826e9 100644 --- a/src/tools/msvc.jam +++ b/src/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 48c39317e19660c0077ffbc0911919ce3eabcb69 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 30 Nov 2006 21:15:48 +0000 Subject: [PATCH 83/90] Doc edits [SVN r36217] --- doc/src/advanced.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/advanced.xml b/doc/src/advanced.xml index 0e1e49961..7d2e8a9aa 100644 --- a/doc/src/advanced.xml +++ b/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 05ff772def52abac643cb06652360cbdee1b64c8 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 1 Dec 2006 20:30:58 +0000 Subject: [PATCH 84/90] Revive nightly [SVN r36235] --- scripts/roll.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/roll.sh b/scripts/roll.sh index 5fa840f0c..73fbf150b 100644 --- a/scripts/roll.sh +++ b/scripts/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 7eee3429f9571f4cca3878692be4b51ee62c154e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 7 Dec 2006 17:40:17 +0000 Subject: [PATCH 85/90] Add HTML generated directly from the Doxygen tool. Move autoconf into toolset proper. [SVN r36290] --- src/tools/doxygen-config.jam | 46 +---- src/tools/doxygen.jam | 364 +++++++++++++++++++++++++---------- 2 files changed, 268 insertions(+), 142 deletions(-) diff --git a/src/tools/doxygen-config.jam b/src/tools/doxygen-config.jam index 8e9f151a5..2cd2ccaeb 100644 --- a/src/tools/doxygen-config.jam +++ b/src/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/src/tools/doxygen.jam b/src/tools/doxygen.jam index e471e99fe..d8a47af62 100644 --- a/src/tools/doxygen.jam +++ b/src/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 0e6cb164f787fe47ade89e30f380d5ed72b255da Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 8 Dec 2006 14:27:09 +0000 Subject: [PATCH 86/90] handle comma-separated toolsets [SVN r36301] --- src/build-system.jam | 100 ++++++++++++++++++++++--------------------- src/util/regex.jam | 12 ++++++ 2 files changed, 63 insertions(+), 49 deletions(-) diff --git a/src/build-system.jam b/src/build-system.jam index f32460469..f938aa00e 100755 --- a/src/build-system.jam +++ b/src/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/src/util/regex.jam b/src/util/regex.jam index c805abb2c..1b59f86a8 100644 --- a/src/util/regex.jam +++ b/src/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 a716546bfafef739bb6491b24a6efd0fca8981f7 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 8 Dec 2006 14:27:10 +0000 Subject: [PATCH 87/90] Add missing local variable declaration [SVN r36302] --- src/build-system.jam | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/build-system.jam b/src/build-system.jam index f938aa00e..4626c5076 100755 --- a/src/build-system.jam +++ b/src/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 1da81804ffb73fb39cce0568bb6c6be329fcfae4 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 9 Dec 2006 11:19:22 +0000 Subject: [PATCH 88/90] Handle negative exit codes [SVN r36308] --- src/tools/msvc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 1597826e9..d90860909 100644 --- a/src/tools/msvc.jam +++ b/src/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 134deb64a530be975cce9edebfb50146a1771eba Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 10 Dec 2006 20:17:59 +0000 Subject: [PATCH 89/90] Allow not specifying when generating HTML docs. [SVN r36314] --- src/tools/doxygen.jam | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tools/doxygen.jam b/src/tools/doxygen.jam index d8a47af62..52898d1a8 100644 --- a/src/tools/doxygen.jam +++ b/src/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 eb9d6b176f58ae451442255e0b1038b28df1bd50 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Dec 2006 03:34:35 +0000 Subject: [PATCH 90/90] Add configuration option to be able to add STLfilt to compiles directly. [SVN r36320] --- src/tools/msvc.jam | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index d90860909..b7041f0e9 100644 --- a/src/tools/msvc.jam +++ b/src/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 * )