Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79887 - trunk/tools/build/v2/tools
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-06 10:42:40


Author: jurko
Date: 2012-08-06 10:42:39 EDT (Mon, 06 Aug 2012)
New Revision: 79887
URL: http://svn.boost.org/trac/boost/changeset/79887

Log:
Corrected the Boost Build boostbook.jam toolset module to correctly generate its global XML catalog file without relying on Boost Build's 'current project' reference being left set to some non-standalone project after Boost Build finishes loading all of its project files. This should fix Boost library documentation build failures encountered after revision [79874].
Text files modified:
   trunk/tools/build/v2/tools/boostbook.jam | 36 +++++++++++++-----------------------
   1 files changed, 13 insertions(+), 23 deletions(-)

Modified: trunk/tools/build/v2/tools/boostbook.jam
==============================================================================
--- trunk/tools/build/v2/tools/boostbook.jam (original)
+++ trunk/tools/build/v2/tools/boostbook.jam 2012-08-06 10:42:39 EDT (Mon, 06 Aug 2012)
@@ -531,31 +531,21 @@
   print.text "</catalog>" ;
 }
 
-rule xml-catalog ( )
+# Returns information about the global XML catalog virtual target, creating it
+# lazily if needed. To get this global catalog generated only once we do not
+# create it in every project that requests it but instead only create it in the
+# first one and reuse it from there for servicing any later requests.
+#
+# FIXME: Ideally the catalog target should be created as part of the boostbook
+# project, however this is not currently possible as such standalong projects do
+# not inherit things like the build directory.
+#
+rule xml-catalog ( project )
 {
     if ! $(.xml-catalog)
     {
- # The target is created as part of the root project. But ideally
- # it would be created as part of the boostbook project. This is not
- # current possible as such global projects don't inherit things like
- # the build directory.
-
- # 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 &&
- [ project.attribute $(root-project) parent-module ] != project-config
- {
- root-project = [ project.attribute $(root-project) parent-module ] ;
- }
- .xml-catalog = [ new file-target boostbook_catalog
- : XML
- : [ project.target $(root-project) ]
- : [ new action : boostbook.generate-xml-catalog ]
- :
- ] ;
+ .xml-catalog = [ new file-target boostbook_catalog : XML : $(project) :
+ [ new action : boostbook.generate-xml-catalog ] ] ;
         .xml-catalog-file = [ $(.xml-catalog).path ] [ $(.xml-catalog).name ] ;
         .xml-catalog-file = $(.xml-catalog-file:J=/) ;
     }
@@ -578,7 +568,7 @@
     rule run ( project name ? : property-set : sources * )
     {
         # Generate the catalog, but only once...
- local global-catalog = [ boostbook.xml-catalog ] ;
+ local global-catalog = [ boostbook.xml-catalog $(project) ] ;
         local catalog = $(global-catalog[1]) ;
         local catalog-file = $(global-catalog[2]) ;
         local targets ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk