diff --git a/CHANGELOG.md b/CHANGELOG.md index e3034b43..5ba57143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Version 86: * Remove spurious declaration * Tidy up Jamfile * Normalize doc build scripts +* Use configured doxygen and xsltproc -------------------------------------------------------------------------------- diff --git a/doc/Jamfile b/doc/Jamfile index 341c6971..41621c98 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -11,6 +11,9 @@ import os ; import path ; import boostbook ; import quickbook ; +import xsltproc ; +import doxygen ; +import modules ; #------------------------------------------------------------------------------- # @@ -21,6 +24,18 @@ import quickbook ; local sources = [ path.glob-tree ../include/boost/beast : *.hpp *.ipp : detail impl ] ; +# Get the configured paths to doxygen and xsltproc + +.doxygen = [ doxygen.name ] ; +.doxygen ?= doxygen ; + +#ECHO Using doxygen from "$(.doxygen)" ; + +.xsltproc = [ xsltproc.name ] ; +.xsltproc ?= xsltproc ; + +#ECHO Using xsltproc from "$(.xsltproc)" ; + #------------------------------------------------------------------------------- # # Generate transform.xsl. This xsl transfomration takes as input @@ -55,35 +70,54 @@ actions make_transform # containing the description of the C++ declarations and extracted # Javadoc comments. # -make reference.xml +make index.xml : ./source.dox : - @make_xml + @make_doxygen_xml : $(sources) ; -# Windows is a little different from other platforms if [ os.name ] = NT { - actions make_xml + actions make_doxygen_xml { SET LIB_DIR=$(2:B=:S=..) SET XML_OUTPUT=$(1:D) - doxygen $(2) && xsltproc $(1:B=combine:S=.xslt) $(1:B=index:S=.xml) > $(1) + "$(.doxygen)" $(2) } } else { - actions make_xml + actions make_doxygen_xml { export LIB_DIR=$(2:B=:S=..) export XML_OUTPUT=$(1:D) - doxygen $(2) && xsltproc $(1:B=combine:S=.xslt) $(1:B=index:S=.xml) > $(1) + "$(.doxygen)" $(2) } } +make combine.xslt : index.xml : @null_action ; + +actions null_action +{ + touch -c $(1) ; +} + +make reference.xml + : + combine.xslt + index.xml + : + @call-xsltproc + ; + +actions call-xsltproc +{ + "$(.xsltproc)" $(2) > $(1) +} + #------------------------------------------------------------------------------- # # Produce the reference.qbk file by running @@ -94,14 +128,9 @@ make reference.qbk transform.xsl reference.xml : - @make_reference + @call-xsltproc ; -actions make_reference -{ - xsltproc $(2) > $(1) -} - # We have to make a copy of reference.qbk and put it # in a place where the static .qbk files can find it #