aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools/templates
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-03-25 15:46:08 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-03-25 15:46:08 +0100
commit52401b170d8f1c9deaa153acca76e7d6060a06df (patch)
treeffbe1722e5c88ab841fd8661ca085a1b1cdf7842 /src/ee/tools/templates
parent50ee4b871bc9d0076cabaa5d2ea4ad1ba7b8e15a (diff)
downloadee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.tar.gz
ee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.tar.bz2
ee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.tar.xz
ee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.zip
New command: init. Looks for kicad schematic and pcb files, creates
.ee/config. ninja tool: o Use project's config to check for sch and pcb files. o Use some more conditionals in build.ninja.j2. unlockoslo: Adding demo project.
Diffstat (limited to 'src/ee/tools/templates')
-rw-r--r--src/ee/tools/templates/build.ninja.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2
index 514e177..080ac65 100644
--- a/src/ee/tools/templates/build.ninja.j2
+++ b/src/ee/tools/templates/build.ninja.j2
@@ -1,8 +1,12 @@
ee = {{ ee }}
report_dir = {{ project.report_dir }}
+{%- if sch is defined %}
sch = {{ sch | ninja_path }}
sch_files = {{ sch_files | ninja_path }}
+{%- endif %}
+{%- if pcb is defined %}
pcb = {{ pcb | ninja_path }}
+{%- endif %}
rule kicad-gerber
description = kicad-gerber
@@ -51,8 +55,10 @@ build {{ gerber_zip }}: kicad-gerber $pcb
gerber_dir = {{ gerber_zip | parent_dir }}
{%- endif %}
+{% if sch is defined -%}
build ee/sch.xml: kicad-make-bom $sch
strategy ={{ " --strategy " + kicad_bom_strategy if kicad_bom_strategy else "" }}
+{% endif -%}
{% for d in distributors %}
# Distributor {{ d }}
build ee/{{ d }}/search-list.xml: part-create-distributor-search-list ee/sch.xml