aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools/templates/build.ninja.j2
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/tools/templates/build.ninja.j2')
-rw-r--r--src/ee/tools/templates/build.ninja.j215
1 files changed, 15 insertions, 0 deletions
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 -%}