|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73985 - in branches/release/tools/bcp: . doc doc/html
From: john_at_[hidden]
Date: 2011-08-21 14:12:52
Author: johnmaddock
Date: 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
New Revision: 73985
URL: http://svn.boost.org/trac/boost/changeset/73985
Log:
Merge bcp fixes from Trunk.
Fixes #5551.
Properties modified:
branches/release/tools/bcp/ (props changed)
Text files modified:
branches/release/tools/bcp/add_path.cpp | 20 +++++++++++++++-
branches/release/tools/bcp/bcp_imp.cpp | 6 ++--
branches/release/tools/bcp/copy_path.cpp | 22 +++++++++---------
branches/release/tools/bcp/doc/bcp.qbk | 5 ++-
branches/release/tools/bcp/doc/html/index.html | 48 ++++++++++++++++++++-------------------
branches/release/tools/bcp/file_types.cpp | 8 +++---
branches/release/tools/bcp/fileview.cpp | 2
branches/release/tools/bcp/path_operations.cpp | 4 +-
8 files changed, 67 insertions(+), 48 deletions(-)
Modified: branches/release/tools/bcp/add_path.cpp
==============================================================================
--- branches/release/tools/bcp/add_path.cpp (original)
+++ branches/release/tools/bcp/add_path.cpp 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -193,6 +193,14 @@
//
static const std::pair<fs::path, fs::path>
specials[] = {
+ std::pair<fs::path, fs::path>("boost/filesystem/convenience.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/exception.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/fstream.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/operations.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem/path.hpp", "boost/filesystem.hpp"),
+ std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/build"),
+ std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/v2"),
+ std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/v3"),
std::pair<fs::path, fs::path>("boost/config.hpp", "boost/config"),
std::pair<fs::path, fs::path>("tools/build/allyourbase.jam", "Jamrules"),
std::pair<fs::path, fs::path>("tools/build/allyourbase.jam", "project-root.jam"),
@@ -204,6 +212,12 @@
std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "project-root.jam"),
std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "boost-build.jam"),
std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "Jamfile.v2"),
+ std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "boostcpp.jam"),
+ std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "bootstrap.bat"),
+ std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "bootstrap.sh"),
+ std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "Jamroot"),
+ std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "INSTALL"),
+ std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "LICENSE_1_0.txt"),
std::pair<fs::path, fs::path>("boost/preprocessor/iterate.hpp", "boost/preprocessor/iteration"),
std::pair<fs::path, fs::path>("boost/preprocessor/slot/slot.hpp", "boost/preprocessor/slot/detail"),
std::pair<fs::path, fs::path>("boost/function.hpp", "boost/function/detail"),
@@ -484,7 +498,8 @@
//
static const boost::regex lib1("boost/([^\\./]+)(?!detail).*");
boost::smatch swhat;
- if(boost::regex_match(p.string(), swhat, lib1))
+ std::string gs(p.generic_string());
+ if(boost::regex_match(gs, swhat, lib1))
{
add_dependent_lib(swhat.str(1), p, view);
}
@@ -492,7 +507,8 @@
// and this one catches boost/x/y/whatever (for example numeric/ublas):
//
static const boost::regex lib2("boost/([^/]+/[^/]+)/(?!detail).*");
- if(boost::regex_match(p.string(), swhat, lib2))
+ gs = p.generic_string();
+ if(boost::regex_match(gs, swhat, lib2))
{
add_dependent_lib(swhat.str(1), p, view);
}
Modified: branches/release/tools/bcp/bcp_imp.cpp
==============================================================================
--- branches/release/tools/bcp/bcp_imp.cpp (original)
+++ branches/release/tools/bcp/bcp_imp.cpp 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -121,7 +121,7 @@
fs::path get_short_path(const fs::path& p)
{
// truncate path no more than "x/y":
- std::string s = p.string();
+ std::string s = p.generic_string();
std::string::size_type n = s.find('/');
if(n != std::string::npos)
{
@@ -244,7 +244,7 @@
std::cout << "\n\nThe top level namespaces found for header and source files were:\n";
while(i != j)
{
- if(regex_match(i->second.string(), important_file))
+ if(regex_match(i->second.generic_string(), important_file))
std::cout << i->first << " (from " << i->second << ")" << std::endl;
++i;
}
@@ -253,7 +253,7 @@
std::cout << "\n\nThe top level namespaces found for all other source files were:\n";
while(i != j)
{
- if(!regex_match(i->second.string(), important_file))
+ if(!regex_match(i->second.generic_string(), important_file))
std::cout << i->first << " (from " << i->second << ")" << std::endl;
++i;
}
Modified: branches/release/tools/bcp/copy_path.cpp
==============================================================================
--- branches/release/tools/bcp/copy_path.cpp (original)
+++ branches/release/tools/bcp/copy_path.cpp 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -63,7 +63,7 @@
static std::vector<char> v1, v2;
v1.clear();
v2.clear();
- std::ifstream is((m_boost_path / p).string().c_str());
+ std::ifstream is((m_boost_path / p).c_str());
std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));
static boost::regex libname_matcher;
@@ -78,9 +78,9 @@
std::ofstream os;
if(m_unix_lines)
- os.open((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out);
+ os.open((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out);
else
- os.open((m_dest_path / p).string().c_str(), std::ios_base::out);
+ os.open((m_dest_path / p).c_str(), std::ios_base::out);
os.write(&*v1.begin(), v1.size());
os.close();
}
@@ -89,7 +89,7 @@
static std::vector<char> v1, v2;
v1.clear();
v2.clear();
- std::ifstream is((m_boost_path / p).string().c_str());
+ std::ifstream is((m_boost_path / p).c_str());
std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));
static boost::regex libname_matcher;
@@ -111,9 +111,9 @@
std::ofstream os;
if(m_unix_lines)
- os.open((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out);
+ os.open((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out);
else
- os.open((m_dest_path / p).string().c_str(), std::ios_base::out);
+ os.open((m_dest_path / p).c_str(), std::ios_base::out);
os.write(&*v1.begin(), v1.size());
os.close();
}
@@ -127,7 +127,7 @@
static std::vector<char> v1, v2;
v1.clear();
v2.clear();
- std::ifstream is((m_boost_path / p).string().c_str());
+ std::ifstream is((m_boost_path / p).c_str());
std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));
static const boost::regex namespace_matcher(
@@ -202,20 +202,20 @@
std::ofstream os;
if(m_unix_lines)
- os.open((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out);
+ os.open((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out);
else
- os.open((m_dest_path / p).string().c_str(), std::ios_base::out);
+ os.open((m_dest_path / p).c_str(), std::ios_base::out);
if(v1.size())
os.write(&*v1.begin(), v1.size());
os.close();
}
else if(m_unix_lines && !is_binary_file(p))
{
- std::ifstream is((m_boost_path / p).string().c_str());
+ std::ifstream is((m_boost_path / p).c_str());
std::istreambuf_iterator<char> isi(is);
std::istreambuf_iterator<char> end;
- std::ofstream os((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out);
+ std::ofstream os((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out);
std::ostreambuf_iterator<char> osi(os);
std::copy(isi, end, osi);
Modified: branches/release/tools/bcp/doc/bcp.qbk
==============================================================================
--- branches/release/tools/bcp/doc/bcp.qbk (original)
+++ branches/release/tools/bcp/doc/bcp.qbk 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -35,14 +35,15 @@
]
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 example code.
+build files (in libs/regex/build) to /foo. Does not copy the regex documentation, test, or example code.
+Also does not copy the Boost.Build system.
[pre
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.
+by the regex test programs) to /foo. Does not copy the Boost.Build system.
[pre
bcp --namespace=myboost --namespace-alias regex config build /foo
Modified: branches/release/tools/bcp/doc/html/index.html
==============================================================================
--- branches/release/tools/bcp/doc/html/index.html (original)
+++ branches/release/tools/bcp/doc/html/index.html 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>BCP</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="BCP">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -27,7 +27,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright © 2209 John Maddock</p></div>
<div><div class="legalnotice">
-<a name="id759699"></a><p>
+<a name="id917214"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -38,21 +38,21 @@
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="section"> Overview</span></dt>
-<dt><span class="section"> Examples</span></dt>
-<dt><span class="section"> Syntax</span></dt>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Examples</span></dt>
+<dt><span class="section">Syntax</span></dt>
<dd><dl>
-<dt><span class="section"> Behaviour Selection</span></dt>
-<dt><span class="section"> Options</span></dt>
-<dt><span class="section"> module-list</span></dt>
-<dt><span class="section"> output-path</span></dt>
+<dt><span class="section">Behaviour Selection</span></dt>
+<dt><span class="section">Options</span></dt>
+<dt><span class="section">module-list</span></dt>
+<dt><span class="section">output-path</span></dt>
<dt><span class="section">Dependencies</span></dt>
</dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="bcp.overview"></a><a class="link" href="index.html#bcp.overview" title="Overview"> Overview</a>
+<a name="bcp.overview"></a><a class="link" href="index.html#bcp.overview" title="Overview">Overview</a>
</h2></div></div></div>
<p>
The bcp utility is a tool for extracting subsets of Boost, it's useful for
@@ -66,7 +66,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="bcp.examples"></a><a class="link" href="index.html#bcp.examples" title="Examples"> Examples</a>
+<a name="bcp.examples"></a><a class="link" href="index.html#bcp.examples" title="Examples">Examples</a>
</h2></div></div></div>
<pre class="programlisting">bcp scoped_ptr /foo
</pre>
@@ -78,13 +78,15 @@
<p>
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 example code.
+ copy the regex documentation, test, or example code. Also does not copy the
+ Boost.Build system.
</p>
<pre class="programlisting">bcp regex /foo
</pre>
<p>
Copies the full regex lib (in libs/regex) including dependencies (such as the
- boost.test source required by the regex test programs) to /foo.
+ boost.test source required by the regex test programs) to /foo. Does not copy
+ the Boost.Build system.
</p>
<pre class="programlisting">bcp --namespace=myboost --namespace-alias regex config build /foo
</pre>
@@ -111,18 +113,18 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="bcp.syntax"></a><a class="link" href="index.html#bcp.syntax" title="Syntax"> Syntax</a>
+<a name="bcp.syntax"></a><a class="link" href="index.html#bcp.syntax" title="Syntax">Syntax</a>
</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"> Behaviour Selection</span></dt>
-<dt><span class="section"> Options</span></dt>
-<dt><span class="section"> module-list</span></dt>
-<dt><span class="section"> output-path</span></dt>
+<dt><span class="section">Behaviour Selection</span></dt>
+<dt><span class="section">Options</span></dt>
+<dt><span class="section">module-list</span></dt>
+<dt><span class="section">output-path</span></dt>
<dt><span class="section">Dependencies</span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bcp.syntax.main"></a><a class="link" href="index.html#bcp.syntax.main" title="Behaviour Selection"> Behaviour Selection</a>
+<a name="bcp.syntax.main"></a><a class="link" href="index.html#bcp.syntax.main" title="Behaviour Selection">Behaviour Selection</a>
</h3></div></div></div>
<pre class="programlisting">bcp --list [options] module-list
</pre>
@@ -163,7 +165,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bcp.syntax.options"></a><a class="link" href="index.html#bcp.syntax.options" title="Options"> Options</a>
+<a name="bcp.syntax.options"></a><a class="link" href="index.html#bcp.syntax.options" title="Options">Options</a>
</h3></div></div></div>
<pre class="programlisting">--boost=path
</pre>
@@ -211,7 +213,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bcp.syntax.module"></a><a class="link" href="index.html#bcp.syntax.module" title="module-list"> module-list</a>
+<a name="bcp.syntax.module"></a><a class="link" href="index.html#bcp.syntax.module" title="module-list">module-list</a>
</h3></div></div></div>
<p>
When the --scan option is not used then a list of boost files or library
@@ -243,7 +245,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bcp.syntax.output"></a><a class="link" href="index.html#bcp.syntax.output" title="output-path"> output-path</a>
+<a name="bcp.syntax.output"></a><a class="link" href="index.html#bcp.syntax.output" title="output-path">output-path</a>
</h3></div></div></div>
<p>
The path to which files will be copied (this path must exist).
@@ -336,7 +338,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 08, 2010 at 22:44:20 GMT</small></p></td>
+<td align="left"><p><small>Last revised: August 14, 2011 at 16:17:07 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: branches/release/tools/bcp/file_types.cpp
==============================================================================
--- branches/release/tools/bcp/file_types.cpp (original)
+++ branches/release/tools/bcp/file_types.cpp 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -23,7 +23,7 @@
")",
boost::regex::perl | boost::regex::icase
);
- return boost::regex_match(p.filename().string(), e);
+ return boost::regex_match(p.filename().generic_string(), e);
}
bool bcp_implementation::is_html_file(const fs::path& p)
@@ -34,7 +34,7 @@
"html?|css"
")"
);
- return boost::regex_match(p.filename().string(), e);
+ return boost::regex_match(p.filename().generic_string(), e);
}
bool bcp_implementation::is_binary_file(const fs::path& p)
@@ -52,7 +52,7 @@
"|"
"(Jamfile|makefile|configure)",
boost::regex::perl | boost::regex::icase);
- return !boost::regex_match(p.leaf().string(), e);
+ return !boost::regex_match(p.leaf().generic_string(), e);
}
@@ -67,6 +67,6 @@
"(Jamfile|Jamroot)\\.?",
boost::regex::perl | boost::regex::icase
);
- return boost::regex_match(p.filename().string(), e);
+ return boost::regex_match(p.filename().generic_string(), e);
}
Modified: branches/release/tools/bcp/fileview.cpp
==============================================================================
--- branches/release/tools/bcp/fileview.cpp (original)
+++ branches/release/tools/bcp/fileview.cpp 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -57,7 +57,7 @@
void fileview::open(const boost::filesystem::path& p)
{
cow();
- std::ifstream is(p.string().c_str());
+ std::ifstream is(p.c_str());
if(!is)
{
std::string msg("Bad file name: ");
Modified: branches/release/tools/bcp/path_operations.cpp
==============================================================================
--- branches/release/tools/bcp/path_operations.cpp (original)
+++ branches/release/tools/bcp/path_operations.cpp 2011-08-21 14:12:51 EDT (Sun, 21 Aug 2011)
@@ -21,8 +21,8 @@
int compare_paths(const fs::path& a, const fs::path& b)
{
- const std::string& as = a.string();
- const std::string& bs = b.string();
+ const std::string& as = a.generic_string();
+ const std::string& bs = b.generic_string();
std::string::const_iterator i, j, k, l;
i = as.begin();
j = as.end();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk