From c92d818f6986d5013b16a63c2c1aeaa511222479 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 1 Apr 2019 20:32:07 +0200 Subject: demo: Updating. --- demo/thirdparty/unlockoslo-alpha-3/.ee/config | 4 ---- demo/thirdparty/unlockoslo-alpha-3/build.ninja | 7 +++++-- demo/thirdparty/unlockoslo-alpha-3/eeconfig | 4 ++++ src/ee/tools/templates/build.ninja.j2 | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 demo/thirdparty/unlockoslo-alpha-3/.ee/config create mode 100644 demo/thirdparty/unlockoslo-alpha-3/eeconfig diff --git a/demo/thirdparty/unlockoslo-alpha-3/.ee/config b/demo/thirdparty/unlockoslo-alpha-3/.ee/config deleted file mode 100644 index c7e2990..0000000 --- a/demo/thirdparty/unlockoslo-alpha-3/.ee/config +++ /dev/null @@ -1,4 +0,0 @@ -[kicad-project] -sch = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.sch -pcb = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.kicad_pcb - diff --git a/demo/thirdparty/unlockoslo-alpha-3/build.ninja b/demo/thirdparty/unlockoslo-alpha-3/build.ninja index 3bf21f6..9ed567f 100644 --- a/demo/thirdparty/unlockoslo-alpha-3/build.ninja +++ b/demo/thirdparty/unlockoslo-alpha-3/build.ninja @@ -39,7 +39,7 @@ rule element14-normalize-facts rule create-order description = create-order - command = $ee create-order --schematic $schematic --part-db $part_dbs --out $out + command = $ee create-order --schematic $schematic --part-db $part_dbs --out $out $strategy rule import-parts-yaml description = import-parts-yaml $in @@ -51,7 +51,6 @@ build prod/gerber.zip: kicad-gerber $pcb gerber_dir = prod build ee/sch.xml: kicad-make-bom $sch - strategy = # Distributor digikey build ee/digikey/search-list.xml: part-create-distributor-search-list ee/sch.xml @@ -68,3 +67,7 @@ build ee/order.xml | $report_dir/order.rst: create-order ee/sch.xml ee/digikey/n part_dbs = ee/digikey/normalized.xml default ee/order.xml + +rule seeed-download-opl + description = seeed-download-opl $opl + command = $ee seeed-download-opl --out $out --opl $opl diff --git a/demo/thirdparty/unlockoslo-alpha-3/eeconfig b/demo/thirdparty/unlockoslo-alpha-3/eeconfig new file mode 100644 index 0000000..c7e2990 --- /dev/null +++ b/demo/thirdparty/unlockoslo-alpha-3/eeconfig @@ -0,0 +1,4 @@ +[kicad-project] +sch = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.sch +pcb = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.kicad_pcb + diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 6efe20b..2a56bdc 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -82,7 +82,7 @@ build {{ out }}: import-parts-yaml {{ f }} build ee/order.xml | $report_dir/order.rst: create-order ee/sch.xml {%- for p in part_dbs %} {{ p }}.xml{% endfor %} schematic = ee/sch.xml part_dbs ={%- for p in part_dbs %} {{ p }}.xml{% endfor %} -{%- if project.cfg["create-order"]["strategy"] %} +{%- if project.cfg["create-order"] and project.cfg["create-order"]["strategy"] %} strategy = --strategy {{ project.cfg["create-order"]["strategy"] }} {%- endif %} @@ -92,7 +92,7 @@ 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") -%} +{%- 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 %} @@ -101,4 +101,4 @@ build seeed-download-opls: phony{%- for opl in opls %} ee/seeed/opl/{{ opl.strip build ee/seeed/opl/{{ opl }}.xml: seeed-download-opl opl = {{ opl }} {% endfor -%} -{% endif -%} +{% endif %} -- cgit v1.2.3