diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-06-14 10:40:31 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-06-14 10:40:31 +0200 |
commit | 89197dad4f5f427faa7fba12971b20037ad5ba71 (patch) | |
tree | 0124db8c8eec7f70b7169c2aa2fd67bc6c1adeb8 /src/ee/tools/templates | |
parent | d203763f31428bee3edba4383d37f992b0f8e186 (diff) | |
download | ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.tar.gz ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.tar.bz2 ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.tar.xz ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.zip |
split-parts-by-supplier: rename to split-bom-by-supplier.
digikey-create-bom: Implementing CSV generation for Digi-Key.
Diffstat (limited to 'src/ee/tools/templates')
-rw-r--r-- | src/ee/tools/templates/build.ninja.j2 | 24 |
1 files changed, 15 insertions, 9 deletions
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 |