aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/dyndep.cxx4
-rw-r--r--libbuild2/dyndep.hxx14
2 files changed, 11 insertions, 7 deletions
diff --git a/libbuild2/dyndep.cxx b/libbuild2/dyndep.cxx
index 6d1a32c..1b2002a 100644
--- a/libbuild2/dyndep.cxx
+++ b/libbuild2/dyndep.cxx
@@ -115,7 +115,7 @@ namespace build2
recipe_function* const* rf (pt[a].recipe.target<recipe_function*> ());
if (rf == nullptr || *rf != &noop_action)
{
- if (!updated_during_match (a, t, pts_n, pt))
+ if (pts_n == 0 || !updated_during_match (a, t, pts_n, pt))
{
fail << what << ' ' << pt << " has non-noop recipe" <<
info << "consider listing it as static prerequisite of " << t;
@@ -143,7 +143,7 @@ namespace build2
recipe_function* const* rf (pt[a].recipe.target<recipe_function*> ());
if (rf == nullptr || *rf != &noop_action)
{
- if (!updated_during_match (a, t, pts_n, pt))
+ if (pts_n == 0 || !updated_during_match (a, t, pts_n, pt))
{
dr << fail << what << ' ' << pt << " has non-noop recipe";
}
diff --git a/libbuild2/dyndep.hxx b/libbuild2/dyndep.hxx
index 4081d19..bbda030 100644
--- a/libbuild2/dyndep.hxx
+++ b/libbuild2/dyndep.hxx
@@ -57,8 +57,10 @@ namespace build2
bool adhoc = false,
uintptr_t data = 0);
- // As above but verify the file is matched with noop_recipe and issue
- // diagnostics and fail otherwise (regardless of the fail flag).
+ // As above but verify the file is matched with noop_recipe or was updated
+ // during match and issue diagnostics and fail otherwise (regardless of
+ // the fail flag). Pass 0 for pts_n if don't want the "was updated during
+ // match" part.
//
// This version (together with verify_existing_file() below) is primarily
// useful for handling dynamic dependencies that are produced as a
@@ -77,9 +79,11 @@ namespace build2
bool adhoc = false,
uintptr_t data = 0);
- // Verify the file is matched with noop_recipe and issue diagnostics and
- // fail otherwise. If the file is not matched, then fail if the target is
- // not implied (that is, declared in a buildfile).
+ // Verify the file is matched with noop_recipe or was updated during match
+ // and issue diagnostics and fail otherwise. If the file is not matched,
+ // then fail if the target is not implied (that is, declared in a
+ // buildfile). Pass 0 for pts_n if don't want the "was updated during
+ // match" part.
//
// Note: can only be called in the execute phase.
//