From 89197dad4f5f427faa7fba12971b20037ad5ba71 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 14 Jun 2019 10:40:31 +0200 Subject: split-parts-by-supplier: rename to split-bom-by-supplier. digikey-create-bom: Implementing CSV generation for Digi-Key. --- src/ee/tools/templates/build.ninja.j2 | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/ee/tools/templates/build.ninja.j2') diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 9fff519..1ab6102 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -56,8 +56,8 @@ rule element14-search-parts rule create-bom command = $ee create-bom {{ log }} --schematic $schematic --part-db $part_dbs --out $out $strategy -rule split-parts-by-supplier - command = $ee split-parts-by-supplier {{ log }} --parts $in --out $out $part_dbs +rule split-bom-by-supplier + command = $ee split-bom-by-supplier {{ log }} --bom $in $part_dbs $suppliers $orders rule import-parts-yaml description = import-parts-yaml $in @@ -151,6 +151,12 @@ build $public_dir/{{ s.key }}/souffle/out/fact.csv: souffle {{ alt if is_file(al build {{ s.part_db }}: part-apply-souffle-post $public_dir/{{ s.key }}/souffle/out/fact.csv in_sch = $public_dir/{{ s.key }}/downloaded.xml work = $public_dir/{{ s.key }}/souffle + +rule {{ s.key }}-create-bom + command = $ee {{ s.key }}-create-bom {{ log }} --bom $in --out $out $part_dbs --allow-incomplete + +build {{ s.bom_output }}: {{ s.key }}-create-bom {{ s.bom_input }} + part_dbs = --part-db {{ s.part_db }} {%- endfor %} {%- for f in parts_yaml_files %} @@ -167,11 +173,10 @@ build $public_dir/bom.xml | $report_dir/bom.rst: create-bom $public_dir/sch.xml {%- endif %} {%- set reports=reports+["$report_dir/bom.rst"] %} -{# -build $public_dir/orders/index.xml: split-parts-by-supplier $public_dir/bom.xml | {%- for s in suppliers %} {{ s.part_db }}{% endfor %} - part_dbs ={%- for s in suppliers %} {{ s.part_db }}{% endfor %} - suppliers = {% s for s in suppliers %} -#} +build {%- for s in suppliers %} {{ s.bom_input }}{% endfor %}: split-bom-by-supplier $public_dir/bom.xml | {%- for s in suppliers %} {{ s.part_db }}{% endfor %} + part_dbs = {%- for s in suppliers %} --part-db {{ s.part_db }}{% endfor %} + suppliers = {%- for s in suppliers %} --supplier {{ s.key }}={{ s.supplier.uri }}{% endfor %} + orders = {%- for s in suppliers %} --order {{ s.key }}={{ s.bom_input }}{% endfor %} rule seeed-download-opl description = seeed-download-opl $opl @@ -190,5 +195,6 @@ build $public_dir/seeed/opl/{{ opl }}.xml: seeed-download-opl # Reports build ee-reports: phony {{ " ".join(reports) }} -build part-dbs: phony {%- for s in suppliers %} {{ s.part_db }}{% endfor %} -build ee-all: phony ee-reports part-dbs +build ee-part-dbs: phony {%- for s in suppliers %} {{ s.part_db }}{% endfor %} +build ee-orders: phony {%- for s in suppliers %} {{ s.bom_output }}{% endfor %} +build ee-all: phony ee-reports ee-orders -- cgit v1.2.3