Skip to content

Commit

Permalink
Add dep scanning for modular top lib jamfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Mar 27, 2024
1 parent 6384f90 commit 56f4d37
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
19 changes: 18 additions & 1 deletion add_path.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
*
* Copyright (c) 2003 Dr John Maddock
* Copyright René Ferdinand Rivera Morell 2023
* Use, modification and distribution is subject to 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)
Expand Down Expand Up @@ -107,7 +108,23 @@ void bcp_implementation::add_file(const fs::path& p)
{
add_file_dependencies(p, false);
}
if(is_jam_file(p) && m_namespace_name.size() && ((std::distance(p.begin(), p.end()) < 3) || (*p.begin() != "tools") || (*++p.begin() != "build")))
if(is_jam_file(p) && *p.begin() == "libs" && (std::distance(p.begin(), p.end()) == 3))
{
//
// Modular libs top jamfile has references to all the user level
// dependent libraries to also include.
//
static const boost::regex e(">/boost/([a-zA-Z_]+)");
fileview view(m_boost_path / p);
boost::regex_token_iterator<const char*> i(view.begin(), view.end(), e, 1);
boost::regex_token_iterator<const char*> j;
while(i != j)
{
m_lib_names.insert(*i);
++i;
}
}
else if(is_jam_file(p) && m_namespace_name.size() && ((std::distance(p.begin(), p.end()) < 3) || (*p.begin() != "tools") || (*++p.begin() != "build")))
{
//
// We're doing a rename of namespaces and library names
Expand Down
8 changes: 4 additions & 4 deletions file_types.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
*
* Copyright (c) 2003 Dr John Maddock
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution is subject to 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)
*
* This file implements the following:
Expand All @@ -20,7 +20,7 @@ bool bcp_implementation::is_source_file(const fs::path& p)
".*\\."
"(?:"
"c|cxx|h|hxx|inc|inl|.?pp|yy?"
")",
")",
boost::regex::perl | boost::regex::icase
);
return boost::regex_match(p.filename().generic_string(), e);
Expand Down Expand Up @@ -64,7 +64,7 @@ bool bcp_implementation::is_jam_file(const fs::path& p)
"jam|v2"
")"
"|"
"(Jamfile|Jamroot)\\.?",
"(Jamfile|Jamroot)\\.?",
boost::regex::perl | boost::regex::icase
);
return boost::regex_match(p.filename().generic_string(), e);
Expand Down

0 comments on commit 56f4d37

Please sign in to comment.