rake: add clean temporary files

This commit is contained in:
King Kévin 2022-06-19 17:44:30 +02:00
parent 7808946e18
commit 810700b8d1
1 changed files with 6 additions and 1 deletions

View File

@ -77,7 +77,7 @@ CLEAN.include(PANEL_DIR)
# ===============
desc "generate file with version information"
VERSIONED = [".kicad_sch", ".kicad_pcb", ".kicad_pro", ".json"] + [".xml", ".csv"]
VERSIONED = [".kicad_sch", ".kicad_pcb", ".kicad_pro", ".json"]
VERSIONED.each do |ext|
rule ".versioned" + ext => ext do |t|
sh "cp #{t.source} #{t.name}"
@ -88,6 +88,11 @@ VERSIONED.each do |ext|
CLEAN.include(["#{name}.versioned#{ext}"])
end
# temporary files created during generation
[".xml", ".csv", ".kicad_prl", ".kicad_pro-bak"].each do |ext|
CLEAN.include(["#{name}.versioned#{ext}"])
end
desc "generate printable version (PDF) of schematic"
rule ".sch.pdf" => [".versioned.kicad_sch", ".versioned.kicad_pro"] do |t|
sh "eeschema_do export #{t.prerequisites[0]} ."