aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-03-03 12:48:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-03-07 13:58:48 +0200
commit8475c82a2ca186f4ca987e50b4249bb8eb32ba01 (patch)
tree20c782983f70f7e45ab71ce347ffba3d53650e25 /libbuild2/build/script/parser.cxx
parentd28553772a3010fb545eae09967fa54adbe63bdb (diff)
Add support for update=unmatch|match to ad hoc recipes
Diffstat (limited to 'libbuild2/build/script/parser.cxx')
-rw-r--r--libbuild2/build/script/parser.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx
index e9c8d9c..d9bfef6 100644
--- a/libbuild2/build/script/parser.cxx
+++ b/libbuild2/build/script/parser.cxx
@@ -1625,6 +1625,19 @@ namespace build2
p.adhoc () ? reinterpret_cast<target*> (p.data)
: nullptr))
{
+ // Automatically skip update=unmatch that we could not unmatch.
+ //
+ // Note that we don't skip update=match here (unless filtered out)
+ // in order to incorporate the result into our out-of-date'ness.
+ // So there is a nuanced interaction between update=match and
+ // --update-*.
+ //
+ if ((p.include & 4) != 0)
+ {
+ l6 ([&]{trace << "skipping unmatched " << *pt;});
+ continue;
+ }
+
// Apply the --update-* filter.
//
if (!p.adhoc () && !filters.empty ())