From: John Maddock (jm_at_[hidden])
Date: 2003-06-07 06:25:15
I've put together a small tool for managing boost dependencies called bcp
(for boost copy).
The bcp utility is a tool for extracting subsets of Boost, it's useful for
Boost authors who want to distribute their library separately from Boost,
and for Boost users who want to distribute a subset of Boost with their
bcp scoped_ptr /foo
Copies boost/scoped_ptr.hpp and dependencies to /foo.
bcp boost/regex.hpp /foo
Copies boost/regex.hpp and all dependencies
including the regex source code (in libs/regex/src) and build files (in
libs/regex/build) to /foo. Does not copy the regex documentation, test, or
bcp regex /foo
Copies the full regex lib (in libs/regex) including
dependencies (such as the boost.test source required by the regex test
programs) to /foo.
bcp regex config build /foo
Copies the full regex lib (in libs/regex) plus
the config lib (libs/config) and the build system (tools/build) to /foo
including all the dependencies.
bcp --list [options] module-list
Outputs a list of all the files in
module-list including dependencies.
bcp [options] module-list output-path
Copies all the files found in
module-list to output-path
Sets the location of the boost tree to path.
Treats the module list as a list of (probably non-boost) files to scan
for boost dependencies, the files listed in the module list are not copied
(or listed), only the boost files upon which they depend.
Only copy files under cvs version control.
Make sure that all copied files use Unix style line endings.
When the --scan option is not used then a list of boost files or library
names to copy, this can be:
1.. The name of a tool: for example "build" will find "tools/build".
2.. The name of a library: for example "regex".
3.. The title of a header: for example "scoped_ptr" will find
4.. The name of a header: for example "scoped_ptr.hpp" will find
5.. The name of a file: for example "boost/regex.hpp".
When the --scan option is used, then a list of (probably non-boost) files to
scan for boost dependencies, the files in the module list are not therefore
The path to which files will be copied (this path must exist).
File dependencies are found as follows:
C++ source files are scanned for #includes, all #includes present in the
boost source tree will then be scanned for their dependencies and so on.
C++ source files are associated with the name of a library, if that library
has source code (and possibly build data), then include that source in the
C++ source files are checked for dependencies on Boost.test (for example to
see if they use cpp_main as an entry point).
HTML files are scanned for immediate dependencies (images and style sheets,
but not links).
As usual comments etc are most welcome, also should a utility/tool such as
this go through the review process, before eventually living under
The source is available from: www.regex.fsnet.co.uk/bcp.zip
This requires the latest boost cvs source to build, so there is also a file
containing bcp's dependencies (obviously produced using bcp!):
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk