aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/algorithm.cxx8
-rw-r--r--libbuild2/algorithm.hxx2
-rw-r--r--libbuild2/target.hxx3
3 files changed, 7 insertions, 6 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx
index ad4c406..3d04173 100644
--- a/libbuild2/algorithm.cxx
+++ b/libbuild2/algorithm.cxx
@@ -2808,7 +2808,7 @@ namespace build2
for (prerequisite_target& p: pts)
{
- if ((p.include & mask) != 0)
+ if (mask == 0 || (p.include & mask) != 0)
{
if (p.target != nullptr)
{
@@ -2855,7 +2855,7 @@ namespace build2
#if 0
for (prerequisite_target& p: pts)
{
- if ((p.include & mask) != 0 && p.data != 0)
+ if ((mask == 0 || (p.include & mask) != 0) && p.data != 0)
{
const target& pt (*p.target);
@@ -2890,7 +2890,7 @@ namespace build2
for (prerequisite_target& p: pts)
{
- if ((p.include & mask) != 0 && p.data != 0)
+ if ((mask == 0 || (p.include & mask) != 0) && p.data != 0)
{
execute_direct_async (a, *p.target, busy, tc);
}
@@ -2902,7 +2902,7 @@ namespace build2
//
for (prerequisite_target& p: pts)
{
- if ((p.include & mask) != 0 && p.data != 0)
+ if ((mask == 0 || (p.include & mask) != 0) && p.data != 0)
{
const target& pt (*p.target);
target_state ns (execute_complete (a, pt));
diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx
index dedfe33..779578e 100644
--- a/libbuild2/algorithm.hxx
+++ b/libbuild2/algorithm.hxx
@@ -658,7 +658,7 @@ namespace build2
// As above, but update all the targets in prerequisite_targets that have
// the specified mask in prerequisite_target::include. Return true if any of
- // them have changed.
+ // them have changed. If mask is 0, then update all the targets.
//
// Note that this function spoils prerequisite_target::data (which is used
// for temporary storage). But it resets data to 0 once done.
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx
index 99383e7..1178371 100644
--- a/libbuild2/target.hxx
+++ b/libbuild2/target.hxx
@@ -589,7 +589,8 @@ namespace build2
prerequisites () const;
// Swap-in a list of prerequisites. Return false if unsuccessful (i.e.,
- // someone beat us to it). Note that it can be called on const target.
+ // someone beat us to it), in which case the passed prerequisites are
+ // not moved. Note that it can be called on const target.
//
bool
prerequisites (prerequisites_type&&) const;