diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-01-28 08:11:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-01-28 08:11:16 +0200 |
commit | c0105aad0074aee0efb3ba41f8132496412f8790 (patch) | |
tree | 30fe24cfe2e63c7cacdd7d45d875ca75f35bede2 /libbuild2/in | |
parent | 36fa3bc49a739a3bb1212a1b37fd2c817d4ee1dc (diff) |
Use scope::insert_rule()
Diffstat (limited to 'libbuild2/in')
-rw-r--r-- | libbuild2/in/init.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
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<path_target> (perform_update_id, "in", rule_); - r.insert<path_target> (perform_clean_id, "in", rule_); - r.insert<path_target> (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<path_target> (perform_update_id, "in", rule_); + bs.insert_rule<path_target> (perform_clean_id, "in", rule_); + bs.insert_rule<path_target> (configure_update_id, "in", rule_); return true; } |