aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/install/functions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-04-04 14:10:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-04-04 14:10:27 +0200
commit8b9701d2ad76a9a571c445b318557261a4922758 (patch)
tree1de11ba8c7e1d465f4a95005d7115774696a2a87 /libbuild2/install/functions.cxx
parent7b06ee81ab0e8a2199c4dce07ec67282c4f52f62 (diff)
Remove global override restriction from config.install.filter
Diffstat (limited to 'libbuild2/install/functions.cxx')
-rw-r--r--libbuild2/install/functions.cxx16
1 files changed, 2 insertions, 14 deletions
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 <libbuild2/variable.hxx>
#include <libbuild2/install/utility.hxx>
-#include <libbuild2/install/operation.hxx>
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);
};
}
}