From aa86e1cd8bdf0b8343b50efdf952b3b16df74463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Sun, 5 Aug 2012 16:30:41 +0000 Subject: [PATCH] Boost Build cleanup - minor stylistic changes. [SVN r79875] --- src/build/project.jam | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/build/project.jam b/src/build/project.jam index 4a8db2155..c939e7021 100644 --- a/src/build/project.jam +++ b/src/build/project.jam @@ -900,11 +900,12 @@ rule glob-internal ( project : wildcards + : excludes * : rule-name ) # module project-rules { + import modules ; + rule using ( toolset-module : * ) { - import toolset ; - import modules ; import project ; + import toolset ; # Temporarily change the search path so the module referred to by # 'using' can be placed in the same directory as Jamfile. User will @@ -919,25 +920,31 @@ module project-rules : $(18) : $(19) ; modules.poke : BOOST_BUILD_PATH : $(x) ; - # The above might have clobbered .current-project (newly created project - # instances automatically get set as the 'current' project). Restore the - # correct value. + # The above might have clobbered .current-project in case it caused a + # new project instance to be created (which would then automatically + # get set as the 'current' project). Restore the correct value so any + # main targets declared after this do not get mapped to the loaded + # module's project. modules.poke project : .current-project : [ project.target $(caller) ] ; } - import modules ; - rule import ( * : * : * ) { modules.import project ; local caller = [ CALLER_MODULE ] ; - local saved = [ modules.peek project : .current-project ] ; + local saved-project = [ modules.peek project : .current-project ] ; module $(caller) { modules.import $(1) : $(2) : $(3) ; } - modules.poke project : .current-project : $(saved) ; + + # The above might have clobbered .current-project in case it caused a + # new project instance to be created (which would then automatically + # get set as the 'current' project). Restore the correct value so any + # main targets declared after this do not get mapped to the loaded + # module's project. + modules.poke project : .current-project : $(saved-project) ; } rule project ( id ? : options * : * ) @@ -949,7 +956,7 @@ module project-rules local attributes = [ project.attributes $(caller) ] ; if $(id) { - $(attributes).set id : $(id) ; + $(attributes).set id : $(id) ; } local explicit-build-dir ;