aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools/templates/build.ninja.j2
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/tools/templates/build.ninja.j2')
-rw-r--r--src/ee/tools/templates/build.ninja.j212
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2
index 5bdb686..ddb47d5 100644
--- a/src/ee/tools/templates/build.ninja.j2
+++ b/src/ee/tools/templates/build.ninja.j2
@@ -63,7 +63,7 @@ rule element14-search-parts
command = $ee element14-search-parts {{ log }} --in $in --out $out
rule create-bom
- command = $ee create-bom {{ log }} --schematic $schematic --part-db $part_dbs --out $out $strategy
+ command = $ee create-bom {{ log }} --schematic $schematic --part-db $part_dbs --out $out $strategy $args
rule split-bom-by-supplier
command = $ee split-bom-by-supplier {{ log }} --bom $in $part_dbs $suppliers $orders
@@ -95,7 +95,7 @@ default gerbers
{% if sch is defined -%}
{%- set cfg = project.cfg["kicad-project"] %}
build $public_dir/kicad/sch.xml: kicad-make-bom $sch
-{#
+{#-
build $public_dir/sch.xml: part-apply-function $public_dir/kicad/sch.xml
execution = kicad
{%- if cfg and "functions" in cfg and cfg["functions"] %}
@@ -143,7 +143,7 @@ build $public_dir/{{ s.key }}/datasheets.xml: part-download-datasheets $public_d
dir = $public_dir/{{ s.key }}/datasheets
{%- set _=datasheets.append("$public_dir/" + s.key + "/datasheets.xml") %}
-{#
+{#-
build $public_dir/{{ s.key }}/parts.xml: part-apply-function $public_dir/{{ s.key }}/downloaded.xml
execution = {{ s.key }}
{%- if cfg and "functions" in cfg and cfg["functions"] %}
@@ -153,6 +153,7 @@ build $public_dir/{{ s.key }}/parts.xml: part-apply-function $public_dir/{{ s.ke
arguments = --argument {{ cfg["function-arguments"] }}
{%- endif %}
#}
+
build $public_dir/{{ s.key }}/souffle/facts.dl: part-apply-souffle-pre $public_dir/{{ s.key }}/downloaded.xml
work = $public_dir/{{ s.key }}/souffle
@@ -164,7 +165,7 @@ build {{ s.part_db }}: part-apply-souffle-post $public_dir/{{ s.key }}/souffle/o
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
+ command = $ee {{ s.key }}-create-bom {{ log }} --bom $in --out $out $part_dbs
build {{ s.bom_output }}: {{ s.key }}-create-bom {{ s.bom_input }}
part_dbs = --part-db {{ s.part_db }}
@@ -178,6 +179,9 @@ build {{ out }}: import-parts-yaml {{ f }}
build $public_dir/bom.xml | $report_dir/bom.rst: create-bom $public_dir/sch.xml {%- for s in suppliers %} {{ s.part_db }}{% endfor %}
schematic = $public_dir/sch.xml
+{%- if project.cfg["create-bom"] and project.cfg["create-bom"]["args"] %}
+ args = {{ project.cfg["create-bom"]["args"] }}
+{%- endif %}
part_dbs = {%- for s in suppliers %} {{ s.part_db }}{% endfor %}
{%- if project.cfg["create-bom"] and project.cfg["create-bom"]["strategy"] %}
strategy = --strategy {{ project.cfg["create-bom"]["strategy"] }}