From b462f533cba12d58c4b265c0a658909b0752153e Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 28 Mar 2019 21:23:27 +0100 Subject: 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. --- src/ee/tools/templates/build.ninja.j2 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (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 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 -- cgit v1.2.3