From 8b9701d2ad76a9a571c445b318557261a4922758 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 Apr 2023 14:10:27 +0200 Subject: Remove global override restriction from config.install.filter --- libbuild2/install/functions.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'libbuild2/install/functions.cxx') diff --git a/libbuild2/install/functions.cxx b/libbuild2/install/functions.cxx index d62b578..1de4d3e 100644 --- a/libbuild2/install/functions.cxx +++ b/libbuild2/install/functions.cxx @@ -5,7 +5,6 @@ #include #include -#include namespace build2 { @@ -98,8 +97,7 @@ namespace build2 // whether path is syntactially a directory (ends with a directory // separator). // - // Note that this function is not pure and can only be called from a - // install or uninstall operation recipe. + // Note that this function is not pure. // f.insert (".filter", false) += [] (const scope* s, path p, @@ -108,16 +106,6 @@ namespace build2 if (s == nullptr) fail << "install.filter() called out of scope" << endf; - context& ctx (s->ctx); - - if (ctx.phase != run_phase::match && - ctx.phase != run_phase::execute) - fail << "install.filter() can only be called from recipe"; - - if (ctx.current_inner_oif != &op_install && - ctx.current_inner_oif != &op_uninstall) - fail << "install.filter() can only be called during install/uninstall"; - entry_type t; if (ot) { @@ -145,7 +133,7 @@ namespace build2 p.make_leaf (); } - return context_data::filter (*s->root_scope (), d, p, t); + return filter_entry (*s->root_scope (), d, p, t); }; } } -- cgit v1.1