Jamfile 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. #
  2. # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
  3. #
  4. # Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #
  7. project beast/doc ;
  8. import os ;
  9. import path ;
  10. import boostbook ;
  11. import quickbook ;
  12. import xsltproc ;
  13. import doxygen ;
  14. import modules ;
  15. import saxonhe ;
  16. #-------------------------------------------------------------------------------
  17. #
  18. # Build the list of header files that Doxygen will scan. We need
  19. # this list to inform the build system of the dependencies so the
  20. # docs can be rebuild if any of the header files change.
  21. #
  22. local sources = [ path.glob-tree ../include/boost/beast : *.hpp *.ipp : detail impl ] ;
  23. # Get the configured paths to doxygen and xsltproc
  24. .doxygen = [ doxygen.name ] ;
  25. .doxygen ?= doxygen ;
  26. #ECHO Using doxygen from "$(.doxygen)" ;
  27. .xsltproc = [ xsltproc.name ] ;
  28. .xsltproc ?= xsltproc ;
  29. #ECHO Using xsltproc from "$(.xsltproc)" ;
  30. #-------------------------------------------------------------------------------
  31. #
  32. # Generate transform.xsl. This xsl transfomration takes as input
  33. # the Doxygen-generated XML and produces QuickBook output.
  34. #
  35. make transform.xsl
  36. :
  37. docca/include/docca/doxygen.xsl
  38. xsl/config.xsl
  39. xsl/class_detail.xsl
  40. xsl/includes.xsl
  41. xsl/includes_foot.xsl
  42. :
  43. @make_transform
  44. ;
  45. # Make a copy of the docca transform. Then, insert our
  46. # customizations into the speciall marked locations using sed.
  47. #
  48. actions make_transform
  49. {
  50. cp $(2[1]) $(1)
  51. sed -i -e "/<!-- CONFIG_TEMPLATE -->/{r $(2[2])" -e "d}" $(1)
  52. sed -i -e "/<!-- CLASS_DETAIL_TEMPLATE -->/{r $(2[3])" -e "d}" $(1)
  53. sed -i -e "/<!-- INCLUDES_TEMPLATE -->/{r $(2[4])" -e "d}" $(1)
  54. sed -i -e "/<!-- INCLUDES_FOOT_TEMPLATE -->/{r $(2[5])" -e "d}" $(1)
  55. }
  56. #-------------------------------------------------------------------------------
  57. #
  58. # Invoke Doxygen to process the header files and produce the XML
  59. # containing the description of the C++ declarations and extracted
  60. # Javadoc comments.
  61. #
  62. make index.xml
  63. :
  64. ./source.dox
  65. :
  66. @make_doxygen_xml
  67. :
  68. <dependency>$(sources)
  69. ;
  70. rule make_doxygen_xml ( targets * : sources * : properties * )
  71. {
  72. LIB_DIR on $(targets) =
  73. [ path.native [ path.parent [ path.root
  74. [ on $(sources[1]) return $(SEARCH) ] [ path.pwd ] ] ] ] ;
  75. }
  76. if [ os.name ] = NT
  77. {
  78. actions make_doxygen_xml
  79. {
  80. SET LIB_DIR=$(LIB_DIR)
  81. SET XML_OUTPUT=$(1:D)
  82. "$(.doxygen)" $(2)
  83. }
  84. }
  85. else
  86. {
  87. actions make_doxygen_xml
  88. {
  89. export LIB_DIR=$(LIB_DIR)
  90. export XML_OUTPUT=$(1:D)
  91. "$(.doxygen)" $(2)
  92. }
  93. }
  94. make combine.xslt : index.xml : @null_action ;
  95. actions null_action
  96. {
  97. touch -c $(1) ;
  98. }
  99. make reference.xml
  100. :
  101. combine.xslt
  102. index.xml
  103. :
  104. @call-xsltproc
  105. ;
  106. actions call-xsltproc
  107. {
  108. "$(.xsltproc)" $(2) > $(1)
  109. }
  110. #-------------------------------------------------------------------------------
  111. #
  112. # Produce the reference.qbk file by running
  113. # the reference xml through the transform.
  114. #
  115. make reference.qbk
  116. :
  117. reference.xml
  118. transform.xsl
  119. :
  120. saxonhe.saxonhe
  121. ;
  122. # We have to make a copy of reference.qbk and put it
  123. # in a place where the static .qbk files can find it
  124. #
  125. install qbk : reference.qbk ;
  126. #-------------------------------------------------------------------------------
  127. #
  128. # Produce the Boost.Book XML from the QuickBook
  129. #
  130. install images
  131. :
  132. images/message.png
  133. :
  134. <location>html/beast/images
  135. ;
  136. explicit images ;
  137. xml beast_doc
  138. :
  139. qbk/main.qbk
  140. :
  141. <dependency>images
  142. <dependency>qbk
  143. ;
  144. explicit beast_doc ;
  145. #-------------------------------------------------------------------------------
  146. #
  147. # HTML documentation for $(BOOST_ROOT)/doc/html
  148. #
  149. #-------------------------------------------------------------------------------
  150. boostbook beast
  151. :
  152. beast_doc
  153. :
  154. <xsl:param>boost.root=../../../..
  155. <xsl:param>chapter.autolabel=1
  156. <xsl:param>chunk.section.depth=8 # Depth to which sections should be chunked
  157. <xsl:param>chunk.first.sections=1 # Chunk the first top-level section?
  158. <xsl:param>toc.section.depth=8 # How deep should recursive sections appear in the TOC?
  159. <xsl:param>toc.max.depth=8 # How many levels should be created for each TOC?
  160. <xsl:param>generate.section.toc.level=8 # Control depth of TOC generation in sections
  161. <xsl:param>generate.toc="chapter toc,title section nop reference nop"
  162. <include>../../../tools/boostbook/dtd
  163. :
  164. <dependency>images
  165. ;
  166. #-------------------------------------------------------------------------------
  167. #
  168. # These are used to inform the build system of the
  169. # means to build the integrated and stand-alone docs.
  170. #
  171. alias boostdoc ;
  172. explicit boostdoc ;
  173. alias boostrelease : beast ;
  174. explicit boostrelease ;