ee = {{ eeĀ }} sch = {{ sch | ninja_path }} sch_files = {{ sch_files | ninja_path }} pcb = {{ pcb | ninja_path }} rule kicad-gerber description = kicad-gerber command = $ee kicad-gerber $ --output-dir $gerber_dir $ --pcb $pcb # mkdir -p $( # (cd $(GERBER_DIR); zip tmp.zip $(foreach GBR,$(GERBERS),$(notdir $(GBR)))) # mv $(GERBER_DIR)/tmp.zip $@ rule kicad-make-bom description = kicad-make-bom $out command = $ee kicad-make-bom --sch $sch --out $out $strategy rule part-create-distributor-search-list description = part-create-distributor-search-list distributor: $distributor command = $ee part-create-distributor-search-list --in $in --out $out rule digikey-search-parts description = digikey-search-parts command = $ee digikey-search-parts --in $in --out $out rule digikey-normalize-facts description = digikey-normalize-facts command = $ee digikey-normalize-facts --in $in --out $out rule element14-search-parts description = element14-search-parts command = $ee element14-search-parts --in $in --out $out rule element14-normalize-facts description = element14-normalize-facts command = $ee element14-normalize-facts --in $in --out $out rule create-order description = create-order command = $ee create-order --schematic $schematic --part-db $part_dbs --out $out rule import-parts-yaml description = import-parts-yaml $in command = $ee import-parts-yaml --in $in --out $out {% if gerber_zip is defined %} build gerbers: phony {{ gerber_zip }} build {{ gerber_zip }}: kicad-gerber $pcb gerber_dir = {{ gerber_zip | parent_dir }} {%- endif %} build ee/sch.xml: kicad-make-bom $sch strategy = {{ "--strategy " + kicad_bom_strategy if kicad_bom_strategy else "" }} {%- for d in distributors %} # Distributor {{ d }} build ee/{{ d }}/search-list.xml: part-create-distributor-search-list ee/sch.xml distributor = {{ d }} build ee/{{ d }}/downloaded.xml: {{ d }}-search-parts ee/{{ d }}/search-list.xml build ee/{{ d }}/normalized.xml: {{ d }}-normalize-facts ee/{{ d }}/downloaded.xml default ee/{{ d }}/normalized.xml {%- endfor %} {%- for f in parts_yaml_files %} {% set out=(f | parent_dir) / ((f | noext) + ".xml") %} build {{ out }}: import-parts-yaml {{ f }} # default {{ out }} {% endfor %} build ee/order.xml: create-order ee/sch.xml {%- for p in part_dbs %} {{ p }}.xml{% endfor %} schematic = ee/sch.xml part_dbs ={%- for p in part_dbs %} {{ p }}.xml{% endfor %} default ee/order.xml