add file descriptions

This commit is contained in:
King Kévin 2013-10-11 14:21:04 +02:00
parent a205bf6418
commit 08381458b6
1 changed files with 7 additions and 0 deletions

View File

@ -119,6 +119,7 @@ CLEAN.include("attribs")
# file generation
# ===============
desc "copy schematic to version it: include version, revision, and date"
file vsch => sch do |t|
sh "cp #{t.prerequisites.join(' ')} #{t.name}"
# on \ is to prevent ruby interpreting it, th other is for sed
@ -145,16 +146,19 @@ file vpcb => pcb do |t|
end
end
desc "generate printable version (PDF) of schematic"
file "#{target}_schematic.pdf" => vsch do |t|
sh "gaf export -f pdf -c -o #{t.name} #{t.prerequisites.join(' ')} 2> /dev/null"
end
desc "generate printable documentation (PDF) from layout"
file "#{target}_layout.pdf" => vpcb do |t|
sh "pcb -x ps --psfile #{t.name}.ps #{t.prerequisites.join(' ')} 2> /dev/null"
sh "ps2pdf #{t.name}.ps #{t.name} 2> /dev/null"
sh "rm #{t.name}.ps 2> /dev/null"
end
desc "generate note file from schematich, listing the 'note' attributes from elements"
file "notes.txt" => vsch do |t|
notes_data = bom2(t.prerequisites[0],"note")
File.open(t.name,"w") do |notes_file|
@ -165,14 +169,17 @@ file "notes.txt" => vsch do |t|
end
end
desc "generate photo realistich picture from layout (front side)"
file "#{target}_layout-top.png" => vpcb do |t|
sh "pcb -x png --dpi 600 --format PNG --photo-mode --outfile #{target}_layout-top.png #{t.prerequisites.join(' ')}"
end
desc "generate photo realistich picture from layout (bottom side)"
file "#{target}_layout-bottom.png" => vpcb do |t|
sh "pcb -x png --dpi 600 --format PNG --photo-mode --photo-flip-x --outfile #{target}_layout-bottom.png #{t.prerequisites.join(' ')}"
end
desc "export gerber (and drill) files from layout"
GERBERS.each do |gerber|
file gerber => vpcb do |t|
puts "make #{t.name}"