Jamfile.v2 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. # Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
  2. # Copyright (c) 2016 Rene Rivera
  3. #
  4. # Distributed under the Boost Software License, Version 1.0.
  5. # (See accompanying file LICENSE_1_0.txt or copy at
  6. # http://www.boost.org/LICENSE_1_0.txt)
  7. project boost/doc
  8. : requirements
  9. <xsl:param>boost.libraries=../../libs/libraries.htm
  10. <format>html:<xsl:param>chunker.output.doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
  11. <format>html:<xsl:param>chunker.output.doctype-system="http://www.w3.org/TR/html4/loose.dtd"
  12. ;
  13. import boostbook : boostbook ;
  14. import project ;
  15. import targets ;
  16. import print ;
  17. import type ;
  18. import generators ;
  19. import sequence ;
  20. import path ;
  21. path-constant BOOST_DOC : . ;
  22. local BOOST_DOC_LIBS =
  23. ../libs/accumulators/doc//accumulators
  24. ../libs/algorithm/string/doc/string_algo.xml
  25. ../libs/align/doc//align
  26. ../libs/any/doc/any.xml
  27. ../libs/array/doc/array.xml
  28. ../libs/atomic/doc//atomic
  29. ../libs/chrono/doc//chrono
  30. ../libs/circular_buffer/doc//standalone/<format>docbook
  31. ../libs/container/doc//standalone/<format>docbook
  32. #../libs/crc/doc//crc
  33. ../libs/date_time/xmldoc/date_time.xml
  34. ../libs/dll/doc//dll-doc/<format>docbook
  35. ../libs/foreach/doc//foreach
  36. ../libs/function/doc/function.xml
  37. ../libs/functional/hash/doc//hash
  38. ../libs/heap/doc//heap
  39. ../libs/interprocess/doc//standalone/<format>docbook
  40. ../libs/intrusive/doc//standalone/<format>docbook
  41. ../libs/lambda/doc/lambda.xml
  42. ../libs/lexical_cast/doc//lexical_cast
  43. ../libs/lockfree/doc//lockfree
  44. ../libs/logic/doc//tribool/<format>docbook
  45. ../libs/metaparse/doc//metaparse
  46. ../libs/move/doc//move
  47. ../libs/multi_array/doc/xml/bbref.xml
  48. ../libs/mpi/doc//mpi
  49. ../libs/predef/doc//boostdoc
  50. ../libs/program_options/doc/program_options.xml
  51. ../libs/property_tree/doc//property_tree
  52. ../libs/proto/doc//proto
  53. #../libs/proto/doc//protodoc.xml
  54. ../libs/random/doc//random
  55. ../libs/ratio/doc//ratio
  56. ../libs/signals/doc/signals.xml
  57. ../libs/signals2/doc/signals.xml
  58. #../libs/spirit/doc//spirit
  59. ../libs/static_assert/doc//static_assert
  60. ../libs/thread/doc//thread
  61. ../libs/tr1/doc//tr1
  62. ../libs/type_erasure/doc//type_erasure
  63. ../libs/type_index/doc//type_index
  64. #../libs/type_traits/doc//type_traits
  65. ../libs/typeof/doc//typeof
  66. ../libs/units/doc//units
  67. ../libs/variant/doc/variant.xml
  68. ../libs/unordered/doc//unordered
  69. ../libs/xpressive/doc//xpressive
  70. ;
  71. if "--release-build" in [ modules.peek : ARGV ]
  72. {
  73. import project ;
  74. import path ;
  75. local lib-docs = [ path.glob [ path.glob $(BOOST_DOC)/../libs : */doc ]
  76. : [ modules.peek project : JAMFILE ] ] ;
  77. for local lib-doc in $(lib-docs:D)
  78. {
  79. local lib-doc-project = [ path.relative-to $(BOOST_DOC) $(lib-doc) ] ;
  80. local boost-doc-lib = [ MATCH "^($(lib-doc-project))" : $(BOOST_DOC_LIBS) ] ;
  81. if ! $(boost-doc-lib)
  82. {
  83. build-project $(lib-doc-project) ;
  84. }
  85. }
  86. }
  87. #
  88. # Note that when refering to libraries that use auto-index we must process all the way to
  89. # docbook before including here. We must also ensure that auto-index uses it's own index
  90. # generation, otherwise we get one big index that's repeated in each library. Xslt's index
  91. # generation is also so slow that it's impractical for a build this large (takes ~ 9 hrs
  92. # to build with just 3 indexed libraries). Hence we refer to these libraries as for example:
  93. #
  94. # ../libs/interprocess/doc//standalone/<format>docbook
  95. #
  96. # Within each library that uses this, make sure that the boostbook target contains
  97. #
  98. # <format>docbook:<auto-index-internal>on
  99. #
  100. # And if boost.root is set, restrict it to local html builds using:
  101. #
  102. # <format>html:<xsl:param>boost.root=../../../..
  103. # <format>html:<xsl:param>boost.libraries=../../../../libs/libraries.htm
  104. #
  105. # Finally, in boost.xml we xi:include interproces.auto_index.docbook which is the final
  106. # post-index generation docbook, rather than interprocess.xml which is the pre-indexed boostbook.
  107. #
  108. local rule component-order ( x y )
  109. {
  110. local a = [ MATCH "(/libs/[^/]+)" "(/tools/[^/]+)" : $(x:G) $(x:G=) ] ;
  111. local b = [ MATCH "(/libs/[^/]+)" "(/tools/[^/]+)" : $(y:G) $(y:G=) ] ;
  112. if $(a[1]) < $(b[1])
  113. {
  114. return true ;
  115. }
  116. else if $(a[1]) = $(b[1]) && $(x) < $(y)
  117. {
  118. return true ;
  119. }
  120. }
  121. rule xinclude-generator ( target : sources * : properties * )
  122. {
  123. print.output $(target) ;
  124. local includes ;
  125. sources = [ sequence.insertion-sort $(sources) : component-order ] ;
  126. locate = [ path.root [ on $(target) return $(LOCATE) ] [ path.pwd ] ] ;
  127. for local xml in $(sources)
  128. {
  129. local dir ;
  130. dir ?= [ on $(xml) return $(LOCATE) ] ;
  131. dir ?= [ on $(xml) return $(SEARCH) ] ;
  132. dir ?= "" ;
  133. dir = [ path.root $(dir[1]) [ path.pwd ] ] ;
  134. dir = [ path.relative-to $(locate) $(dir) ] ;
  135. includes += "<xi:include href=\"$(dir[1])/$(xml:G=)\"/>" ;
  136. }
  137. print.text
  138. "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
  139. "<xml xmlns:xi=\"http://www.w3.org/2003/XInclude\">"
  140. $(includes)
  141. "</xml>"
  142. ;
  143. }
  144. type.register XINCLUDE_XML : xinclude : XML ;
  145. generators.register-composing $(__name__).xinclude-generator : XML : XINCLUDE_XML ;
  146. rule xinclude ( name : sources * : requirements * : default-build * : usage-requirements * )
  147. {
  148. targets.create-typed-target XINCLUDE_XML
  149. : [ project.current ]
  150. : $(name)
  151. : $(sources)
  152. : $(requirements)
  153. : $(default-build)
  154. : $(usage-requirements)
  155. ;
  156. }
  157. xinclude libraries :
  158. $(BOOST_DOC_LIBS)
  159. ;
  160. explicit libraries ;
  161. xinclude tools :
  162. ../tools/build/doc//jam_docs
  163. ../tools/quickbook/doc//quickbook
  164. ../tools/boostbook/doc/boostbook.xml
  165. ../tools/build/doc/src/userman.xml
  166. ;
  167. explicit tools ;
  168. boostbook doc
  169. :
  170. src/boost.xml
  171. :
  172. <dependency>libraries
  173. <implicit-dependency>libraries
  174. <dependency>tools
  175. <implicit-dependency>tools
  176. ## Build the various generated docs (Doxygen and QuickBook)...
  177. ## TODO: These should all eventually be moved to the respective library doc targets.
  178. <dependency>../libs/accumulators/doc//accdoc.xml
  179. <dependency>../libs/accumulators/doc//statsdoc.xml
  180. <dependency>../libs/accumulators/doc//opdoc.xml
  181. #<dependency>../libs/crc/doc//autodoc.xml
  182. <dependency>../libs/program_options/doc//autodoc.xml
  183. <dependency>../libs/algorithm/string/doc//autodoc.xml
  184. <dependency>../libs/mpi/doc//mpi_autodoc.xml
  185. <dependency>../libs/property_tree/doc//autodoc.xml
  186. <dependency>../libs/xpressive/doc//autodoc.xml
  187. <dependency>../libs/date_time/xmldoc//date_time_autodoc.xml
  188. <dependency>../libs/date_time/xmldoc//gregorian_autodoc.xml
  189. <dependency>../libs/date_time/xmldoc//posix_time_autodoc.xml
  190. <dependency>../libs/date_time/xmldoc//local_time_autodoc.xml
  191. <dependency>../libs/move/doc//autodoc.xml
  192. <dependency>../libs/signals2/doc//hello_world_def_code_snippet.xml
  193. <dependency>../libs/heap/doc//autodoc.xml
  194. <dependency>../libs/lockfree/doc//autodoc.xml
  195. ## Add path references to generated docs...
  196. <implicit-dependency>../libs/signals2/doc//hello_world_def_code_snippet.xml
  197. <dependency>images
  198. <dependency>callouts
  199. <xsl:path>$(BOOST_DOC)
  200. ;
  201. install images : [ glob src/images/*.png ] : <location>html/images ;
  202. explicit images ;
  203. install callouts : [ glob src/images/callouts/*.png ] : <location>html/images/callouts ;
  204. explicit callouts ;
粤ICP备19079148号