From 52401b170d8f1c9deaa153acca76e7d6060a06df Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 25 Mar 2019 15:46:08 +0100 Subject: 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. --- src/ee/tools/templates/build.ninja.j2 | 6 ++++++ 1 file changed, 6 insertions(+) (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 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 -- cgit v1.2.3