forked from boostorg/static_string
Use Docca jam module
This commit is contained in:
1 parent
c5df271a1a
commit
f92940bfab
2 files changed
+39
-485
No files matched your search
+39
-233
@@ -8,245 +8,51 @@
|
||||
|
||||
project static_string/doc ;
|
||||
|
||||
import os ;
|
||||
import path ;
|
||||
import boostbook ;
|
||||
import quickbook ;
|
||||
import xsltproc ;
|
||||
import doxygen ;
|
||||
import modules ;
|
||||
import saxonhe ;
|
||||
import common ;
|
||||
import ../../../tools/docca/docca.jam ;
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Build the list of header files that Doxygen will scan. We need
|
||||
# this list to inform the build system of the dependencies so the
|
||||
# docs can be rebuild if any of the header files change.
|
||||
#
|
||||
|
||||
local sources = [ path.glob-tree ../include/boost/static_string : *.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)" ;
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Invoke Doxygen to process the header files and produce the XML
|
||||
# containing the description of the C++ declarations and extracted
|
||||
# Javadoc comments.
|
||||
#
|
||||
make index.xml
|
||||
docca.reference reference.qbk
|
||||
:
|
||||
./source.dox
|
||||
xsl/custom-overrides.xsl
|
||||
[ glob-tree-ex ../include/boost/static_string : *.hpp *.ipp : detail impl ]
|
||||
:
|
||||
@make_doxygen_xml
|
||||
:
|
||||
<dependency>$(sources)
|
||||
<doxygen:param>PROJECT_NAME=StaticString
|
||||
<doxygen:param>PROJECT_BRIEF="String Library"
|
||||
<doxygen:param>ALIASES="esafe=\"@par Exception Safety\""
|
||||
<doxygen:param>FILE_PATTERNS=
|
||||
<doxygen:param>EXAMPLE_PATTERNS=
|
||||
<doxygen:param>DISTRIBUTE_GROUP_DOC=YES
|
||||
<doxygen:param>MACRO_EXPANSION=YES
|
||||
<doxygen:param>EXPAND_ONLY_PREDEF=YES
|
||||
<doxygen:param>PREDEFINED="\\
|
||||
BOOST_STATIC_STRING_DOCS \\
|
||||
\"BOOST_STATIC_STRING_CPP11_CONSTEXPR=constexpr\" \\
|
||||
\"BOOST_STATIC_STRING_CPP14_CONSTEXPR=constexpr\" \\
|
||||
\"BOOST_STATIC_STRING_CPP17_CONSTEXPR=constexpr\" \\
|
||||
\"BOOST_STATIC_STRING_CPP20_CONSTEXPR=constexpr\""
|
||||
<doxygen:param>ABBREVIATE_BRIEF=
|
||||
<doxygen:param>INLINE_INHERITED_MEMB=YES
|
||||
<doxygen:param>JAVADOC_AUTOBRIEF=YES
|
||||
<doxygen:param>AUTOLINK_SUPPORT=NO
|
||||
<doxygen:param>EXTRACT_ALL=YES
|
||||
<doxygen:param>EXTRACT_PRIVATE=YES
|
||||
<doxygen:param>EXTRACT_LOCAL_CLASSES=NO
|
||||
<doxygen:param>SHOW_INCLUDE_FILES=NO
|
||||
<doxygen:param>INLINE_INFO=NO
|
||||
<doxygen:param>SORT_MEMBER_DOCS=NO
|
||||
<doxygen:param>SORT_MEMBERS_CTORS_1ST=YES
|
||||
<doxygen:param>SHOW_USED_FILES=NO
|
||||
<doxygen:param>SHOW_FILES=NO
|
||||
<doxygen:param>SHOW_NAMESPACES=NO
|
||||
<doxygen:param>CLASS_DIAGRAMS=NO
|
||||
|
||||
# <doxygen:param>ALLOW_UNICODE_NAMES=NO
|
||||
# <doxygen:param>GROUP_NESTED_COMPOUNDS=NO
|
||||
# <doxygen:param>HIDE_COMPOUND_REFERENCE=NO
|
||||
# <doxygen:param>WARN_AS_ERROR=NO
|
||||
;
|
||||
|
||||
rule make_doxygen_xml ( targets * : sources * : properties * )
|
||||
{
|
||||
LIB_DIR on $(targets) =
|
||||
[ path.native [ path.parent [ path.root
|
||||
[ on $(sources[1]) return $(SEARCH) ] [ path.pwd ] ] ] ] ;
|
||||
}
|
||||
|
||||
if [ os.name ] = NT
|
||||
{
|
||||
actions make_doxygen_xml
|
||||
{
|
||||
SET LIB_DIR=$(LIB_DIR)
|
||||
SET XML_OUTPUT=$(1:D)
|
||||
"$(.doxygen)" $(2)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actions make_doxygen_xml
|
||||
{
|
||||
export LIB_DIR=$(LIB_DIR)
|
||||
export XML_OUTPUT=$(1:D)
|
||||
"$(.doxygen)" $(2)
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Copy all the XSLT modules to the target directory.
|
||||
#
|
||||
# FIXME: Change this so we can just specify a directory,
|
||||
# rather than every file individually.
|
||||
#
|
||||
# Also, somehow force dependencies in a general way
|
||||
# such that the XSLT has to be executed again
|
||||
# if any of the modules change. For example,
|
||||
# if base-extract-xml-pages.xml changes, then
|
||||
# an invocation of extract-xml-pages.xsl (which
|
||||
# imports the former) must be run again.
|
||||
#
|
||||
path-constant docca : ../../../tools/docca ;
|
||||
make extract-xml-pages.xsl : $(docca)/include/docca/extract-xml-pages.xsl : @copy_script ;
|
||||
make base-extract-xml-pages.xsl : $(docca)/include/docca/base-extract-xml-pages.xsl : @copy_script ;
|
||||
make common.xsl : $(docca)/include/docca/common.xsl : @copy_script ;
|
||||
make stage1.xsl : $(docca)/include/docca/stage1.xsl : @copy_script ;
|
||||
make base-stage1.xsl : $(docca)/include/docca/base-stage1.xsl : @copy_script ;
|
||||
make stage2.xsl : $(docca)/include/docca/stage2.xsl : @copy_script ;
|
||||
make base-stage2.xsl : $(docca)/include/docca/base-stage2.xsl : @copy_script ;
|
||||
make assemble-quickbook.xsl : $(docca)/include/docca/assemble-quickbook.xsl : @copy_script ;
|
||||
make emphasized-types.xsl : $(docca)/include/docca/emphasized-types.xsl : @copy_script ;
|
||||
make base-config.xsl : $(docca)/include/docca/base-config.xsl : @copy_script ;
|
||||
|
||||
# Copy the project-specific config XSLT
|
||||
make custom-overrides.xsl : xsl/custom-overrides.xsl : @copy_script ;
|
||||
|
||||
# Make a copy of the given file.
|
||||
#
|
||||
actions copy_script
|
||||
{
|
||||
cp $(2[1]) $(1)
|
||||
}
|
||||
|
||||
|
||||
# This is to initially create the directory as a side effect; I'm sure there's a better way...
|
||||
make xml-pages/directory/placeholder : index.xml : @null_action ;
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Run index.xml through the first transformation stage
|
||||
# (assembling and splitting the XML into page-specific files).
|
||||
#
|
||||
make xml-pages.xml
|
||||
:
|
||||
index.xml
|
||||
extract-xml-pages.xsl
|
||||
|
||||
# Make bjam aware of additional dependencies
|
||||
base-extract-xml-pages.xsl
|
||||
base-config.xsl
|
||||
custom-overrides.xsl
|
||||
common.xsl
|
||||
:
|
||||
saxonhe.saxonhe
|
||||
;
|
||||
|
||||
# This is just to make the directory eligible as a source
|
||||
make xml-pages : index.xml : @null_action ;
|
||||
|
||||
# Not ready for prime time until I figure out how to get the xslt-visualizer code in place
|
||||
#make stage1/code-trace-enabled/stage1.xsl
|
||||
# :
|
||||
# stage1.xsl
|
||||
# xslt-visualizer/xsl/trace-enable.xsl
|
||||
# :
|
||||
# saxonhe.saxonhe
|
||||
# ;
|
||||
|
||||
# This is to initially create the directory as a side effect; I'm sure there's a better way...
|
||||
make stage1/results/directory/placeholder : xml-pages.xml : @null_action ;
|
||||
make stage2/results/directory/placeholder : xml-pages.xml : @null_action ;
|
||||
|
||||
# TODO: figure out why this (and the following stage) get built every time
|
||||
make stage1/results
|
||||
:
|
||||
xml-pages
|
||||
stage1.xsl
|
||||
|
||||
# additional dependencies
|
||||
xml-pages.xml
|
||||
base-stage1.xsl
|
||||
base-config.xsl
|
||||
custom-overrides.xsl
|
||||
common.xsl
|
||||
:
|
||||
saxonhe.saxonhe_dir
|
||||
;
|
||||
|
||||
make stage2/results
|
||||
:
|
||||
stage1/results
|
||||
stage2.xsl
|
||||
|
||||
# additional dependencies
|
||||
emphasized-types.xsl
|
||||
base-stage2.xsl
|
||||
base-config.xsl
|
||||
custom-overrides.xsl
|
||||
common.xsl
|
||||
:
|
||||
saxonhe.saxonhe_dir
|
||||
;
|
||||
|
||||
make reference.qbk
|
||||
:
|
||||
xml-pages.xml
|
||||
assemble-quickbook.xsl
|
||||
|
||||
# TODO: make this input to the XSLT somehow
|
||||
# rather than relying on it being hard-coded
|
||||
# in the XSLT (which it is!)
|
||||
stage2/results
|
||||
:
|
||||
saxonhe.saxonhe
|
||||
;
|
||||
|
||||
actions make_dir
|
||||
{
|
||||
mkdir $(1)
|
||||
}
|
||||
|
||||
make combine.xslt : index.xml : @null_action ;
|
||||
|
||||
actions touch_file
|
||||
{
|
||||
touch $(1) ;
|
||||
}
|
||||
|
||||
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
|
||||
# the reference xml through the transform.
|
||||
#
|
||||
#make reference.qbk
|
||||
# :
|
||||
# reference.xml
|
||||
# transform.xsl
|
||||
# :
|
||||
# saxonhe.saxonhe
|
||||
# ;
|
||||
|
||||
# We have to make a copy of reference.qbk and put it
|
||||
# in a place where the static .qbk files can find it
|
||||
#
|
||||
install qbk : reference.qbk ;
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Produce the Boost.Book XML from the QuickBook
|
||||
@@ -265,7 +71,7 @@ xml static_string_doc
|
||||
qbk/main.qbk
|
||||
:
|
||||
<dependency>images
|
||||
<dependency>qbk
|
||||
<dependency>reference.qbk
|
||||
;
|
||||
|
||||
explicit static_string_doc ;
|
||||
|
||||
Reference in new issue
Block a user