From d9daf4c1d0abf0d93702e56028e8f746b0f475bc Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 28 Mar 2019 17:42:05 +0100 Subject: seeed-download-opl o Change to download one OPL at the time. Enables Ninja to run the downloads concurrently. init/ninja: o Learning about seeed-download-opl. --- src/ee/tools/templates/build.ninja.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ee/tools/templates') diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 080ac65..227b68c 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -82,3 +82,18 @@ build ee/order.xml | $report_dir/order.rst: create-order ee/sch.xml {%- for p in part_dbs ={%- for p in part_dbs %} {{ p }}.xml{% endfor %} default ee/order.xml + +rule seeed-download-opl + description = seeed-download-opl $opl + command = $ee seeed-download-opl --out $out --opl $opl + +{% if project.cfg.has_section("seeed-opl") -%} +{% set opls=project.cfg["seeed-opl"]["opls"].split(",") -%} +build seeed-download-opls: phony{%- for opl in opls %} ee/seeed/opl/{{ opl.strip() }}.xml{% endfor %} +{%- for opl in opls %} +{% set opl=opl.strip() -%} + +build ee/seeed/opl/{{ opl }}.xml: seeed-download-opl + opl = {{ opl }} +{% endfor -%} +{% endif -%} -- cgit v1.2.3