aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/adhoc-rule-buildscript.cxx8
-rw-r--r--libbuild2/cc/link-rule.cxx3
2 files changed, 7 insertions, 4 deletions
diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx
index d91be65..77c0823 100644
--- a/libbuild2/adhoc-rule-buildscript.cxx
+++ b/libbuild2/adhoc-rule-buildscript.cxx
@@ -432,7 +432,8 @@ namespace build2
// If we managed to unmatch, blank it out so that it's not executed,
// etc. Otherwise, convert it to ad hoc (we also automatically avoid
- // hashing it and updating it during match in exec_depdb_dyndep()).
+ // hashing it, updating it during match in exec_depdb_dyndep(), and
+ // making us out of date in execute_update_prerequisites()).
//
// The hashing part is tricky: by not hashing it we won't detect the
// case where it was removed as a prerequisite altogether. The
@@ -1404,9 +1405,10 @@ namespace build2
target_state s (pt->executed_state (a));
rs |= s;
- // Compare our timestamp to this prerequisite's.
+ // Compare our timestamp to this prerequisite's skipping
+ // update=unmatch.
//
- if (!e)
+ if (!e && (p.include & 4) == 0)
{
// If this is an mtime-based target, then compare timestamps.
//
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index 2e644cc..c05522d 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -1224,7 +1224,8 @@ namespace build2
// update them. Note that we have to do it before any further matches
// since they may rely on these prerequisites already being updated (for
// example, object file matches may need the headers to be already
- // updated).
+ // updated). We also must do it after matching all our prerequisite
+ // libraries since they may generate headers that we depend upon.
//
// Note that we ignore the result and whether it renders us out of date,
// leaving it to the common execute logic in perform_update().