• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#          Copyright Andrey Semashev 2007 - 2015.
3# Distributed under the Boost Software License, Version 1.0.
4#    (See accompanying file LICENSE_1_0.txt or copy at
5#          http://www.boost.org/LICENSE_1_0.txt)
6#
7
8using quickbook ;
9using boostbook ;
10using doxygen ;
11using xsltproc ;
12
13import set ;
14import doxygen ;
15import xsltproc ;
16import notfile ;
17import path ;
18import project ;
19
20project boost/libs/log/doc ;
21
22path-constant images_location : html ;
23
24# NOTE: At least Doxygen 1.8.2 is needed to generate docs correctly. Older versions don't support C++11 constructs correctly and generate misleading docs.
25local doxygen_params =
26        <doxygen:param>RECURSIVE=YES
27        <doxygen:param>ALPHABETICAL_INDEX=YES
28        <doxygen:param>REPEAT_BRIEF=YES
29        <doxygen:param>ALWAYS_DETAILED_SEC=YES
30        <doxygen:param>BRIEF_MEMBER_DESC=NO
31        <doxygen:param>ABBREVIATE_BRIEF=YES
32        <doxygen:param>INHERIT_DOCS=YES
33        <doxygen:param>HIDE_UNDOC_MEMBERS=YES
34        <doxygen:param>HIDE_UNDOC_CLASSES=YES
35        <doxygen:param>HIDE_SCOPE_NAMES=YES
36        <doxygen:param>EXTRACT_ALL=NO
37        <doxygen:param>EXTRACT_PRIVATE=NO
38        <doxygen:param>BUILTIN_STL_SUPPORT=YES
39        <doxygen:param>ENABLE_PREPROCESSING=YES
40        <doxygen:param>MACRO_EXPANSION=YES
41        <doxygen:param>TAB_SIZE=4
42        <doxygen:param>SOURCE_BROWSER=YES
43        <doxygen:param>VERBATIM_HEADERS=NO
44#        <doxygen:param>SEARCH_INCLUDES=YES
45#        <doxygen:param>"INCLUDE_PATH=../../.."
46#        <doxygen:param>EXCLUDE_SYMBOLS="aux aux::*"
47        <doxygen:param>"PREDEFINED=BOOST_LOG_DOXYGEN_PASS \\
48                        BOOST_LOG_NO_VTABLE= \\
49                        BOOST_SYMBOL_VISIBLE= \\
50                        BOOST_FORCEINLINE=inline \\
51                        BOOST_INLINE_VARIABLE=inline \\
52                        BOOST_STATIC_ASSERT(x)= \\
53                        BOOST_STATIC_ASSERT_MSG(x,y)= \\
54                        BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\
55                        BOOST_RV_REF(x)=\"x&&\" \\
56                        BOOST_NESTED_TEMPLATE=template \\
57                        BOOST_CONSTEXPR=constexpr \\
58                        BOOST_CXX14_CONSTEXPR=constexpr \\
59                        BOOST_CONSTEXPR_OR_CONST=constexpr \\
60                        BOOST_NOEXCEPT=noexcept \\
61                        BOOST_NOEXCEPT_IF(x)=noexcept(x) \\
62                        BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\
63                        BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\
64                        BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(x)= \\
65                        BOOST_LOG_UNIQUE_IDENTIFIER_NAME(x)=anonymous \\
66                        BOOST_LOG_USE_NATIVE_SYSLOG=1 \\
67                        BOOST_PARAMETER_KEYWORD(x,y)=\"keyword y;\" \\
68                        BOOST_LOG_AUX_VOID_DEFAULT=\"= void\" \\
69                        BOOST_LOG_CONSOLE_SINK_FRONTEND_INTERNAL=sinks::synchronous_sink \\
70                        BOOST_LOG_FILE_SINK_FRONTEND_INTERNAL=sinks::synchronous_sink \\
71                        BOOST_LOG_NAMESPACE=log \\
72                        BOOST_LOG_OPEN_NAMESPACE=\"namespace log {\" \\
73                        BOOST_LOG_CLOSE_NAMESPACE=\"}\" \\
74                        BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\
75                        BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\
76                        BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\
77                        BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()=\"explicit operator bool() const noexcept;\" \\
78                        BOOST_LOG_USE_CHAR \\
79                        BOOST_LOG_USE_WCHAR_T \\
80                        BOOST_LOG_API= \\
81                        BOOST_LOG_SETUP_API="
82        <xsl:param>boost.doxygen.detailns=aux
83#        <xsl:param>boost.doxygen.detail=implementation_
84    ;
85
86
87local top_level_includes =
88    [ glob
89        ../../../boost/log/*.hpp
90    ] ;
91
92local core_includes =
93    [ glob
94        ../../../boost/log/core/*.hpp
95    ] ;
96
97local attributes_includes =
98    [ glob
99        ../../../boost/log/attributes/*.hpp
100    ] ;
101
102local expressions_includes =
103    [ glob
104        ../../../boost/log/expressions/*.hpp
105        ../../../boost/log/expressions/predicates/*.hpp
106        ../../../boost/log/expressions/formatters/*.hpp
107    ] ;
108
109local sources_includes =
110    [ glob
111        ../../../boost/log/sources/*.hpp
112    ] ;
113
114local sinks_includes =
115    [ set.difference
116        # Document all these files...
117        [ glob
118            ../../../boost/log/sinks/*.hpp
119        ]
120    :
121        # ...except these
122        [ glob
123            ../../../boost/log/sinks/nt6_event_log*.hpp
124        ]
125    ] ;
126
127local utility_includes =
128    [ glob
129        ../../../boost/log/utility/*.hpp
130        ../../../boost/log/utility/ipc/*.hpp
131        ../../../boost/log/utility/setup/*.hpp
132        ../../../boost/log/utility/type_dispatch/*.hpp
133        ../../../boost/log/utility/functional/*.hpp
134        ../../../boost/log/utility/manipulators/*.hpp
135    ] ;
136
137local support_includes =
138    [ glob
139        ../../../boost/log/support/*.hpp
140    ] ;
141
142
143# This rule generates *.qbk files with macros with references to files, classes, etc. from the doxygen resulting *.xml files.
144rule gen-references ( target : source : properties * )
145{
146    DEPENDS target : source ;
147    local source-path = [ path.make [ on $(source) return $(LOCATE) ] ] ;
148    STYLESHEET on $(target) = [ path.native [ path.join [ path.parent $(source-path) ] gen_references.xsl ] ] ;
149    local target-name = $(source:B) ;
150    TARGET on $(target) = [ path.native [ path.join $(source-path) $(target-name:S=.qbk) ] ] ;
151}
152actions gen-references
153{
154#    echo "*** Executing " $(NAME:E=xsltproc) -o "$(TARGET)" "$(STYLESHEET)" "$(>)"
155    $(NAME:E=xsltproc) -o "$(TARGET)" "$(STYLESHEET)" "$(>)"
156}
157
158
159doxygen top_level_reference
160    :
161        $(top_level_includes)
162    :
163        $(doxygen_params)
164        <xsl:param>"boost.doxygen.reftitle=Top level headers"
165        <location>tmp
166    ;
167
168notfile top_level_refs : @gen-references : top_level_reference.xml ;
169
170doxygen core_reference
171    :
172        $(core_includes)
173    :
174        $(doxygen_params)
175        <xsl:param>"boost.doxygen.reftitle=Core components"
176        <location>tmp
177    ;
178
179notfile core_refs : @gen-references : core_reference.xml ;
180
181doxygen attributes_reference
182    :
183        $(attributes_includes)
184    :
185        $(doxygen_params)
186        <xsl:param>"boost.doxygen.reftitle=Attributes"
187        <location>tmp
188    ;
189
190notfile attributes_refs : @gen-references : attributes_reference.xml ;
191
192doxygen expressions_reference
193    :
194        $(expressions_includes)
195    :
196        $(doxygen_params)
197        <xsl:param>"boost.doxygen.reftitle=Expressions"
198        <location>tmp
199    ;
200
201notfile expressions_refs : @gen-references : expressions_reference.xml ;
202
203doxygen sources_reference
204    :
205        $(sources_includes)
206    :
207        $(doxygen_params)
208        <xsl:param>"boost.doxygen.reftitle=Logging sources"
209        <location>tmp
210    ;
211
212notfile sources_refs : @gen-references : sources_reference.xml ;
213
214doxygen sinks_reference
215    :
216        $(sinks_includes)
217    :
218        $(doxygen_params)
219        <xsl:param>"boost.doxygen.reftitle=Sinks"
220        <location>tmp
221    ;
222
223notfile sinks_refs : @gen-references : sinks_reference.xml ;
224
225doxygen utility_reference
226    :
227        $(utility_includes)
228    :
229        $(doxygen_params)
230        <xsl:param>"boost.doxygen.reftitle=Utilities"
231        <location>tmp
232    ;
233
234notfile utility_refs : @gen-references : utility_reference.xml ;
235
236doxygen support_reference
237    :
238        $(support_includes)
239    :
240        $(doxygen_params)
241        <xsl:param>"boost.doxygen.reftitle=Other libraries support layer"
242        <location>tmp
243    ;
244
245notfile support_refs : @gen-references : support_reference.xml ;
246
247
248xml log_doc
249    :
250        log.qbk
251    :
252        <dependency>top_level_refs
253        <dependency>core_refs
254        <dependency>attributes_refs
255        <dependency>expressions_refs
256        <dependency>sources_refs
257        <dependency>sinks_refs
258        <dependency>utility_refs
259        <dependency>support_refs
260    ;
261
262boostbook log
263    :
264        log_doc
265    :
266        <dependency>html/images/log
267        <xsl:param>boost.root=../../../..
268        <xsl:param>boost.libraries=../../../libs/libraries.htm
269        <xsl:param>nav.layout=none
270        <xsl:param>boost.image=Boost
271        <xsl:param>navig.graphics=1
272        <xsl:param>chunk.section.depth=2
273        <xsl:param>boost.compact.function=0
274        <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/log/doc/html
275        <format>pdf:<xsl:param>img.src.path=$(images_location)/
276    ;
277
278install html/images/log : [ glob *.png ] ;
279
280###############################################################################
281alias boostdoc ;
282explicit boostdoc ;
283alias boostrelease : log ;
284explicit boostrelease ;
285