diff --git a/v2/tools/doxygen.jam b/v2/tools/doxygen.jam index efb3b5c8a..52898d1a8 100644 --- a/v2/tools/doxygen.jam +++ b/v2/tools/doxygen.jam @@ -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 "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 : doxproc ; - generators.register-standard doxygen.xml-to-boostbook - : DOXYGEN_XML : BOOSTBOOK : 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 # features. rule headers-to-doxyfile ( target : sources * : properties * ) { local text "# Generated by Boost.Build version 2" ; - - local output-dir ; # Translate into command line flags. for local param in [ feature.get-values : $(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 yes : --enable-index ; -flags doxygen.xml-dir-to-boostbook ID ; -flags doxygen.xml-dir-to-boostbook 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 : $(requirements) ] ; - requirements = [ property.change $(requirements) : ] ; - 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) GENERATE_HTML=NO GENERATE_XML=YES - 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-xml:E=.) - $(target:S=.xml) + . : $(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) - $(target:S=.xml) - : $(project) ] - ] ; } }