From 9fab9764dbd7f65acfb388ab96dbe449e646734b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Sun, 5 Aug 2012 16:46:19 +0000 Subject: [PATCH] Boost Build cleanup - project-rules.using() & project-rules.import() rules now restore the original 'current project' reference the same way. [SVN r79876] --- v2/build/project.jam | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/build/project.jam b/v2/build/project.jam index c939e7021..5751dfa8f 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -907,6 +907,8 @@ module project-rules import project ; import toolset ; + local saved-project = [ modules.peek project : .current-project ] ; + # Temporarily change the search path so the module referred to by # 'using' can be placed in the same directory as Jamfile. User will # expect the module to be found even though the directory is not in @@ -925,7 +927,7 @@ module project-rules # 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) ] ; + modules.poke project : .current-project : $(saved-project) ; } rule import ( * : * : * )