1 # Units documentation Jamfile
3 # Copyright (c) 2007-2008
6 # Distributed under the Boost Software License, Version 1.0. (See
7 # accompanying file LICENSE_1_0.txt or copy at
8 # http://www.boost.org/LICENSE_1_0.txt
18 path-constant here : . ;
20 rule run_doxygen ( target : files * : name )
26 <doxygen:param>EXTRACT_ALL=YES
27 <doxygen:param>EXPAND_ONLY_PREDEF=YES
29 # Horribly ugly, but then macros usually are :(
30 <doxygen:param>"PREDEFINED= \\
31 \"BOOST_MPL_ASSERT(expr)=\" \\
32 \"BOOST_UNITS_STATIC_CONSTANT(a,b)=static const b a\" \\
33 \"BOOST_UNITS_AUTO_STATIC_CONSTANT(a,b)=static const auto a = b\" \\
34 \"BOOST_UNITS_TYPEOF(a)=typeof(a)\" \\
35 \"BOOST_PREVENT_MACRO_SUBSTITUTION=\" \\
36 \"BOOST_UNITS_HAS_TYPEOF=1\" \\
37 \"BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string, symbol_, factor, other_unit, id)= \\
38 namespace boost { namespace units { namespace namespace_ { \\
39 struct name_ ## _base_unit : boost::units::base_unit<name_ ## _base_unit, other_unit::dimension_type, id> { \\
40 static const char* name(); \\
41 static const char* symbol(); \\
44 \"BOOST_UNITS_DOXYGEN=1\""
45 <doxygen:param>HIDE_UNDOC_MEMBERS=NO
46 <doxygen:param>EXTRACT_PRIVATE=NO
47 <doxygen:param>ENABLE_PREPROCESSING=YES
48 <doxygen:param>MACRO_EXPANSION=YES
50 <doxygen:param>SEARCH_INCLUDES=NO
56 run_doxygen units_reference
58 [ glob $(here)/../../../boost/units/*.hpp :
59 $(here)/../../../boost/units/physical_dimensions.hpp ]
64 run_doxygen si_reference
66 $(here)/../../../boost/units/systems/si.hpp
67 [ path.glob-tree $(here)/../../../boost/units/systems/si : *.hpp : detail ]
72 run_doxygen cgs_reference
74 $(here)/../../../boost/units/systems/cgs.hpp
75 [ path.glob-tree $(here)/../../../boost/units/systems/cgs : *.hpp : detail ]
77 "CGS System Reference"
80 rule make_base_units_doc ( directory : name )
82 run_doxygen $(directory)_base_units_reference
84 [ path.glob-tree $(here)/../../../boost/units/base_units/$(directory) : *.hpp : detail conversions.hpp ]
86 "$(name) Base Units Reference"
90 make_base_units_doc angle : Angle ;
91 make_base_units_doc astronomical : Astronomical ;
92 make_base_units_doc cgs : CGS ;
93 make_base_units_doc imperial : Imperial ;
94 make_base_units_doc information : Information ;
95 make_base_units_doc metric : Metric ;
96 make_base_units_doc si : SI ;
97 make_base_units_doc temperature : Temperature ;
98 make_base_units_doc us : US ;
100 all_base_units_doc = angle astronomical cgs imperial information metric si temperature us ;
101 all_base_units_doc = $(all_base_units_doc)_base_units_reference ;
103 run_doxygen dimensions_reference
105 $(here)/../../../boost/units/physical_dimensions.hpp
106 [ path.glob-tree $(here)/../../../boost/units/physical_dimensions : *.hpp : detail ]
108 "Dimensions Reference"
111 run_doxygen trig_reference
113 #../../../boost/units/systems/trig.hpp
114 [ path.glob-tree $(here)/../../../boost/units/systems/angle : *.hpp : detail ]
116 "Trigonometry and Angle System Reference"
119 run_doxygen temperature_reference
121 [ path.glob-tree $(here)/../../../boost/units/systems/temperature : *.hpp : detail ]
123 "Temperature System Reference"
126 run_doxygen information_reference
128 $(here)/../../../boost/units/systems/information.hpp
129 [ path.glob-tree $(here)/../../../boost/units/systems/information : *.hpp : detail prefixes.hpp ]
131 "Information System Reference"
134 run_doxygen abstract_reference
136 $(here)/../../../boost/units/systems/abstract.hpp
138 "Abstract System Reference"
143 if [ path.basename $(a) ] < [ path.basename $(b) ]
149 rule generate-qbk ( target : sources * : properties * )
151 print.output $(target) ;
152 local as-path = [ sequence.transform path.make : $(sources:G=) ] ;
155 for local file in $(as-path)
157 local base = [ path.basename $(file) ] ;
158 if $(base) in $(known)
160 if ! $(base) in $(duplicated)
162 duplicated += $(base) ;
169 for local file in [ sequence.insertion-sort $(as-path) : less ]
171 local output_filename = [ path.relative-to [ path.make $(here)/../../.. ] $(file) ] ;
172 local base_filename = [ path.basename $(file) ] ;
173 local base_unit = [ regex.replace $(base_filename) "\\.hpp" "" ] ;
174 if $(base_filename) in $(duplicated)
176 # tack the directory name onto the end
177 local dir-name = [ path.basename [ path.parent $(file) ] ] ;
178 base_unit = "$(base_unit) ($(dir-name))" ;
180 print.text "[headerref $(output_filename) $(base_unit)][br]" : overwrite ;
184 make base_units.qbk : [ path.glob-tree $(here)/../../../boost/units/base_units : *.hpp : detail conversions.hpp ] : @generate-qbk ;
185 explicit base_units ;
187 install base_units_install : base_units.qbk : <location>. ;
193 <dependency>base_units_install
194 <dependency>units_reference
195 <dependency>si_reference
196 <dependency>cgs_reference
197 <dependency>$(all_base_units_doc)
198 <dependency>dimensions_reference
199 <dependency>trig_reference
200 <dependency>temperature_reference
201 <dependency>information_reference
202 <dependency>abstract_reference
209 <xsl:param>toc.max.depth=1
210 <xsl:param>toc.section.depth=8
211 <xsl:param>chunk.section.depth=8
212 <xsl:param>boost.root="../../../.."
213 <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
216 ###############################################################################
224 explicit boostrelease ;