2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00

Revert last merge, as it breaks everything.

[SVN r36669]
This commit is contained in:
Vladimir Prus
2007-01-08 21:29:35 +00:00
parent ef1633804f
commit cdccd6ec1b

View File

@@ -33,8 +33,6 @@ import project ;
import xsltproc ;
import make ;
import os ;
import toolset : flags ;
import alias ;
# Use to specify extra configuration paramters. These get translated
# into a doxyfile which configures the building of the docs.
@@ -46,29 +44,17 @@ feature.feature prefix : : free ;
# Specify the "<xsl:param>boost.doxygen.reftitle" XSLT option.
feature.feature reftitle : : free ;
# Which processor to use for various translations from Doxygen.
feature.feature doxygen:processor : xsltproc doxproc : implicit ;
# To generate, or not, index sections.
feature.feature doxygen:doxproc:index : no yes : incidental ;
# The ID for the resulting BoostBook reference section.
feature.feature doxygen:doxproc:id : : free ;
# The title for the resulting BoostBook reference section.
feature.feature doxygen:doxproc:title : : free ;
# Doxygen configuration input file.
type.register DOXYFILE : doxyfile ;
# Doxygen XML multi-file output.
type.register DOXYGEN_XML_MULTIFILE : xml-dir : XML ;
type.register DOXYGEN_XML_MULTIFILE : : XML ;
# Doxygen XML coallesed output.
type.register DOXYGEN_XML : doxygen : XML ;
# Doxygen HTML multifile directory.
type.register DOXYGEN_HTML_MULTIFILE : html-dir : HTML ;
type.register DOXYGEN_HTML_MULTIFILE : dir : HTML ;
# Redirection HTML file to HTML multifile directory.
type.register DOXYGEN_HTML : : HTML ;
@@ -139,24 +125,13 @@ rule init ( name ? )
.doxygen = $(name) ;
}
.doxygen ?= doxygen ;
.doxproc = [ modules.binding $(__name__) ] ;
.doxproc = $(.doxproc:D)/doxproc.py ;
generators.register-composing doxygen.headers-to-doxyfile
: H HPP CPP : DOXYFILE ;
generators.register-standard doxygen.run
: DOXYFILE : DOXYGEN_XML_MULTIFILE ;
generators.register-standard doxygen.xml-dir-to-boostbook
: DOXYGEN_XML_MULTIFILE : BOOSTBOOK : <doxygen:processor>doxproc ;
generators.register-standard doxygen.xml-to-boostbook
: DOXYGEN_XML : BOOSTBOOK : <doxygen:processor>xsltproc ;
generators.register-standard doxygen.collect
: DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ;
generators.register-standard doxygen.run
: DOXYFILE : DOXYGEN_HTML_MULTIFILE ;
generators.register-standard doxygen.html-redirect
: DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ;
generators.register-composing doxygen.headers-to-doxyfile : H HPP CPP : DOXYFILE ;
generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_XML_MULTIFILE ;
generators.register-standard doxygen.xml-to-boostbook : DOXYGEN_XML : BOOSTBOOK ;
generators.register-standard doxygen.collect : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ;
generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_HTML_MULTIFILE ;
generators.register-standard doxygen.html-redirect : DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ;
IMPORT $(__name__) : doxygen : : doxygen ;
}
@@ -178,36 +153,18 @@ actions doxygen-action
"$(NAME:E=doxygen)" $(>) && echo "Stamped" > "$(<)"
}
# Runs the Python doxproc XML processor.
actions doxproc
{
python "$(DOXPROC)" "--xmldir=$(>)" "--output=$(<)" "$(OPTIONS)" "--id=$(ID)" "--title=$(TITLE)"
}
# Generates a doxygen configuration file (doxyfile) given a set of C++
# sources and a property list that may contain <doxygen:param>
# features.
rule headers-to-doxyfile ( target : sources * : properties * )
{
local text "# Generated by Boost.Build version 2" ;
local output-dir ;
# Translate <doxygen:param> into command line flags.
for local param in [ feature.get-values <doxygen:param> : $(properties) ]
{
local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ;
text += "$(namevalue[1]) = $(namevalue[2])" ;
if $(namevalue[1]) = OUTPUT_DIRECTORY
{
output-dir = "$(namevalue[2])" ;
}
}
if ! $(output-dir)
{
output-dir = [ on $(target) return $(LOCATE) ] ;
text += "OUTPUT_DIRECTORY = $(output-dir)" ;
}
local headers = "" ;
@@ -291,19 +248,6 @@ rule xml-to-boostbook ( target : source : properties * )
xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ;
}
flags doxygen.xml-dir-to-boostbook OPTIONS <doxygen:doxproc:index>yes : --enable-index ;
flags doxygen.xml-dir-to-boostbook ID <doxygen:doxproc:id> ;
flags doxygen.xml-dir-to-boostbook TITLE <doxygen:doxproc:title> ;
rule xml-dir-to-boostbook ( target : source : properties * )
{
DOXPROC on $(target) = $(.doxproc) ;
LOCATE on $(source:S=) = [ on $(source) return $(LOCATE) ] ;
doxygen.doxproc $(target) : $(source:S=) ;
}
# Generate the HTML redirect to HTML dir index.html file.
rule html-redirect ( target : source : properties * )
{
@@ -329,7 +273,7 @@ rule html-redirect ( target : source : properties * )
}
# User-level rule to generate BoostBook XML from a set of headers via Doxygen.
rule doxygen ( target : sources * : requirements * : default-build * : usage-requirements * )
rule doxygen ( target : sources * : requirements * : default-build * )
{
local project = [ project.current ] ;
@@ -381,65 +325,24 @@ rule doxygen ( target : sources * : requirements * : default-build * : usage-req
else
{
# Build a BoostBook XML file from the sources.
local location-xml = [ feature.get-values <location> : $(requirements) ] ;
requirements = [ property.change $(requirements) : <location> ] ;
local target-xml = $(target:B=$(target:B)-xml) ;
## The doxygen configuration file.
targets.main-target-alternative
[ new typed-target $(target-xml:S=.tag) : $(project) : DOXYFILE
: [ targets.main-target-sources $(sources) : $(target-xml:S=.tag) ]
local doxyfile = [
new typed-target $(target) : $(project) : BOOSTBOOK
: [ targets.main-target-sources $(sources) : $(target) ]
: [ targets.main-target-requirements $(requirements)
<doxygen:param>GENERATE_HTML=NO
<doxygen:param>GENERATE_XML=YES
<doxygen:param>XML_OUTPUT=$(target-xml)
: $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
] ;
$(project).mark-target-as-explicit $(target-xml:S=.tag) ;
## The Doxygen XML directory of the processed source files.
targets.main-target-alternative
[ new typed-target $(target-xml:S=.dir) : $(project) : DOXYGEN_XML_MULTIFILE
: $(target-xml:S=.tag)
: [ targets.main-target-requirements $(requirements)
: $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
] ;
$(project).mark-target-as-explicit $(target-xml:S=.dir) ;
## The resulting BoostBook file is generated by the processor tool. The
## tool can be either the xsltproc plus accompanying XSL scripts. Or it
## can be the python doxproc script.
targets.main-target-alternative
[ new typed-target $(target-xml) : $(project) : BOOSTBOOK
: $(target-xml:S=.dir)
: [ targets.main-target-requirements $(requirements)
: $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
] ;
$(project).mark-target-as-explicit $(target-xml) ;
targets.main-target-alternative $(doxyfile) ;
targets.main-target-alternative
[ new install-target-class $(target:S=.xml) : $(project)
: $(target-xml)
: [ $(doxyfile).name ]
: [ targets.main-target-requirements $(requirements)
<location>$(location-xml:E=.)
<name>$(target:S=.xml)
<location>.
: $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
] ;
$(project).mark-target-as-explicit $(target:S=.xml) ;
targets.main-target-alternative
[ new alias-target-class $(target) : $(project)
:
: [ targets.main-target-requirements $(requirements)
: $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
: [ targets.main-target-usage-requirements $(usage-requirements)
<dependency>$(target:S=.xml)
: $(project) ]
] ;
}
}