From c0105aad0074aee0efb3ba41f8132496412f8790 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Jan 2020 08:11:16 +0200 Subject: Use scope::insert_rule() --- libbuild2/in/init.cxx | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'libbuild2/in') diff --git a/libbuild2/in/init.cxx b/libbuild2/in/init.cxx index 95bdb0a..80508b6 100644 --- a/libbuild2/in/init.cxx +++ b/libbuild2/in/init.cxx @@ -88,19 +88,15 @@ namespace build2 // Register rules. // - { - auto& r (bs.rules); - - // There are rules that are "derived" from this generic in rule in - // order to provide extended preprocessing functionality (see the - // version module for an example). To make sure they are tried first - // we register for path_target, not file, but in rule::match() we only - // match if the target is a file. A bit of a hack. - // - r.insert (perform_update_id, "in", rule_); - r.insert (perform_clean_id, "in", rule_); - r.insert (configure_update_id, "in", rule_); - } + // There are rules that are "derived" from this generic in rule in + // order to provide extended preprocessing functionality (see the + // version module for an example). To make sure they are tried first + // we register for path_target, not file, but in rule::match() we only + // match if the target is a file. A bit of a hack. + // + bs.insert_rule (perform_update_id, "in", rule_); + bs.insert_rule (perform_clean_id, "in", rule_); + bs.insert_rule (configure_update_id, "in", rule_); return true; } -- cgit v1.1