aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools/templates
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-03-28 21:23:27 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-03-28 21:23:27 +0100
commitb462f533cba12d58c4b265c0a658909b0752153e (patch)
tree516491980acc26c6da4e953704563f842d7aea0a /src/ee/tools/templates
parentf0c1785f42b17b5024c3e76681c603351013c780 (diff)
downloadee-python-b462f533cba12d58c4b265c0a658909b0752153e.tar.gz
ee-python-b462f533cba12d58c4b265c0a658909b0752153e.tar.bz2
ee-python-b462f533cba12d58c4b265c0a658909b0752153e.tar.xz
ee-python-b462f533cba12d58c4b265c0a658909b0752153e.zip
create-distributor-search-list: Ignore mechanical parts.
create-order: Adding an option for a strategy to ignore/modify parts. ninja/init: Moving strategy from ninja to init so they're more persistent.
Diffstat (limited to 'src/ee/tools/templates')
-rw-r--r--src/ee/tools/templates/build.ninja.j211
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2
index 227b68c..6efe20b 100644
--- a/src/ee/tools/templates/build.ninja.j2
+++ b/src/ee/tools/templates/build.ninja.j2
@@ -43,7 +43,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
@@ -57,8 +57,10 @@ build {{ gerber_zip }}: kicad-gerber $pcb
{% if sch is defined -%}
build ee/sch.xml: kicad-make-bom $sch
- strategy ={{ " --strategy " + kicad_bom_strategy if kicad_bom_strategy else "" }}
-{% endif -%}
+{%- if project.cfg["kicad-project"]["strategy"] %}
+ strategy = --strategy {{ project.cfg["kicad-project"]["strategy"] }}
+{%- endif %}
+{%- endif %}
{% for d in distributors %}
# Distributor {{ d }}
build ee/{{ d }}/search-list.xml: part-create-distributor-search-list ee/sch.xml
@@ -80,6 +82,9 @@ 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"] %}
+ strategy = --strategy {{ project.cfg["create-order"]["strategy"] }}
+{%- endif %}
default ee/order.xml