diff --git a/doc/boost-build.jam b/doc/boost-build.jam index 5166c6466..d2f695818 100644 --- a/doc/boost-build.jam +++ b/doc/boost-build.jam @@ -3,16 +3,40 @@ # all copies. This software is provided "as is" without express or implied # warranty, and with no claim as to its suitability for any purpose. -# Bootstrap the module system +# Bootstrap the doc system. doing this first makes it possible to document +# in all the modules. And import the basic doc rules, to make them easily +# available. +# +SEARCH on doc.jam = $(BOOST_BUILD_PATH) ; +module doc { include doc.jam ; } +IMPORT doc + : document-module document-rule document-variable : + : document-module document-rule document-variable ; + +# Bootstrap the module system. And bring the import rule into the global module. +# SEARCH on modules.jam = $(BOOST_BUILD_PATH) ; module modules { include modules.jam ; } -# Bring the import rule into the global module IMPORT modules : import : : import ; -import modules ; # The modules module can tolerate being included twice -# Load the doc system. -import doc : document-module document-rule document-variable ; +# Re-load the doc system, to clean up things. Both doc and modules +# can handle getting included twice. +# +import doc ; + +# Reload the modules, to clean up things. The modules module can tolerate +# being included twice. +# +import modules ; + +# Check to see if the user is asking for help as soon as possible. +# This is first action, so that we can interrupt the regular build +# process if they are asking for help. +# +doc.do-help ; import build-system ; -doc.do-help ; +# Load the first Jamfile, and build it. +# +build-system.construct [ build-system.load-jamfile [ PWD ] ] ;