mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 00:32:11 +00:00
boostbook.jam: Add rule to access XSL directory from other modules
doxygen.jam: _Very_ preliminary support for Doxygen --> BoostBook conversion. Uses a hacked up Doxygen to output XML representation as one big XML file instead of many smaller (unlinked) XML files. [SVN r18087]
This commit is contained in:
@@ -90,6 +90,10 @@ rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-xsl-dir ?
|
||||
}
|
||||
}
|
||||
|
||||
rule xsl-dir
|
||||
{
|
||||
return $(.boostbook-xsl-dir) ;
|
||||
}
|
||||
|
||||
rule xslt ( target : source stylesheet : properties * )
|
||||
{
|
||||
@@ -326,11 +330,6 @@ actions xslt-xsltproc-dir
|
||||
XML_CATALOG_FILES=catalog.xml xsltproc $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>)
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# XML Catalog Generation
|
||||
#############################################################################
|
||||
|
||||
|
||||
# XInclude scanner. Mostly stolen from c-scanner :)
|
||||
# Note that this assumes an "xi" prefix for XIncludes. This isn't always the
|
||||
# case for XML documents, but we'll assume it's true for anything we encounter.
|
||||
|
||||
70
doxygen.jam
Normal file
70
doxygen.jam
Normal file
@@ -0,0 +1,70 @@
|
||||
# Copyright (C) 2003 Doug Gregor. Permission to copy, use, modify,
|
||||
# sell and distribute this software is granted provided this
|
||||
# copyright notice appears in all copies. This software is provided
|
||||
# "as is" without express or implied warranty, and with no claim as
|
||||
# to its suitability for any purpose.
|
||||
|
||||
# This module defines rules to handle generation of BoostBook XML
|
||||
# from Doxygen XML output. At the moment, this requires a special
|
||||
# version of Doxygen that can output a single XML file instead of a
|
||||
# set of XML files.
|
||||
|
||||
import class : class new ;
|
||||
import targets ;
|
||||
import feature ;
|
||||
import property ;
|
||||
import generators ;
|
||||
import boostbook ;
|
||||
|
||||
type.register DOXYGEN_XML : doxygen ; # Doxygen XML output
|
||||
|
||||
generators.register-standard doxygen.extract-xml : H C CPP : DOXYGEN_XML ;
|
||||
generators.register-standard doxygen.xml-to-boostbook : DOXYGEN_XML : XML ;
|
||||
|
||||
# Initialize the Doxygen module. Parameters are:
|
||||
# name: the name of the 'doxygen' executable. If not specified, the name
|
||||
# 'doxygen' will be used
|
||||
rule init ( name ? )
|
||||
{
|
||||
if ! $(.initialized)
|
||||
{
|
||||
.initialized = true ;
|
||||
|
||||
if $(name)
|
||||
{
|
||||
.doxygen = $(name) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule name ( )
|
||||
{
|
||||
return $(.doxygen) ;
|
||||
}
|
||||
|
||||
rule extract-xml ( target : sources * : properties * )
|
||||
{
|
||||
NAME on $(target) = [ name ] ;
|
||||
doxygen-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions doxygen-action
|
||||
{
|
||||
$(NAME:E=doxygen) -g $(<:S=.doxyfile)
|
||||
echo "GENERATE_HTML = NO " >> $(<:S=.doxyfile)
|
||||
echo "GENERATE_LATEX = NO " >> $(<:S=.doxyfile)
|
||||
echo "GENERATE_XML = YES " >> $(<:S=.doxyfile)
|
||||
echo "INPUT = $(>)" >> $(<:S=.doxyfile)
|
||||
echo "MONOLITHIC_XML_FILE = $(<)" >> $(<:S=.doxyfile)
|
||||
$(NAME:E=doxygen) $(<:S=.doxyfile) ;
|
||||
}
|
||||
|
||||
rule xml-to-boostbook ( target : source : properties * )
|
||||
{
|
||||
local xsl-dir = [ boostbook.xsl-dir ] ;
|
||||
|
||||
boostbook.xslt $(target)
|
||||
: $(source) "$(xsl-dir)/doxygen/doxygen2boostbook.xsl"
|
||||
: $(properties)
|
||||
;
|
||||
}
|
||||
Reference in New Issue
Block a user