aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-04-28 08:48:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:35:29 +0200
commit05ae6014aa01a8347844cce89085bdcb591160f0 (patch)
tree75432dccbc84dc70a55e0672c8594fc9907227fb /libbuild2/rule.hxx
parent3552356a87402727e663131994fa87f48b3cd4fb (diff)
Add ad hoc recipes plumbing
Diffstat (limited to 'libbuild2/rule.hxx')
-rw-r--r--libbuild2/rule.hxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/libbuild2/rule.hxx b/libbuild2/rule.hxx
index 9eab1f6..c15064e 100644
--- a/libbuild2/rule.hxx
+++ b/libbuild2/rule.hxx
@@ -108,6 +108,24 @@ namespace build2
noop_rule () {}
static const noop_rule instance;
};
+
+ // Ad hoc recipe rule.
+ //
+ // Note: should not be used directly (e.g., registered, etc).
+ //
+ class LIBBUILD2_SYMEXPORT adhoc_rule: public rule
+ {
+ public:
+ virtual bool
+ match (action, target&, const string&) const override;
+
+ virtual recipe
+ apply (action, target&) const override;
+
+ adhoc_rule () {}
+ static const adhoc_rule instance;
+ static const rule_match match_instance;
+ };
}
#endif // LIBBUILD2_RULE_HXX