diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-27 14:45:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-27 14:45:05 +0200 |
commit | bf959a7fc119f9156c4b84c9d0a10900d9153f8d (patch) | |
tree | d19b96238f58e305d936d186901edd1cf98e0c93 /build2/bin/rule.cxx | |
parent | 24f74ea70a19ccd7bcb489853fc73a972ab8638f (diff) |
Initial infrastructure for utility libraries
Diffstat (limited to 'build2/bin/rule.cxx')
-rw-r--r-- | build2/bin/rule.cxx | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx index b6e5a53..bb9036b 100644 --- a/build2/bin/rule.cxx +++ b/build2/bin/rule.cxx @@ -17,35 +17,22 @@ namespace build2 { namespace bin { - // obj + // fail_rule // - match_result obj_rule:: + match_result fail_rule:: match (action a, target& t, const string&) const { - fail << diag_doing (a, t) << " target group" << - info << "explicitly select obje{}, obja{}, or objs{} member"; - - return false; - } - - recipe obj_rule:: - apply (action, target&) const {return empty_recipe;} + const char* n (t.dynamic_type ().name); // Ignore derived type. - // bmi - // - match_result bmi_rule:: - match (action a, target& t, const string&) const - { fail << diag_doing (a, t) << " target group" << - info << "explicitly select bmie{}, bmia{}, or bmis{} member"; - - return false; + info << "explicitly select " << n << "e{}, " << n << "a{}, or " + << n << "s{} member" << endf; } - recipe bmi_rule:: + recipe fail_rule:: apply (action, target&) const {return empty_recipe;} - // lib + // lib_rule // // The whole logic is pretty much as if we had our two group members as // our prerequisites. |