From a0e8b4af22c6638857482eb9f22d5b69d5ef1d11 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 14 Aug 2015 12:17:48 +0200 Subject: [PATCH] toolchain: add optional_depends property to let a recipe explain which other recipe can be used with. --- toolchain.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolchain.py b/toolchain.py index d2b253c..45d820a 100755 --- a/toolchain.py +++ b/toolchain.py @@ -352,6 +352,7 @@ class Recipe(object): url = None archs = [] depends = [] + optional_depends = [] library = None libraries = [] include_dir = None @@ -905,6 +906,14 @@ def build_recipes(names, ctx): for depend in recipe.depends: graph.add(name, depend) recipe_to_load += recipe.depends + for depend in recipe.optional_depends: + # in case of compilation after the initial one, take in account + # of the already compiled recipes + key = "{}.build_all".format(name) + if key in ctx.state: + graph.add(name, depend) + else: + graph.add_optional(name, depend) recipe_loaded.append(name) build_order = list(graph.find_order())