3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Boostdep
</title>
5 <link rel=
"stylesheet" href=
"../../../../doc/src/boostbook.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.78.1">
7 <link rel=
"home" href=
"index.html" title=
"Boostdep">
9 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF">
10 <table cellpadding=
"2" width=
"100%"><tr>
11 <td valign=
"top"><img alt=
"Boost C++ Libraries" width=
"277" height=
"86" src=
"../../../../boost.png"></td>
12 <td align=
"center"><a href=
"../../../../index.html">Home
</a></td>
13 <td align=
"center"><a href=
"../../../../libs/libraries.htm">Libraries
</a></td>
14 <td align=
"center"><a href=
"http://www.boost.org/users/people.html">People
</a></td>
15 <td align=
"center"><a href=
"http://www.boost.org/users/faq.html">FAQ
</a></td>
16 <td align=
"center"><a href=
"../../../../more/index.htm">More
</a></td>
19 <div class=
"spirit-nav"></div>
21 <div class=
"titlepage">
23 <div><h2 class=
"title">
24 <a name=
"boostdep"></a>Boostdep
</h2></div>
25 <div><p class=
"copyright">Copyright
© 2014-
2016 Peter Dimov
</p></div>
26 <div><div class=
"legalnotice">
27 <a name=
"boostdep.legal"></a><p>
28 Distributed under the
<a href=
"http://boost.org/LICENSE_1_0.txt" target=
"_top">Boost
29 Software License, Version
1.0</a>.
36 <p><b>Table of Contents
</b></p>
38 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction">Introduction
</a></span></dt>
40 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction.modular_boost">Modular Boost
</a></span></dt>
41 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction.building_boostdep">Building Boostdep
</a></span></dt>
42 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction.running_boostdep">Running Boostdep
</a></span></dt>
44 <dt><span class=
"section"><a href=
"index.html#boostdep.usage">Usage
</a></span></dt>
46 <dt><span class=
"section"><a href=
"index.html#boostdep.usage.simple_queries">Simple Queries
</a></span></dt>
47 <dt><span class=
"section"><a href=
"index.html#boostdep.usage.html_reports">HTML reports
</a></span></dt>
49 <dt><span class=
"section"><a href=
"index.html#boostdep.reference">Reference
</a></span></dt>
51 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.list_modules">--list-modules
</a></span></dt>
52 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.list_buildable">--list-buildable
</a></span></dt>
53 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.list_dependencies">--list-dependencies
</a></span></dt>
54 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.module_overview">--module-overview
</a></span></dt>
55 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.module_levels">--module-levels
</a></span></dt>
56 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.module_weights">--module-weights
</a></span></dt>
57 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.primary">--primary
</a></span></dt>
58 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.secondary">--secondary
</a></span></dt>
59 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.reverse">--reverse
</a></span></dt>
60 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.subset">--subset
</a></span></dt>
61 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.header">--header
</a></span></dt>
62 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.track_sources">--track-sources
</a></span></dt>
63 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.title">--title
</a></span></dt>
64 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.footer">--footer
</a></span></dt>
65 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.html">--html
</a></span></dt>
70 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
71 <a name=
"boostdep.introduction"></a><a class=
"link" href=
"index.html#boostdep.introduction" title=
"Introduction">Introduction
</a>
72 </h2></div></div></div>
73 <div class=
"toc"><dl class=
"toc">
74 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction.modular_boost">Modular Boost
</a></span></dt>
75 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction.building_boostdep">Building Boostdep
</a></span></dt>
76 <dt><span class=
"section"><a href=
"index.html#boostdep.introduction.running_boostdep">Running Boostdep
</a></span></dt>
79 <span class=
"emphasis"><em>Boostdep
</em></span> is a tool for generating Boost dependency reports.
80 It scans the header or source files of the Boost libraries for
<code class=
"computeroutput"><span class=
"preprocessor">#include
</span></code> directives, builds a dependency
81 graph from this information and outputs its findings in plain text or HTML.
84 <div class=
"titlepage"><div><div><h3 class=
"title">
85 <a name=
"boostdep.introduction.modular_boost"></a><a class=
"link" href=
"index.html#boostdep.introduction.modular_boost" title=
"Modular Boost">Modular Boost
</a>
86 </h3></div></div></div>
88 <span class=
"emphasis"><em>Boostdep
</em></span> requires the so-called
"modular Boost"
92 If you already have a
<a href=
"https://svn.boost.org/trac/boost/wiki/ModularBoost" target=
"_top">modular
93 Boost installation
</a>, you can skip this section. Otherwise, read on.
96 Boost libraries reside in subdirectories under the
<code class=
"literal">libs
</code>
97 directory. For example, the contents of the Boost.Filesystem library are
98 in
<code class=
"literal">libs/filesystem
</code>. This includes the build scripts (in
99 <code class=
"literal">libs/filesystem/build
</code>), the source files (in
<code class=
"literal">libs/filesystem/src
</code>),
100 the tests (in
<code class=
"literal">libs/filesystem/test
</code>), the documentation
101 (in
<code class=
"literal">libs/filesystem/doc
</code>), and so on.
104 In the past, when Boost used SVN as its version control system, the header
105 files were an exception. The header files of all libraries resided in the
106 <code class=
"literal">boost
</code> subdirectory, and it wasn't possible to accurately
107 determine which header belonged to which library.
110 When Boost moved to Git for version control, header files were moved to their
111 corresponding libraries, into an
<code class=
"literal">include
</code> subdirectory.
112 The header files of Boost.Filesystem are now in
<code class=
"literal">libs/filesystem/include
</code>.
115 For compatibility,
<code class=
"literal">boost
</code> is now a
"virtual"
116 directory, containing links to the headers. It's maintained automatically
117 by Boost.Build. (The command
<code class=
"literal">b2 headers
</code> creates or recreates
118 the contents of the
<code class=
"literal">boost
</code> directory.)
121 This new structure allows
<span class=
"emphasis"><em>Boostdep
</em></span> to determine that,
122 when faced with an
<code class=
"computeroutput"><span class=
"preprocessor">#include
</span> <span class=
"special"><</span><span class=
"identifier">boost
</span><span class=
"special">/
</span><span class=
"identifier">filesystem
</span><span class=
"special">.
</span><span class=
"identifier">hpp
</span><span class=
"special">></span></code>
123 directive, that this header is part of Boost.Filesystem, and that therefore,
124 the current library being scanned depends on Boost.Filesystem.
127 Unfortunately, Boost releases do not have this structure. For backward compatibility,
128 they have an old-style
<code class=
"literal">boost
</code> directory containing all
129 header files, whereas the per-library
<code class=
"literal">include
</code> subdirectories
130 are missing. Therefore,
<span class=
"emphasis"><em>Boostdep
</em></span> will not work with
131 a downloaded Boost release.
134 To use
<span class=
"emphasis"><em>Boostdep
</em></span>, you will have to clone the Boost Git
135 repository instead. To do that, execute the following command:
137 <pre class=
"programlisting">git clone https://github.com/boostorg/boost.git boost
140 This will download the Boost
"superproject" (the master project,
141 without any libraries) and place it into the subdirectory
<code class=
"literal">boost
</code>
142 of the current directory. To override the directory name, pass it as a second
143 argument instead of
<code class=
"literal">boost
</code>:
145 <pre class=
"programlisting">git clone https://github.com/boostorg/boost.git
<span class=
"emphasis"><em>mydir
</em></span>
148 You can now
<code class=
"literal">cd
</code> into the newly created directory with
150 <pre class=
"programlisting">cd
<span class=
"emphasis"><em>mydir
</em></span>
153 This directory is called the
"Boost root". All of the commands
154 below assume that it is the current directory.
157 The above
<code class=
"literal">git clone
</code> commands download the default branch
158 of the Boost Git repository, which is
<code class=
"literal">master
</code>. This is
159 the current more-or-less stable version of Boost.
162 To verify this, issue the command
164 <pre class=
"programlisting">git status
167 from the Boost root. This will output
169 <pre class=
"programlisting"># On branch master
170 nothing to commit, working directory clean
173 To download a specific release instead, such as
1.58.0, issue the following
174 command after
<code class=
"literal">git clone
</code>, from the Boost root:
176 <pre class=
"programlisting">git checkout boost-
1.58.0
179 <code class=
"literal">git status
</code> will now say
181 <pre class=
"programlisting"># HEAD detached at boost-
1.58.0
182 nothing to commit, working directory clean
185 Then, download all the libraries:
187 <pre class=
"programlisting">git submodule update --init
190 This step will take a while.
193 If all goes well, you will now have the complete contents of Boost's latest
194 <code class=
"literal">master
</code> branch (if you didn't
<code class=
"literal">checkout
</code>
195 a specific release by name) or the corresponding Boost release (if you did).
198 You can switch between the
<code class=
"literal">master
</code> branch, the
<code class=
"literal">develop
</code>
199 (unstable) branch, and a release, by issuing the following commands:
201 <div class=
"blockquote"><blockquote class=
"blockquote"><p>
202 For the
<code class=
"literal">master
</code> branch:
203 </p></blockquote></div>
204 <pre class=
"programlisting">git checkout master
206 git submodule update --init
208 <div class=
"blockquote"><blockquote class=
"blockquote"><p>
209 (
<code class=
"literal">git pull
</code> updates your local copy of the
<code class=
"literal">master
</code>
210 branch from the server, in case it has changed since your initial checkout.)
211 </p></blockquote></div>
212 <div class=
"blockquote"><blockquote class=
"blockquote"><p>
213 For the
<code class=
"literal">develop
</code> branch:
214 </p></blockquote></div>
215 <pre class=
"programlisting">git checkout develop
217 git submodule update --init
219 <div class=
"blockquote"><blockquote class=
"blockquote"><p>
220 For the
<code class=
"literal">boost-
1.58.0</code> release:
221 </p></blockquote></div>
222 <pre class=
"programlisting">git checkout boost-
1.58.0
223 git submodule update --init
225 <div class=
"blockquote"><blockquote class=
"blockquote"><p>
226 For the
<code class=
"literal">boost-
1.57.0</code> release:
227 </p></blockquote></div>
228 <pre class=
"programlisting">git checkout boost-
1.57.0
229 git submodule update --init
232 Note that, while the initial
<code class=
"literal">git submodule update
</code> is quite
233 slow, as it needs to download all the libraries, the subsequent invocations
237 Also note that if a new Boost library (
<code class=
"literal">libs/convert
</code>, for
238 example) is present in, say,
<code class=
"literal">master
</code>, and you have it checked
239 out, when you later switch to
<code class=
"literal">boost-
1.58.0</code>, where this
240 library doesn't exist, Git will not delete
<code class=
"literal">libs/convert
</code>.
241 In this case,
<code class=
"literal">git status
</code> will output
243 <pre class=
"programlisting"># HEAD detached at boost-
1.58.0
245 # (use
"git add <file>..." to include in what will be committed)
248 nothing added to commit but untracked files present (use
"git add" to track)
251 and you will have to remove
<code class=
"literal">libs/convert
</code> by hand.
254 Once you have the Boost contents which you want to analyze for dependencies,
255 proceed with the next step, building
<span class=
"emphasis"><em>Boostdep
</em></span>.
258 <div class=
"section">
259 <div class=
"titlepage"><div><div><h3 class=
"title">
260 <a name=
"boostdep.introduction.building_boostdep"></a><a class=
"link" href=
"index.html#boostdep.introduction.building_boostdep" title=
"Building Boostdep">Building Boostdep
</a>
261 </h3></div></div></div>
263 To build
<span class=
"emphasis"><em>Boostdep
</em></span>, issue the following command from
266 <pre class=
"programlisting">b2 tools/boostdep/build//install
269 This will build
<span class=
"emphasis"><em>Boostdep
</em></span> from source using the default
270 "toolset" (a Boost.Build term meaning
"compiler") and
271 if successful, place it into the
<code class=
"literal">dist/bin
</code> subdirectory.
272 The command assumes that
<code class=
"literal">b2
</code> (the Boost.Build executable)
273 is somewhere in your path. If you don't have
<code class=
"literal">b2
</code>, execute
275 <pre class=
"programlisting">.\bootstrap
280 <pre class=
"programlisting">./bootstrap.sh
283 under Unix-like systems, which should build
<code class=
"literal">b2
</code> and place
284 it into the current directory. You can then use
<code class=
"literal">./b2
</code> instead
285 of
<code class=
"literal">b2
</code>.
288 <div class=
"section">
289 <div class=
"titlepage"><div><div><h3 class=
"title">
290 <a name=
"boostdep.introduction.running_boostdep"></a><a class=
"link" href=
"index.html#boostdep.introduction.running_boostdep" title=
"Running Boostdep">Running Boostdep
</a>
291 </h3></div></div></div>
293 Once you have built
<span class=
"emphasis"><em>Boostdep
</em></span>, execute it with the following
296 <pre class=
"programlisting">dist/bin/boostdep
301 <pre class=
"programlisting">dist\bin\boostdep
304 on Windows. The commands below are given as using
<code class=
"literal">dist/bin/boostdep
</code>;
305 if you're using Windows, use
<code class=
"literal">dist\bin\boostdep
</code> instead.
308 This will print out the following help message:
310 <pre class=
"programlisting">Usage:
312 boostdep --list-modules
313 boostdep --list-buildable
314 boostdep [--track-sources] --list-dependencies
316 boostdep [options] --module-overview
317 boostdep [options] --module-levels
318 boostdep [options] --module-weights
320 boostdep [options] [--primary]
<module
>
321 boostdep [options] --secondary
<module
>
322 boostdep [options] --reverse
<module
>
323 boostdep [options] --subset
<module
>
324 boostdep [options] [--header]
<header
>
326 [options]: [--track-sources] [--title
<title
>] [--footer
<footer
>] [--html]
329 (The
1.58.0 version of
<span class=
"emphasis"><em>Boostdep
</em></span> has an unfortunate bug
330 that causes the above output to be truncated after
<code class=
"literal">boostdep --list-modules
</code>.
331 The rest of the functionality is intact though, so you can still use it as
336 <div class=
"section">
337 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
338 <a name=
"boostdep.usage"></a><a class=
"link" href=
"index.html#boostdep.usage" title=
"Usage">Usage
</a>
339 </h2></div></div></div>
340 <div class=
"toc"><dl class=
"toc">
341 <dt><span class=
"section"><a href=
"index.html#boostdep.usage.simple_queries">Simple Queries
</a></span></dt>
342 <dt><span class=
"section"><a href=
"index.html#boostdep.usage.html_reports">HTML reports
</a></span></dt>
344 <div class=
"section">
345 <div class=
"titlepage"><div><div><h3 class=
"title">
346 <a name=
"boostdep.usage.simple_queries"></a><a class=
"link" href=
"index.html#boostdep.usage.simple_queries" title=
"Simple Queries">Simple Queries
</a>
347 </h3></div></div></div>
349 To list the dependencies of a specific library, use the command
351 <pre class=
"programlisting">dist/bin/boostdep
<span class=
"emphasis"><em>library
</em></span>
354 For Boost.Filesystem, for example, type
356 <pre class=
"programlisting">dist/bin/boostdep filesystem
359 This will print out something similar to the following:
361 <pre class=
"programlisting">Primary dependencies for filesystem:
364 <boost/assert.hpp
>
365 from
<boost/filesystem/operations.hpp
>
366 from
<boost/filesystem/path_traits.hpp
>
369 <boost/config.hpp
>
370 from
<boost/filesystem/config.hpp
>
371 from
<boost/filesystem/convenience.hpp
>
372 from
<boost/filesystem/fstream.hpp
>
373 from
<boost/filesystem/operations.hpp
>
374 from
<boost/filesystem/path.hpp
>
375 from
<boost/filesystem/path_traits.hpp
>
376 <span class=
"emphasis"><em>...
</em></span>
379 <boost/functional/hash_fwd.hpp
>
380 from
<boost/filesystem/path.hpp
>
383 <boost/io/detail/quoted_manip.hpp
>
384 from
<boost/filesystem/path.hpp
>
387 <boost/iterator/iterator_facade.hpp
>
388 from
<boost/filesystem/path.hpp
>
389 <span class=
"emphasis"><em>...
</em></span>
392 This lists the immediate dependencies of Boost.Filesystem.
<code class=
"literal">assert:
</code>
393 is the library,
<code class=
"literal"><boost/assert.hpp
></code> is the file that
394 is being included, and
<code class=
"literal">from
<boost/filesystem/config.hpp
></code>
395 shows where
<code class=
"literal"><boost/assert.hpp
></code> is being included.
398 <span class=
"emphasis"><em>Boostdep
</em></span> names libraries (or modules) after their directory
399 name. The
<code class=
"literal">libs/filesystem
</code> directory, for example, is the
400 <code class=
"literal">filesystem
</code> module. The
<code class=
"literal">libs/numeric/conversion
</code>
401 directory is the
<code class=
"literal">numeric~conversion
</code> module, according
402 to the
<span class=
"emphasis"><em>Boostdep
</em></span> naming convention.
405 The reason forward slashes are replaced with tildes is that
<code class=
"literal">numeric~conversion
</code>
406 is a valid file name, which makes generating HTML reports a bit easier.
409 To see where a given header resides and who includes it, type
411 <pre class=
"programlisting">dist/bin/boostdep
<span class=
"emphasis"><em>header
</em></span>
414 For
<code class=
"literal">boost/filesystem.hpp
</code>, for example, type
416 <pre class=
"programlisting">dist/bin/boostdep boost/filesystem.hpp
419 This will print something along the lines of
421 <pre class=
"programlisting">Inclusion report for
<boost/filesystem.hpp
> (in module filesystem):
424 <boost/spirit/home/x3/support/utility/testing.hpp
>
427 What this tells you is that
<code class=
"literal">boost/filesystem.hpp
</code> is part
428 of Boost.Filesystem and is only included once, from
<code class=
"literal"><boost/spirit/home/x3/support/utility/testing.hpp
></code>.
429 Other headers, such as
<code class=
"literal">boost/shared_ptr.hpp
</code>, are more
430 widely used, as you can see if you try
432 <pre class=
"programlisting">dist/bin/boostdep boost/shared_ptr.hpp
435 To print the reverse dependencies of a library, use
437 <pre class=
"programlisting">dist/bin/boostdep --reverse
<span class=
"emphasis"><em>library
</em></span>
442 <pre class=
"programlisting">dist/bin/boostdep --reverse filesystem
445 will list which libraries depend on Boost.Filesystem:
447 <pre class=
"programlisting">Reverse dependencies for filesystem:
450 <boost/filesystem/operations.hpp
>
451 from
<boost/graph/distributed/adjlist/serialization.hpp
>
452 <boost/filesystem/path.hpp
>
453 from
<boost/graph/distributed/adjlist/serialization.hpp
>
456 <boost/filesystem/config.hpp
>
457 from
<boost/log/detail/config.hpp
>
458 <boost/filesystem/path.hpp
>
459 from
<boost/log/sinks/event_log_backend.hpp
>
460 from
<boost/log/sinks/text_file_backend.hpp
>
461 from
<boost/log/sinks/text_multifile_backend.hpp
>
464 <boost/filesystem.hpp
>
465 from
<boost/spirit/home/x3/support/utility/testing.hpp
>
466 <boost/filesystem/fstream.hpp
>
467 from
<boost/spirit/home/x3/support/utility/testing.hpp
>
468 <boost/filesystem/path.hpp
>
469 from
<boost/spirit/home/x3/support/utility/error_reporting.hpp
>
472 <boost/filesystem/operations.hpp
>
473 from
<boost/wave/util/cpp_include_paths.hpp
>
474 from
<boost/wave/util/cpp_iterator.hpp
>
475 from
<boost/wave/util/filesystem_compatibility.hpp
>
476 <boost/filesystem/path.hpp
>
477 from
<boost/wave/cpp_context.hpp
>
478 from
<boost/wave/util/cpp_include_paths.hpp
>
479 from
<boost/wave/util/cpp_iterator.hpp
>
480 from
<boost/wave/util/cpp_macromap.hpp
>
481 from
<boost/wave/util/filesystem_compatibility.hpp
>
484 <div class=
"section">
485 <div class=
"titlepage"><div><div><h3 class=
"title">
486 <a name=
"boostdep.usage.html_reports"></a><a class=
"link" href=
"index.html#boostdep.usage.html_reports" title=
"HTML reports">HTML reports
</a>
487 </h3></div></div></div>
489 The primary purpose of
<span class=
"emphasis"><em>Boostdep
</em></span> is to generate HTML
490 dependency reports. In the typical case, two types of reports are generated:
491 overviews that contain information for all modules, and per-module ones that
492 list information for a specific library.
495 <span class=
"emphasis"><em>Boostdep
</em></span> can generate three types of the first kind
496 of report: module overview, module levels and module weights. To generate
497 a module overview, use the command
499 <pre class=
"programlisting">dist/bin/boostdep --html --module-overview
> module-overview.html
502 For a module level report, use
504 <pre class=
"programlisting">dist/bin/boostdep --html --module-levels
> module-levels.html
507 For a module weight report, use
509 <pre class=
"programlisting">dist/bin/boostdep --html --module-weights
> module-weights.html
512 In these reports, module names such as
<span class=
"emphasis"><em>module
</em></span> are HTML
513 links to
<code class=
"literal"><span class=
"emphasis"><em>module
</em></span>.html
</code>.
516 To make these links work as expected, you can generate HTML reports for each
519 <pre class=
"programlisting">dist/bin/boostdep --title
"Dependency Report for <span class="emphasis
"><em>module</em></span>" --html --primary
<span class=
"emphasis"><em>module
</em></span> --secondary
<span class=
"emphasis"><em>module
</em></span> --reverse
<span class=
"emphasis"><em>module
</em></span> > <span class=
"emphasis"><em>module
</em></span>.html
522 This step can be automated if you generate a module list first with
524 <pre class=
"programlisting">dist/bin/boostdep --list-modules
> list-modules.txt
527 that will contain one module name per line, and then use a script to issue
528 the previous command for each module name.
531 For more information about the
<span class=
"emphasis"><em>Boostdep
</em></span> options and
532 commands, see the
<a class=
"link" href=
"index.html#boostdep.reference" title=
"Reference">Reference
</a> section.
535 For an example of a report generation script, see the file
<code class=
"literal">tools/boostdep/examples/report.bat
</code>.
536 This is a Windows batch file, but translating it to a Unix-style shell script
537 should be straightforward.
540 For convenience, the contents of
<code class=
"literal">tools/boostdep/examples/report.bat
</code>
543 <pre class=
"programlisting">SET BOOSTDEP=dist\bin\boostdep.exe
545 FOR /f %%i IN ('git rev-parse HEAD') DO @SET REV=%%i
547 FOR /f %%i IN ('git rev-parse --short HEAD') DO @SET SHREV=%%i
549 FOR /f %%i IN ('git rev-parse --abbrev-ref HEAD') DO @SET BRANCH=%%i
551 SET FOOTER=Generated on %DATE% %TIME% from revision %REV% on branch '%BRANCH%'
553 SET OUTDIR=..\report-%BRANCH%-%SHREV%
557 %BOOSTDEP% --list-modules
> %OUTDIR%\list-modules.txt
559 %BOOSTDEP% --footer
"%FOOTER%" --html --module-overview
> %OUTDIR%\module-overview.html
560 %BOOSTDEP% --footer
"%FOOTER%" --html --module-levels
> %OUTDIR%\module-levels.html
561 %BOOSTDEP% --footer
"%FOOTER%" --html --module-weights
> %OUTDIR%\module-weights.html
563 FOR /f %%i IN (%OUTDIR%\list-modules.txt) DO %BOOSTDEP% --title
"Dependency Report for %%i" --footer
"%FOOTER%" --html --primary %%i --secondary %%i --reverse %%i
> %OUTDIR%%%i.html
567 <div class=
"section">
568 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
569 <a name=
"boostdep.reference"></a><a class=
"link" href=
"index.html#boostdep.reference" title=
"Reference">Reference
</a>
570 </h2></div></div></div>
571 <div class=
"toc"><dl class=
"toc">
572 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.list_modules">--list-modules
</a></span></dt>
573 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.list_buildable">--list-buildable
</a></span></dt>
574 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.list_dependencies">--list-dependencies
</a></span></dt>
575 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.module_overview">--module-overview
</a></span></dt>
576 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.module_levels">--module-levels
</a></span></dt>
577 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.module_weights">--module-weights
</a></span></dt>
578 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.primary">--primary
</a></span></dt>
579 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.secondary">--secondary
</a></span></dt>
580 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.reverse">--reverse
</a></span></dt>
581 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.subset">--subset
</a></span></dt>
582 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.header">--header
</a></span></dt>
583 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.track_sources">--track-sources
</a></span></dt>
584 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.title">--title
</a></span></dt>
585 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.footer">--footer
</a></span></dt>
586 <dt><span class=
"section"><a href=
"index.html#boostdep.reference.html">--html
</a></span></dt>
588 <div class=
"section">
589 <div class=
"titlepage"><div><div><h3 class=
"title">
590 <a name=
"boostdep.reference.list_modules"></a><a class=
"link" href=
"index.html#boostdep.reference.list_modules" title=
"--list-modules">--list-modules
</a>
591 </h3></div></div></div>
593 <code class=
"literal">boostdep --list-modules
</code> prints the module list.
<span class=
"emphasis"><em>Boostdep
</em></span>
594 considers a subdirectory of
<code class=
"literal">libs
</code> a module if it contains
595 an
<code class=
"literal">include
</code> subdirectory.
598 This command is typically used from scripts which then use the list to execute
599 a command for each module.
602 <div class=
"section">
603 <div class=
"titlepage"><div><div><h3 class=
"title">
604 <a name=
"boostdep.reference.list_buildable"></a><a class=
"link" href=
"index.html#boostdep.reference.list_buildable" title=
"--list-buildable">--list-buildable
</a>
605 </h3></div></div></div>
607 <code class=
"literal">boostdep --list-buildable
</code> prints a list of the modules
608 that require building.
<span class=
"emphasis"><em>Boostdep
</em></span> considers a module to
609 require building if it contains subdirectories named
<code class=
"literal">build
</code>
610 and
<code class=
"literal">src
</code>.
613 This command is typically used from scripts.
616 <div class=
"section">
617 <div class=
"titlepage"><div><div><h3 class=
"title">
618 <a name=
"boostdep.reference.list_dependencies"></a><a class=
"link" href=
"index.html#boostdep.reference.list_dependencies" title=
"--list-dependencies">--list-dependencies
</a>
619 </h3></div></div></div>
621 <code class=
"literal">boostdep --list-dependencies
</code> prints a module list in which
622 each line is of the form
624 <pre class=
"programlisting">module -
> dependency1 dependency2
<span class=
"emphasis"><em>...
</em></span>
627 By default, only the
<code class=
"literal">include
</code> directory is scanned for
628 <code class=
"computeroutput"><span class=
"preprocessor">#include
</span></code> directives. If
629 the option
<code class=
"literal">--track-sources
</code> is given, the
<code class=
"literal">src
</code>
630 directory is also scanned.
633 This command is typically used from scripts. The output is virtually identical
634 to
<code class=
"literal">--module-overview
</code> in plain text, but slightly more
638 <div class=
"section">
639 <div class=
"titlepage"><div><div><h3 class=
"title">
640 <a name=
"boostdep.reference.module_overview"></a><a class=
"link" href=
"index.html#boostdep.reference.module_overview" title=
"--module-overview">--module-overview
</a>
641 </h3></div></div></div>
643 <code class=
"literal">boostdep --module-overview
</code> generates a module overview,
644 in plain text or HTML. The plain text output is of the form
646 <pre class=
"programlisting">Module Overview:
648 accumulators -
> array assert circular_buffer concept_check config core fusion iterator mpl numeric~conversion numeric~ublas parameter preprocessor range static_assert throw_exception tuple type_traits typeof
649 algorithm -
> array assert bind concept_check config core exception function iterator mpl range regex static_assert tuple type_traits unordered
650 align -
> assert config core static_assert throw_exception
653 whereas the HTML output is similar to
655 <div class=
"blockquote"><blockquote class=
"blockquote">
657 <span class=
"bold"><strong>Module Overview
</strong></span>
660 <span class=
"bold"><strong><span class=
"emphasis"><em>accumulators
</em></span></strong></span>
663 ⇢ array assert circular_buffer concept_check config core fusion
664 iterator mpl numeric~conversion numeric~ublas parameter preprocessor range
665 static_assert throw_exception tuple type_traits typeof
669 where
<span class=
"emphasis"><em>accumulators
</em></span> is a link to
<code class=
"literal">accumulators.html
</code>.
672 As before, if
<code class=
"literal">--track-sources
</code> is given, the
<code class=
"literal">src
</code>
673 subdirectory is scanned for
<code class=
"computeroutput"><span class=
"preprocessor">#include
</span></code>
677 HTML output is enabled by the
<code class=
"literal">--html
</code> option. The
<code class=
"literal">--title
</code>
678 and
<code class=
"literal">--footer
</code> options set the HTML
<code class=
"literal"><title
></code>
679 and the page footer and need to precede
<code class=
"literal">--html
</code>, like in
680 the following example:
682 <pre class=
"programlisting">dist/bin/boostdep --title
"Module Overview" --footer
"Generated on 21.05.2015 20:53:11" --html --module-overview
> module-overview.html
685 <div class=
"section">
686 <div class=
"titlepage"><div><div><h3 class=
"title">
687 <a name=
"boostdep.reference.module_levels"></a><a class=
"link" href=
"index.html#boostdep.reference.module_levels" title=
"--module-levels">--module-levels
</a>
688 </h3></div></div></div>
690 <code class=
"literal">boostdep --module-levels
</code> generates a report that groups
691 modules by level. Levels are determined in such a way so that a module of
692 level
<code class=
"literal">N
</code> never depends on modules of levels greater than
693 <code class=
"literal">N
</code>, and in the absence of cyclic dependencies, doesn't
694 depend on other modules of level
<code class=
"literal">N
</code>. It takes the same
695 options as
<code class=
"literal">--module-overview
</code>.
697 <pre class=
"programlisting">dist/bin/boostdep --title
"Module Levels" --footer
"Generated on 21.05.2015 20:53:11" --html --module-levels
> module-levels.html
700 <div class=
"section">
701 <div class=
"titlepage"><div><div><h3 class=
"title">
702 <a name=
"boostdep.reference.module_weights"></a><a class=
"link" href=
"index.html#boostdep.reference.module_weights" title=
"--module-weights">--module-weights
</a>
703 </h3></div></div></div>
705 <code class=
"literal">boostdep --module-weights
</code> generates a report that lists
706 modules by weight. A module weight is the total number of its dependencies.
707 This includes the indirect dependencies.
710 <code class=
"literal">--module-weights
</code> takes the same options as
<code class=
"literal">--module-overview
</code>.
712 <pre class=
"programlisting">dist/bin/boostdep --title
"Module Weights" --footer
"Generated on 21.05.2015 20:53:11" --html --module-weights
> module-weights.html
715 <div class=
"section">
716 <div class=
"titlepage"><div><div><h3 class=
"title">
717 <a name=
"boostdep.reference.primary"></a><a class=
"link" href=
"index.html#boostdep.reference.primary" title=
"--primary">--primary
</a>
718 </h3></div></div></div>
720 <code class=
"literal">boostdep --primary
<span class=
"emphasis"><em>module
</em></span></code> lists the
721 primary (direct) dependencies of
<span class=
"emphasis"><em>module
</em></span>. It takes the
722 same options as
<code class=
"literal">--module-overview
</code>.
724 <pre class=
"programlisting">dist/bin/boostdep --title
"Primary Dependencies of filesystem" --footer
"Generated on 21.05.2015 20:53:11" --html --primary filesystem
> filesystem-primary.html
727 <div class=
"section">
728 <div class=
"titlepage"><div><div><h3 class=
"title">
729 <a name=
"boostdep.reference.secondary"></a><a class=
"link" href=
"index.html#boostdep.reference.secondary" title=
"--secondary">--secondary
</a>
730 </h3></div></div></div>
732 <code class=
"literal">boostdep --secondary
<span class=
"emphasis"><em>module
</em></span></code> lists
733 the secondary (indirect) dependencies of
<span class=
"emphasis"><em>module
</em></span>. It
734 takes the same options as
<code class=
"literal">--module-overview
</code>.
736 <pre class=
"programlisting">dist/bin/boostdep --title
"Secondary Dependencies of filesystem" --footer
"Generated on 21.05.2015 20:53:11" --html --secondary filesystem
> filesystem-secondary.html
739 You can combine
<code class=
"literal">--primary
</code> and
<code class=
"literal">--secondary
</code>
742 <pre class=
"programlisting">dist/bin/boostdep --title
"Dependencies of filesystem" --footer
"Generated on 21.05.2015 20:53:11" --html --primary filesystem --secondary filesystem
> filesystem.html
745 <div class=
"section">
746 <div class=
"titlepage"><div><div><h3 class=
"title">
747 <a name=
"boostdep.reference.reverse"></a><a class=
"link" href=
"index.html#boostdep.reference.reverse" title=
"--reverse">--reverse
</a>
748 </h3></div></div></div>
750 <code class=
"literal">boostdep --reverse
<span class=
"emphasis"><em>module
</em></span></code> lists the
751 reverse dependencies of
<span class=
"emphasis"><em>module
</em></span>, that is, it lists which
752 modules depend on
<span class=
"emphasis"><em>module
</em></span>. It takes the same options
753 as
<code class=
"literal">--module-overview
</code>.
755 <pre class=
"programlisting">dist/bin/boostdep --title
"Reverse Dependencies of filesystem" --footer
"Generated on 21.05.2015 20:53:11" --html --reverse filesystem
> filesystem-reverse.html
758 You can combine
<code class=
"literal">--reverse
</code> with
<code class=
"literal">--primary
</code>
759 and
<code class=
"literal">--secondary
</code> for a complete module report.
761 <pre class=
"programlisting">dist/bin/boostdep --title
"Dependency Report for filesystem" --footer
"Generated on 21.05.2015 20:53:11" --html --primary filesystem --secondary filesystem --reverse filesystem
> filesystem.html
764 <div class=
"section">
765 <div class=
"titlepage"><div><div><h3 class=
"title">
766 <a name=
"boostdep.reference.subset"></a><a class=
"link" href=
"index.html#boostdep.reference.subset" title=
"--subset">--subset
</a>
767 </h3></div></div></div>
769 <code class=
"literal">boostdep --subset
<span class=
"emphasis"><em>module
</em></span></code> lists the
770 subset dependencies of
<span class=
"emphasis"><em>module
</em></span>, that is, it lists which
771 modules comprise the subset which
<span class=
"emphasis"><em>module
</em></span> requires in
772 order to be usable. The dependencies are determined by tracing the
<code class=
"literal">#include
</code>
773 directives starting from
<span class=
"emphasis"><em>module
</em></span>'s headers.
776 The difference between using the modules reported by
<code class=
"literal">--subset
</code>
777 and those reported by the sum of
<code class=
"literal">--primary
</code> and
<code class=
"literal">--secondary
</code>
778 is that the former only guarantees that
<span class=
"emphasis"><em>module
</em></span> will
779 be usable, whereas the latter guarantees it for every module in the subset.
782 <code class=
"literal">--subset
</code> takes the same options as
<code class=
"literal">--module-overview
</code>.
784 <pre class=
"programlisting">dist/bin/boostdep --title
"Subset Dependencies of filesystem" --footer
"Generated on 21.05.2015 20:53:11" --html --subset filesystem
> filesystem-subset.html
787 You can combine
<code class=
"literal">--subset
</code> with the other module report
791 <div class=
"section">
792 <div class=
"titlepage"><div><div><h3 class=
"title">
793 <a name=
"boostdep.reference.header"></a><a class=
"link" href=
"index.html#boostdep.reference.header" title=
"--header">--header
</a>
794 </h3></div></div></div>
796 <code class=
"literal">boostdep --header
<span class=
"emphasis"><em>header
</em></span></code> creates
797 an inclusion report for
<span class=
"emphasis"><em>header
</em></span>. It takes the same options
798 as
<code class=
"literal">--module-overview
</code>.
800 <pre class=
"programlisting">dist/bin/boostdep --title
"Inclusion Report for <boost/shared_ptr.hpp>" --footer
"Generated on 21.05.2015 20:53:11" --html --header boost/shared_ptr.hpp
> header-boost-shared_ptr.html
803 <div class=
"section">
804 <div class=
"titlepage"><div><div><h3 class=
"title">
805 <a name=
"boostdep.reference.track_sources"></a><a class=
"link" href=
"index.html#boostdep.reference.track_sources" title=
"--track-sources">--track-sources
</a>
806 </h3></div></div></div>
808 The
<code class=
"literal">--track-sources
</code> option instructs
<span class=
"emphasis"><em>Boostdep
</em></span>
809 to scan the
<code class=
"literal">src
</code> library subdirectory for
<code class=
"computeroutput"><span class=
"preprocessor">#include
</span></code> directives. By default, only
810 the
<code class=
"literal">include
</code> subdirectory is scanned.
813 <div class=
"section">
814 <div class=
"titlepage"><div><div><h3 class=
"title">
815 <a name=
"boostdep.reference.title"></a><a class=
"link" href=
"index.html#boostdep.reference.title" title=
"--title">--title
</a>
816 </h3></div></div></div>
818 <code class=
"literal">--title
<span class=
"emphasis"><em>title
</em></span></code> sets the contents of
819 the HTML
<code class=
"literal"><title
></code> tag. It must precede
<code class=
"literal">--html
</code>
823 <div class=
"section">
824 <div class=
"titlepage"><div><div><h3 class=
"title">
825 <a name=
"boostdep.reference.footer"></a><a class=
"link" href=
"index.html#boostdep.reference.footer" title=
"--footer">--footer
</a>
826 </h3></div></div></div>
828 <code class=
"literal">--footer
<span class=
"emphasis"><em>footer
</em></span></code> sets the page footer
829 text. It has no effect if
<code class=
"literal">--html
</code> is not given.
832 <div class=
"section">
833 <div class=
"titlepage"><div><div><h3 class=
"title">
834 <a name=
"boostdep.reference.html"></a><a class=
"link" href=
"index.html#boostdep.reference.html" title=
"--html">--html
</a>
835 </h3></div></div></div>
837 <code class=
"literal">--html
</code> switches to HTML output mode (the default is plain
838 text). It must precede the commands that generate output.
843 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
844 <td align=
"left"><p><small>Last revised: March
04,
2016 at
11:
24:
14 GMT
</small></p></td>
845 <td align=
"right"><div class=
"copyright-footer"></div></td>
848 <div class=
"spirit-nav"></div>