From 633f85e6a0a07a5ae9f9e0cf618e4b1eef827221 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Fri, 23 Nov 2007 17:03:14 +0000 Subject: [PATCH] config, detail, filesystem, system, tools, at 41278. [SVN r41316] --- doc/Jamfile.v2 | 3 + example/generate/Jamroot | 43 ++--- example/generate/REAME.txt | 3 + example/generate/a.cpp | 6 + example/generator/Jamroot | 5 +- example/generator/README.txt | 3 + example/generator/foo.gci | 7 +- example/generator/soap.jam | 27 +-- example/python_modules/Jamroot | 5 +- example/python_modules/python_helpers.jam | 3 + example/python_modules/python_helpers.py | 5 +- src/build-system.jam | 208 ++++++++++++++++++++-- src/build/build-request.jam | 7 +- src/build/modifiers.jam | 7 +- src/build/virtual-target.jam | 5 + src/engine/build.jam | 4 +- src/engine/jam.h | 4 + src/engine/output.c | 28 +-- src/tools/builtin.jam | 8 +- src/tools/msvc.jam | 26 ++- src/tools/testing.jam | 32 +++- src/tools/vacpp.jam | 8 +- test/.cvsignore | 1 - test/dependency_property.py | 7 +- test/dependency_test.py | 5 + test/double_loading.py | 7 +- test/duplicate.py | 7 +- test/echo_args.jam | 4 + test/empty.jam | 6 +- test/expansion.py | 7 +- test/explicit.py | 7 +- test/gcc_runtime.py | 7 +- test/project-test3/lib3/Jamfile | 3 + test/readme.txt | 4 + test/test_system.html | 8 +- 35 files changed, 404 insertions(+), 116 deletions(-) delete mode 100644 test/.cvsignore diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index e5e83c479..a00f6ff7d 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -1,3 +1,6 @@ +# 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) import quickbook ; diff --git a/example/generate/Jamroot b/example/generate/Jamroot index 52c00d811..bc8563a4a 100644 --- a/example/generate/Jamroot +++ b/example/generate/Jamroot @@ -1,3 +1,6 @@ +# Copyright 2007 Vladimir Prus +# Distributed 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 common ; import "class" : new ; @@ -7,26 +10,26 @@ rule generate-example ( project name : property-set : sources * ) local result ; for local s in $(sources) { - #local ea = [ $(s).action ] ; - #local ep = [ $(ea).properties ] ; - - # Create a new action, that takes the source target - # and runs 'common.copy' comamnd on it. - local a = [ - new non-scanning-action $(s) : common.copy : $(property-set) ] ; - - local source-name = [ $(s).name ] ; - - # Create the target to represent the result of the action. - # The target has the name that was specified in Jamfile - # and passed here via the 'name' parameter, - # and the same type and project as the source. - result += [ new file-target $(name) - : [ $(s).type ] - : $(project) - : $(a) ] ; - } + #local ea = [ $(s).action ] ; + #local ep = [ $(ea).properties ] ; + + # Create a new action, that takes the source target + # and runs 'common.copy' comamnd on it. + local a = [ + new non-scanning-action $(s) : common.copy : $(property-set) ] ; + + local source-name = [ $(s).name ] ; + + # Create the target to represent the result of the action. + # The target has the name that was specified in Jamfile + # and passed here via the 'name' parameter, + # and the same type and project as the source. + result += [ new file-target $(name) + : [ $(s).type ] + : $(project) + : $(a) ] ; + } return $(result) ; } -generate a2 : a.cpp : @generate-example ; \ No newline at end of file +generate a2 : a.cpp : @generate-example ; diff --git a/example/generate/REAME.txt b/example/generate/REAME.txt index e4e9e9781..e8cecc1ed 100644 --- a/example/generate/REAME.txt +++ b/example/generate/REAME.txt @@ -10,3 +10,6 @@ flexible. Please consult the docs for more explanations. +# Copyright 2007 Vladimir Prus +# Distributed 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/generate/a.cpp b/example/generate/a.cpp index 42187a0de..364975671 100644 --- a/example/generate/a.cpp +++ b/example/generate/a.cpp @@ -2,3 +2,9 @@ int main() { } + +/* +Copyright 2007 Vladimir Prus +Distributed 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/generator/Jamroot b/example/generator/Jamroot index a67e24ca0..9703134db 100644 --- a/example/generator/Jamroot +++ b/example/generator/Jamroot @@ -1,3 +1,6 @@ +# 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) import soap ; -exe foo : foo.gci : on ; \ No newline at end of file +exe foo : foo.gci : on ; diff --git a/example/generator/README.txt b/example/generator/README.txt index 340b9a7bd..c711dd206 100644 --- a/example/generator/README.txt +++ b/example/generator/README.txt @@ -2,3 +2,6 @@ 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. +# 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) diff --git a/example/generator/foo.gci b/example/generator/foo.gci index 7d5f90dff..2ccc45c6c 100644 --- a/example/generator/foo.gci +++ b/example/generator/foo.gci @@ -2,4 +2,9 @@ int main() { return 0; -} \ No newline at end of file +} +/* +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) + */ diff --git a/example/generator/soap.jam b/example/generator/soap.jam index ce69391f4..d28bfdecc 100644 --- a/example/generator/soap.jam +++ b/example/generator/soap.jam @@ -1,3 +1,6 @@ +# 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) # This is example of a fictional code generator tool. # It accepts a single input of type '.gci' and produces @@ -19,47 +22,47 @@ 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 + 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]) + 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 t2 ; + if [ $(property-set).get ] = "on" + { local a = [ new action : soap.touch : $(property-set) ] ; t2 = [ new file-target $(name)_server : CPP : $(project) : $(a) ] ; } - return [ virtual-target.register $(t) ] - [ virtual-target.register $(t2) ] ; + return [ virtual-target.register $(t) ] + [ virtual-target.register $(t2) ] ; } } } diff --git a/example/python_modules/Jamroot b/example/python_modules/Jamroot index f504aaeb0..c53e75d58 100644 --- a/example/python_modules/Jamroot +++ b/example/python_modules/Jamroot @@ -1,5 +1,8 @@ +# 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) import python_helpers ; ECHO "test1:" [ python_helpers.test1 ] ; -ECHO "test2:" [ python_helpers.test2 1234 : 5678 ] ; \ No newline at end of file +ECHO "test2:" [ python_helpers.test2 1234 : 5678 ] ; diff --git a/example/python_modules/python_helpers.jam b/example/python_modules/python_helpers.jam index d21e2d732..d6363af67 100644 --- a/example/python_modules/python_helpers.jam +++ b/example/python_modules/python_helpers.jam @@ -1,3 +1,6 @@ +# 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) # Import the Python rules to Boost.Build PYTHON_IMPORT_RULE python_helpers : test1 : python_helpers : test1 ; diff --git a/example/python_modules/python_helpers.py b/example/python_modules/python_helpers.py index 4b5839f27..8148f57c3 100644 --- a/example/python_modules/python_helpers.py +++ b/example/python_modules/python_helpers.py @@ -1,3 +1,6 @@ +# 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) # Declare a couple of functions called from Boost.Build # @@ -10,6 +13,6 @@ def test1(l): return ["foo", "bar"] - + def test2(l, l2): return [l[0], l2[0]] \ No newline at end of file diff --git a/src/build-system.jam b/src/build-system.jam index c4e3df8f9..b9170a8da 100755 --- a/src/build-system.jam +++ b/src/build-system.jam @@ -1,5 +1,5 @@ -# Copyright 2003, 2005 Dave Abrahams -# Copyright 2006 Rene Rivera +# Copyright 2003, 2005, 2007 Dave Abrahams +# Copyright 2006, 2007 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) @@ -487,12 +487,200 @@ for t in $(virtual-targets) { actual-targets += [ $(t).actualize ] ; } + +# Was an XML dump requested? +.out-xml = [ MATCH --out-xml=(.*) : [ modules.peek : ARGV ] ] ; +if $(.out-xml) +{ + # Get the qualified name of a virtual target. + rule full-target-name ( t ) + { + local name = [ $(t).name ] ; + local project = [ $(t).project ] ; + local project-path = [ $(project).get location ] ; + return $(project-path)//$(name) ; + } + + # Generate an XML file containing build statistics for each + # constituent + rule out-xml ( xml-file : constituents * ) + { + # Prepare valid XML header and footer with some basic info + local nl = " +" ; + local jam = [ version.jam ] ; + local os = [ modules.peek : OS OSPLAT JAMUNAME ] "" ; + local timestamp = [ modules.peek : JAMDATE ] ; + local cwd = [ PWD ] ; + local command = [ modules.peek : ARGV ] ; + local bb-version = [ version.boost-build ] ; + .header on $(xml-file) = + "" + "$(nl)" + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + ; + .footer on $(xml-file) = + "$(nl)" ; + # Generate target dependency graph + .contents on $(xml-file) += + "$(nl) " + ; + + for local t in [ virtual-target.all-targets ] + { + local action = [ $(t).action ] ; + if $(action) + { + # If a target has no action, it has + # no dependencies. + + local name = [ full-target-name $(t) ] ; + local sources = [ $(action).sources ] ; + local dependencies ; + for local s in $(sources) + { + dependencies += [ full-target-name $(s) ] ; + } + + local path = [ $(t).path ] ; + local jam-target = [ $(t).actual-name ] ; + + .contents on $(xml-file) += + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + ; + } + } + .contents on $(xml-file) += + "$(nl) " + ; + + # Build $(xml-file) after $(constituents) and do so even if a + # constituent action fails, and regenerate the xml on every bjam run. + INCLUDES $(xml-file) : $(constituents) ; + ALWAYS $(xml-file) ; + __ACTION_RULE__ on $(xml-file) = + build-system.out-xml.generate-action ; + out-xml.generate $(xml-file) ; + } + + # The actual build actions are here; if we did this work in the + # actions clause we would have to form a valid command line + # containing the result of @(...) below (the name of the XML file). + rule out-xml.generate-action ( + xml-file args * : + status : user : system : command : output ? ) + { + local contents = + [ on $(xml-file) return $(.header) $(.contents) $(.footer) ] ; + local f = @($(xml-file):E=$(contents)) ; + } + + # Nothing to do here; the *real* actions happen in + # out-xml.generate-action + actions quietly out-xml.generate { } + + # Define the out-xml file target, which depends on all the targets + # so that it runs the collection after the targets have run. + out-xml $(.out-xml) : $(actual-targets) ; + + # Set up a global __ACTION_RULE__ that records all the available + # statistics about each actual target in a variable "on" the + # --out-xml target. + rule out-xml.collect ( + xml-file target : + status : user : system : command : output ? ) + { + local nl = " +" ; + # Open the action with some basic info. + .contents on $(xml-file) += + "$(nl) " + ; + + # If we have an action object we can print out more detailed info. + local action = [ on $(target) return $(.action) ] ; + if $(action) + { + local action-name = [ $(action).action-name ] ; + local action-sources = [ $(action).sources ] ; + local action-props = [ $(action).properties ] ; + + # The qualified name of the action which we created the target. + .contents on $(xml-file) += + "$(nl) " + ; + + # The sources that made up the target. + .contents on $(xml-file) += + "$(nl) " + ; + for local source in $(action-sources) + { + local source-actual = [ $(source).actual-name ] ; + .contents on $(xml-file) += + "$(nl) " + ; + } + .contents on $(xml-file) += + "$(nl) " + ; + + # The properties that define the conditions under which the + # target was built. + .contents on $(xml-file) += + "$(nl) " + ; + for local prop in [ $(action-props).raw ] + { + local prop-name = [ MATCH ^<(.*)>$ : $(prop:G) ] ; + .contents on $(xml-file) += + "$(nl) " + ; + } + .contents on $(xml-file) += + "$(nl) " + ; + } + + local locate = [ on $(target) return $(LOCATE) ] ; + locate ?= "" ; + .contents on $(xml-file) += + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + ; + .contents on $(xml-file) += + "$(nl) " + ; + } + + # When no __ACTION_RULE__ is set "on" a target, the search falls + # back to the global module + module + { + __ACTION_RULE__ = build-system.out-xml.collect + [ modules.peek build-system : .out-xml ] ; + } +} + NOTFILE all ; DEPENDS all : $(actual-targets) ; if $(bjam-targets) { - UPDATE $(bjam-targets:G=e) ; + UPDATE $(bjam-targets:G=e) $(.out-xml) ; } else if $(cleanall) { @@ -507,13 +695,13 @@ else if $(clean) # Remove only derived targets. if [ $(t).action ] - { + { if $(t) in $(targets-to-clean) || [ is-child [ $(p).project-module ] ] = true { to-clean += $(t) ; - } - } + } + } } local to-clean-actual ; for local t in $(to-clean) @@ -522,14 +710,8 @@ else if $(clean) } common.Clean clean : $(to-clean-actual) ; UPDATE clean ; - - } - else { - UPDATE all ; + UPDATE all $(.out-xml) ; } - - - diff --git a/src/build/build-request.jam b/src/build/build-request.jam index 82d39b022..d0ff34f39 100644 --- a/src/build/build-request.jam +++ b/src/build/build-request.jam @@ -1,7 +1,6 @@ -# (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 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) import sequence ; import set ; diff --git a/src/build/modifiers.jam b/src/build/modifiers.jam index 9a4e150ac..40bed930d 100644 --- a/src/build/modifiers.jam +++ b/src/build/modifiers.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) # Modifiers are generalized generators that mutate targets in specific ways. # This structure allows for grouping a variety of functionality in an diff --git a/src/build/virtual-target.jam b/src/build/virtual-target.jam index c05ca5029..45b717d96 100644 --- a/src/build/virtual-target.jam +++ b/src/build/virtual-target.jam @@ -716,6 +716,11 @@ class action [ indirect.get-rule $(self.action-name[1]) ] $(actual-targets) : $(properties) ; + # Reflect ourselves in a variable for the target. This allows + # looking up additional info for the action given the raw target. + # For example to debug or output action information from action rules. + .action on $(actual-targets) = $(__name__) ; + indirect.call $(self.action-name) $(actual-targets) : $(self.actual-sources) : [ $(properties).raw ] ; diff --git a/src/engine/build.jam b/src/engine/build.jam index cd78b11e8..d7b1c6372 100644 --- a/src/engine/build.jam +++ b/src/engine/build.jam @@ -197,8 +197,8 @@ toolset intel-linux icc : "-o " : -D ## Intel C/C++ for Win32 toolset intel-win32 icl : /Fe : -D : /nologo - [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] - [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] + [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /GB ] + [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 ] -I$(--python-include) -I$(--extra-include) : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ; ## KCC ? diff --git a/src/engine/jam.h b/src/engine/jam.h index 49a1cef60..cfae431ff 100644 --- a/src/engine/jam.h +++ b/src/engine/jam.h @@ -483,6 +483,10 @@ # define OSPLAT "OSPLAT=390" # endif +# ifdef __hppa +# define OSPLAT "OSPLAT=PARISC" +# endif + # ifndef OSPLAT # define OSPLAT "" # endif diff --git a/src/engine/output.c b/src/engine/output.c index a43dbd9cd..8f7dd0da8 100644 --- a/src/engine/output.c +++ b/src/engine/output.c @@ -63,7 +63,11 @@ void out_action( case EXIT_TIMEOUT: { /* process expired, make user aware with explicit message */ - fprintf(bjam_out, "%d second time limit exceeded\n", globs.timeout); + if ( action ) + { + /* but only output for non-quietly actions */ + fprintf(bjam_out, "%d second time limit exceeded\n", globs.timeout); + } break; } default: @@ -71,16 +75,20 @@ void out_action( } /* print out the command output, if requested */ - if (0 != out_data && - ( globs.pipe_action & 1 /* STDOUT_FILENO */ || - globs.pipe_action == 0)) + if ( action ) { - out_(out_data,bjam_out); - } - if (0 != err_data && - globs.pipe_action & 2 /* STDERR_FILENO */) - { - out_(err_data,bjam_err); + /* but only output for non-quietly actions */ + if (0 != out_data && + ( globs.pipe_action & 1 /* STDOUT_FILENO */ || + globs.pipe_action == 0)) + { + out_(out_data,bjam_out); + } + if (0 != err_data && + globs.pipe_action & 2 /* STDERR_FILENO */) + { + out_(err_data,bjam_err); + } } fflush(bjam_out); diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam index 225e6545c..28cf8c412 100644 --- a/src/tools/builtin.jam +++ b/src/tools/builtin.jam @@ -1,5 +1,5 @@ # Copyright 2002, 2003, 2004, 2005 Dave Abrahams -# Copyright 2002, 2005, 2006 Rene Rivera +# Copyright 2002, 2005, 2006, 2007 Rene Rivera # Copyright 2006 Juergen Hunold # Copyright 2005 Toon Knapen # Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus @@ -205,6 +205,8 @@ feature architecture : power # MIPS/SGI mips1 mips2 mips3 mips4 mips32 mips32r2 mips64 + # HP/PA-RISC + parisc # : propagated optional ; @@ -214,6 +216,8 @@ feature instruction-set : i386 i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona + conroe conroe-xe conroe-l allendale mermon mermon-xe kentsfield kentsfield-xe + penryn wolfdale yorksfield nehalem k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx winchip-c6 winchip2 @@ -235,6 +239,8 @@ feature instruction-set : r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650 r6000 r8000 rm7000 rm9000 orion sb1 vr4100 vr4111 vr4120 vr4130 vr4300 vr5000 vr5400 vr5500 + # HP/PA-RISC + 700 7100 7100lc 7200 7300 8000 # : propagated optional ; diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 1a61f5c5c..6cb75bdb2 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -3,6 +3,7 @@ # Copyright (c) 2005 Alexey Pakhunov. # Copyright (c) 2006 Bojan Resnik. # Copyright (c) 2006 Ilya Sokolov. +# Copyright (c) 2007 Rene Rivera # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE_1_0.txt or @@ -231,6 +232,10 @@ local rule configure-really ( { # Even if version is not explicitly specified, try to detect the version # from the path. + if [ MATCH "(Microsoft Visual Studio 9)" : $(command) ] + { + version = 9.0 ; + } if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ] { version = 8.0 ; @@ -299,8 +304,9 @@ local rule configure-really ( if ! $(below-8.0) { cpu = i386 amd64 ia64 ; - # Whereas http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx - # say about x86_ipf, that seem to be doc bug, + # Whereas http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx or + # http://msdn2.microsoft.com/en-us/library/x4d2c09s(vs.90).aspx + # say about x86_IPF, that seem to be doc bug, # and x86_ia64 is right one. setup-option = x86 x86_amd64 x86_ia64 ; @@ -394,13 +400,16 @@ local rule configure-really ( } -# Supported CPU types +# Supported CPU types (only Itanium optimization options are supported from +# VC++ 2005 on). See http://msdn2.microsoft.com/en-us/library/h66s5s0e(vs.90).aspx cpu-type-g5 = i586 pentium pentium-mmx ; cpu-type-g6 = i686 pentiumpro pentium2 pentium3 pentium3m pentium-m k6 k6-2 k6-3 winchip-c6 winchip2 c3 c3-2 ; -cpu-type-em64t = prescott nocona ; +cpu-type-em64t = prescott nocona + conroe conroe-xe conroe-l allendale mermon mermon-xe kentsfield kentsfield-xe + penryn wolfdale yorksfield nehalem ; cpu-type-amd64 = k8 opteron athlon64 athlon-fx ; cpu-type-g7 = @@ -465,12 +474,12 @@ rule configure-version-specific ( toolset : version : condition ) } else { - # 8.0 adds some more options + # 8.0 and above adds some more options flags $(toolset).compile CFLAGS $(condition)/$(cpu-arch-amd64)/ : /favor:blend ; flags $(toolset).compile CFLAGS $(condition)/$(cpu-arch-amd64)/$(cpu-type-em64t) : /favor:EM64T ; flags $(toolset).compile CFLAGS $(condition)/$(cpu-arch-amd64)/$(cpu-type-amd64) : /favor:AMD64 ; - # 8.0 only has multi-threaded static RTL + # 8.0 and above only has multi-threaded static RTL flags $(toolset).compile CFLAGS $(condition)/off/static/single : /MT ; flags $(toolset).compile CFLAGS $(condition)/on/static/single : /MTd ; } @@ -916,13 +925,14 @@ actions compile.mc .ProgramFiles = [ path.make [ common.get-program-files-dir ] ] ; -.known-versions = 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ; +.known-versions = 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ; # Version aliases .version-alias-6 = 6.0 ; .version-alias-6.5 = 6.0 ; .version-alias-7 = 7.0 ; .version-alias-8 = 8.0 ; +.version-alias-9 = 9.0 ; # Name of the registry key that contains Visual C++ installation path # (relative to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft" @@ -931,6 +941,8 @@ actions compile.mc .version-7.1-reg = "VisualStudio\\7.1\\Setup\\VC" ; .version-8.0-reg = "VisualStudio\\8.0\\Setup\\VC" ; .version-8.0express-reg = "VCExpress\\8.0\\Setup\\VC" ; +.version-9.0-reg = "VisualStudio\\9.0\\Setup\\VC" ; +.version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ; # Visual C++ Toolkit 2003 do not store its installation path in the registry. # The environment variable 'VCToolkitInstallDir' and the default installation diff --git a/src/tools/testing.jam b/src/tools/testing.jam index 4a5a24764..16124e533 100644 --- a/src/tools/testing.jam +++ b/src/tools/testing.jam @@ -193,6 +193,8 @@ local rule get-library-name ( path ) } } +# Was an XML dump requested? +.out-xml = [ MATCH --out-xml=(.*) : [ modules.peek : ARGV ] ] ; # Take a target (instance of 'basic-target') and prints # - its type @@ -235,13 +237,29 @@ rule dump-test ( target ) # Extract values of the feature local test-info = [ $(r).get ] ; - # Format them into a single string of quoted strings - test-info = \"$(test-info:J=\"\ \")\" ; - - ECHO boost-test($(type)) \"$(name)\" - [$(test-info)] - ":" \"$(source-files)\" - ; + # If the user requested XML output on the command-line, add the + # test info to that XML file rather than dumping them to stdout. + if $(.out-xml) + { + local nl = " +" ; + .contents on $(.out-xml) += + "$(nl) " + "$(nl) " + "$(nl) " + "$(nl) " + ; + } + else + { + # Format them into a single string of quoted strings + test-info = \"$(test-info:J=\"\ \")\" ; + + ECHO boost-test($(type)) \"$(name)\" + [$(test-info)] + ":" \"$(source-files)\" + ; + } } # Register generators. Depending on target type, either diff --git a/src/tools/vacpp.jam b/src/tools/vacpp.jam index 6a4741c4b..1f5a53d5f 100644 --- a/src/tools/vacpp.jam +++ b/src/tools/vacpp.jam @@ -18,11 +18,17 @@ feature.extend toolset : vacpp ; toolset.inherit vacpp : unix ; generators.override vacpp.prebuilt : builtin.lib-generator ; generators.override vacpp.searched-lib-generator : searched-lib-generator ; -feature.subfeature toolset vacpp : version ; # Configure the vacpp toolset rule init ( version ? : command * : options * ) { + local condition = [ + common.check-init-parameters vacpp : version $(version) ] ; + + command = [ common.get-invocation-command vacpp : xlC + : $(command) : "/usr/vacpp/bin/xlC" ] ; + + common.handle-options vacpp : $(condition) : $(command) : $(options) ; } # Declare generators diff --git a/test/.cvsignore b/test/.cvsignore deleted file mode 100644 index 77615057d..000000000 --- a/test/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc test_results.txt failed_test test-config.jam \ No newline at end of file diff --git a/test/dependency_property.py b/test/dependency_property.py index 3004c3554..5383108b2 100644 --- a/test/dependency_property.py +++ b/test/dependency_property.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: virtual targets with different dependency properties # were considered different by 'virtual-target.register', but the code diff --git a/test/dependency_test.py b/test/dependency_test.py index 6a1b4972e..be056f415 100644 --- a/test/dependency_test.py +++ b/test/dependency_test.py @@ -1,5 +1,10 @@ #!/usr/bin/python +# Copyright 2003 Dave Abrahams +# Copyright 2002, 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) + from BoostBuild import Tester, List t = Tester() diff --git a/test/double_loading.py b/test/double_loading.py index e1418dccd..14bb0ea43 100644 --- a/test/double_loading.py +++ b/test/double_loading.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 import string diff --git a/test/duplicate.py b/test/duplicate.py index f26de455a..18922e75b 100644 --- a/test/duplicate.py +++ b/test/duplicate.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 test tries to stage the same file to the same location by *two* # different stage rules, in two different projects. This is not exactly diff --git a/test/echo_args.jam b/test/echo_args.jam index 99fff9868..0f6956e46 100644 --- a/test/echo_args.jam +++ b/test/echo_args.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) + rule echo_args ( a b ? c ? : d + : e * ) { ECHO a= $(a) b= $(b) c= $(c) ":" d= $(d) ":" e= $(e) ; diff --git a/test/empty.jam b/test/empty.jam index 712bd9a2e..895b1087e 100644 --- a/test/empty.jam +++ b/test/empty.jam @@ -1 +1,5 @@ -# This file is empty; it just suppresses warnings \ No newline at end of file +# This file is empty; it just suppresses warnings + +# 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) diff --git a/test/expansion.py b/test/expansion.py index 71b0bc893..b3e93e38c 100644 --- a/test/expansion.py +++ b/test/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) # 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/explicit.py b/test/explicit.py index 616ce9248..a2c183308 100644 --- a/test/explicit.py +++ b/test/explicit.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) # 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/gcc_runtime.py b/test/gcc_runtime.py index 2efb68704..bb3bb75d2 100644 --- a/test/gcc_runtime.py +++ b/test/gcc_runtime.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) # Tests that on gcc, we correctly report problem when static runtime # is requested when building DLL. diff --git a/test/project-test3/lib3/Jamfile b/test/project-test3/lib3/Jamfile index a6e61f6b6..0d457817e 100644 --- a/test/project-test3/lib3/Jamfile +++ b/test/project-test3/lib3/Jamfile @@ -1,3 +1,6 @@ +# 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) # This project-root.jam also serves the role of Jamfile project lib3 ; diff --git a/test/readme.txt b/test/readme.txt index 0d2fb4631..b29e79dc0 100644 --- a/test/readme.txt +++ b/test/readme.txt @@ -1,3 +1,7 @@ Comprehensive tests for Boost.Build v2; requires Python. To test, execute: python test_all.py + +# 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) diff --git a/test/test_system.html b/test/test_system.html index d70935222..7cdb48529 100644 --- a/test/test_system.html +++ b/test/test_system.html @@ -545,11 +545,9 @@ t.cleanup()

Last modified: Mar 11, 2005

-

© Copyright Vladimir Prus 2002, 2003, 2004, 2005. Permission to - copy, use, modify, sell and distribute this document is granted provided - this copyright notice appears in all copies. This document is provided - ``as is'' without express or implied warranty, and with no claim as to - its suitability for any purpose.

+

© Copyright Vladimir Prus 2002, 2003, 2004, 2005. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)