diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-04 00:06:32 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-04 00:06:32 +0100 |
commit | 5a6ab34565fa3d783337a68e07e3500361c8fcf5 (patch) | |
tree | c0d4fd9f6986351a543838fabc3dacf8d9ad5fb1 /src/ee/tools/templates | |
parent | 650b4ad3774c4cc454a02073808d981f6873036d (diff) | |
download | ee-python-5a6ab34565fa3d783337a68e07e3500361c8fcf5.tar.gz ee-python-5a6ab34565fa3d783337a68e07e3500361c8fcf5.tar.bz2 ee-python-5a6ab34565fa3d783337a68e07e3500361c8fcf5.tar.xz ee-python-5a6ab34565fa3d783337a68e07e3500361c8fcf5.zip |
o PartDB: don't die if the directory exist *and* is empty. Ninja creates
empty parent directories.
o PartDB: escape some path names.
o new comamnd: "ninja". Generates a build.ninja from a sch. Not done!
Diffstat (limited to 'src/ee/tools/templates')
-rw-r--r-- | src/ee/tools/templates/build.ninja.j2 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 new file mode 100644 index 0000000..79a2bc1 --- /dev/null +++ b/src/ee/tools/templates/build.ninja.j2 @@ -0,0 +1,53 @@ +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_dir + command = $ee kicad-make-bom --sch $sch --out $out_dir $strategy + +rule part-create-distributor-search-list + description = part-create-distributor-search-list distributor=$distributor $in_dir => $out_dir + command = $ee part-create-distributor-search-list --in $in_dir --out $out_dir + +rule digikey-search-parts + description = digikey-search-parts + command = $ee digikey-search-parts --in $in_dir --out $out_dir + +rule digikey-normalize-facts + description = digikey-normalize-facts + command = $ee digikey-normalize-facts --in $in_dir --out $out_dir + +{% 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/index.xml: kicad-make-bom $sch + out_dir = ee/sch + strategy = {{ "--strategy " + kicad_bom_strategy if kicad_bom_strategy else "" }} + +build ee/digikey/search-list/index.xml: part-create-distributor-search-list ee/sch/index.xml + in_dir = ee/sch + out_dir = ee/digikey/search-list + +build ee/digikey/downloaded/index.xml: digikey-search-parts ee/digikey/search-list/index.xml + in_dir = ee/digikey/search-list + out_dir = ee/digikey/downloaded + +build ee/digikey/normalized/index.xml: digikey-normalize-facts ee/digikey/downloaded/index.xml + in_dir = ee/digikey/downloaded + out_dir = ee/digikey/normalized + +default ee/digikey/normalized/index.xml |