diff options
Diffstat (limited to 'src/ee/tools/templates')
-rw-r--r-- | src/ee/tools/templates/build.ninja.j2 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 5c94d3e..d742791 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -12,13 +12,10 @@ pcb = {{ pcb | ninja_path }} {%- set log=log if log is defined else "--log=warn" %} 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 $@ + command = $ee kicad-gerber --pcb $in --output-dir $dir --index $out + +rule mkzip + command = $ee mkzip --include $in --zip $out rule kicad-make-bom command = $ee kicad-make-bom {{ log }} --sch $sch --out $out --uuid $uuid @@ -75,9 +72,14 @@ rule part-from-excel command = $ee part-from-excel {{ log }} --in $in --out $out --sheet "$sheet" {% if gerber_zip is defined %} +{%- set idx=(gerber_zip | parent_dir) + '/.idx' %} +build {{ idx }}: kicad-gerber $pcb + dir = {{ gerber_zip | parent_dir }} + +build {{ gerber_zip }}: mkzip {{ idx }} + build gerbers: phony {{ gerber_zip }} -build {{ gerber_zip }}: kicad-gerber $pcb - gerber_dir = {{ gerber_zip | parent_dir }} +default gerbers {%- endif %} {% if sch is defined -%} |