Skip to content

Commit

Permalink
fix target references in jamfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Jan 17, 2025
1 parent 27fb964 commit da3a7b3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions copy_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,32 @@ void bcp_implementation::copy_path(const fs::path& p)
os.write(&*v1.begin(), v1.size());
os.close();
}
else if(is_jam_file(p) && m_namespace_name.size())
{
static std::vector<char> v1, v2;
v1.clear();
v2.clear();
boost::filesystem::ifstream is((m_boost_path / p));
std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));

static boost::regex libname_matcher;
if(libname_matcher.empty())
{
libname_matcher.assign("boost_");
}

regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), libname_matcher, m_namespace_name + "_");
std::swap(v1, v2);
v2.clear();

boost::filesystem::ofstream os;
if(m_unix_lines)
os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out);
else
os.open((m_dest_path / p), std::ios_base::out);
os.write(&*v1.begin(), v1.size());
os.close();
}
else if(m_namespace_name.size() && is_source_file(p))
{
//
Expand Down

0 comments on commit da3a7b3

Please sign in to comment.