? build/A.diff ? build/ChangeLog ? build/property_set_return.diff ? build/remove_requirement.diff ? tools/A.diff ? tools/ChangeLog ? tools/PCH.diff ? tools/PYTHON.diff ? tools/fix.diff ? tools/pch.diff ? tools/pch_options.diff ? tools/python.diff ? tools/stage.diff ? test/A.diff ? test/ChangeLog ? test/inline_targets.diff ? test/pch ? test/pch-bad ? test/remove_property Index: build/alias.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/build/alias.jam,v retrieving revision 1.17 diff -u -r1.17 alias.jam --- build/alias.jam 22 Dec 2004 09:42:44 -0000 1.17 +++ build/alias.jam 14 Oct 2006 10:27:18 -0000 @@ -63,7 +63,7 @@ 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) ] Index: build/targets.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/build/targets.jam,v retrieving revision 1.201 diff -u -r1.201 targets.jam --- build/targets.jam 18 Sep 2006 08:51:08 -0000 1.201 +++ build/targets.jam 14 Oct 2006 10:27:19 -0000 @@ -1369,18 +1369,27 @@ # 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 { Index: tools/builtin.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/tools/builtin.jam,v retrieving revision 1.194 diff -u -r1.194 builtin.jam --- tools/builtin.jam 7 Oct 2006 12:38:50 -0000 1.194 +++ tools/builtin.jam 14 Oct 2006 10:27:19 -0000 @@ -499,6 +499,7 @@ 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 Index: tools/python.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/tools/python.jam,v retrieving revision 1.44 diff -u -r1.44 python.jam --- tools/python.jam 3 Oct 2006 13:44:47 -0000 1.44 +++ tools/python.jam 14 Oct 2006 10:27:20 -0000 @@ -530,7 +530,16 @@ { 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) ] ; + } } } Index: tools/testing.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/tools/testing.jam,v retrieving revision 1.44 diff -u -r1.44 testing.jam --- tools/testing.jam 31 Jan 2006 15:43:59 -0000 1.44 +++ tools/testing.jam 14 Oct 2006 10:27:20 -0000 @@ -155,19 +155,11 @@ 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 @@ $(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 ; Index: test/inline.py =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/test/inline.py,v retrieving revision 1.3 diff -u -r1.3 inline.py --- test/inline.py 8 Feb 2006 09:30:43 -0000 1.3 +++ test/inline.py 14 Oct 2006 10:27:20 -0000 @@ -9,12 +9,13 @@ 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 @@ """) +t.write("helper.cpp", """ +void helper() +{ +} +""") + t.run_build_system() -t.expect_addition("bin/$toolset/debug/everything__a.exe") -t.rm("bin/$toolset/debug/everything__a.exe") +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("everything__a") -t.expect_addition("bin/$toolset/debug/everything__a.exe") +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()