From b808c255b6a9ddba085bf5646e7d20ec344f2e2d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Apr 2020 08:48:53 +0200 Subject: Initial support for ad hoc recipes (still work in progress) --- libbuild2/recipe.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libbuild2/recipe.hxx') diff --git a/libbuild2/recipe.hxx b/libbuild2/recipe.hxx index 508c059..efd184a 100644 --- a/libbuild2/recipe.hxx +++ b/libbuild2/recipe.hxx @@ -48,6 +48,21 @@ namespace build2 LIBBUILD2_SYMEXPORT extern const recipe noop_recipe; LIBBUILD2_SYMEXPORT extern const recipe default_recipe; LIBBUILD2_SYMEXPORT extern const recipe group_recipe; + + // Ad hoc recipe. + // + // A recipe is a fragment of a rule so we handle ad hoc recipies by + // "completing" them to rules. + // + class adhoc_rule; + + struct adhoc_recipe + { + // @@ TODO: maybe we should have a small vector of actions (for dump). + // + build2::action action; + shared_ptr rule; + }; } #endif // LIBBUILD2_RECIPE_HXX -- cgit v1.1