From 1c12242aa7cd00e35a9be43b664e5486b2adc846 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Jun 2022 06:42:13 +0200 Subject: Make libul{} rule match without hint In the end, the extra jumping through the hoops doesn't justify the extra safety we gain. The only plausible accidental mistake is making libul{} a dependency of ./ but then we don't prevent the same for libue{}, which also doesn't make much sense. Though, the consequences of doing this for libul{} could be more severe, like messed up for-install'ness. Oh, well, I guess people will just have to pay attention (this could be a good check for the linter we've been thinking about). --- libbuild2/bin/rule.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'libbuild2/bin/rule.cxx') diff --git a/libbuild2/bin/rule.cxx b/libbuild2/bin/rule.cxx index 1d33961..27c9b4b 100644 --- a/libbuild2/bin/rule.cxx +++ b/libbuild2/bin/rule.cxx @@ -35,23 +35,14 @@ namespace build2 // libul_rule // bool libul_rule:: - match (action a, target& t, const string& h, match_extra&) const + match (action, target&) const { - if (!metadata_) - { - fail << diag_doing (a, t) << " target group" << - info << "explicitly select libua{} or libus{} member" << - info << "or use bin.metadata rule hint if this is metadata library"; - } - - return (h == "bin.metadata"); + return true; } recipe libul_rule:: - apply (action a, target& t, match_extra&) const + apply (action a, target& t) const { - assert (metadata_); - // Pick one of the members. First looking for the one already matched. // const target* m (nullptr); -- cgit v1.1