From 8475c82a2ca186f4ca987e50b4249bb8eb32ba01 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Mar 2022 12:48:07 +0200 Subject: Add support for update=unmatch|match to ad hoc recipes --- libbuild2/build/script/parser.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libbuild2/build') 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 (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 ()) -- cgit v1.1