Use configured doxygen and xsltproc

This commit is contained in:
Peter Dimov
2017-07-25 14:50:04 +03:00
committed by Vinnie Falco
parent 03ec8d4d4b
commit 31d2718eac
2 changed files with 43 additions and 13 deletions

View File

@ -12,6 +12,7 @@ Version 86:
* Remove spurious declaration * Remove spurious declaration
* Tidy up Jamfile * Tidy up Jamfile
* Normalize doc build scripts * Normalize doc build scripts
* Use configured doxygen and xsltproc
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -11,6 +11,9 @@ import os ;
import path ; import path ;
import boostbook ; import boostbook ;
import quickbook ; 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 ] ; 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 # 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 # containing the description of the C++ declarations and extracted
# Javadoc comments. # Javadoc comments.
# #
make reference.xml make index.xml
: :
./source.dox ./source.dox
: :
@make_xml @make_doxygen_xml
: :
<dependency>$(sources) <dependency>$(sources)
; ;
# Windows is a little different from other platforms
if [ os.name ] = NT if [ os.name ] = NT
{ {
actions make_xml actions make_doxygen_xml
{ {
SET LIB_DIR=$(2:B=:S=..) SET LIB_DIR=$(2:B=:S=..)
SET XML_OUTPUT=$(1:D) SET XML_OUTPUT=$(1:D)
doxygen $(2) && xsltproc $(1:B=combine:S=.xslt) $(1:B=index:S=.xml) > $(1) "$(.doxygen)" $(2)
} }
} }
else else
{ {
actions make_xml actions make_doxygen_xml
{ {
export LIB_DIR=$(2:B=:S=..) export LIB_DIR=$(2:B=:S=..)
export XML_OUTPUT=$(1:D) 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 # Produce the reference.qbk file by running
@ -94,14 +128,9 @@ make reference.qbk
transform.xsl transform.xsl
reference.xml reference.xml
: :
@make_reference @call-xsltproc
; ;
actions make_reference
{
xsltproc $(2) > $(1)
}
# We have to make a copy of reference.qbk and put it # We have to make a copy of reference.qbk and put it
# in a place where the static .qbk files can find it # in a place where the static .qbk files can find it
# #