Generate .zip file more cleanly
authorKeith Packard <keithp@keithp.com>
Tue, 11 Sep 2012 05:50:23 +0000 (22:50 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 11 Sep 2012 05:50:23 +0000 (22:50 -0700)
Correct the dependencies so that the contents of the zip file get
generated when the .pcb file changes.

Don't require an explicit list of the zip file contents in the Makefile.

Signed-off-by: Keith Packard <keithp@keithp.com>
Makefile

index 483c422987a090b934e6c0b6243f49abe3a2b75a..49aff34c12c11f81dfdc6755b1850178c2b8bd2e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,14 +43,19 @@ push:
 $(PROJECT).xy: $(PROJECT).pcb
        pcb -x bom $(PROJECT).pcb
 
-$(PROJECT).back.gbr:   $(PROJECT).pcb
+$(PROJECT).gerb: $(PROJECT).pcb
+       rm -f *.gbr *.cnc
        pcb -x gerber $(PROJECT).pcb
+       touch $@
 
-zip:   $(PROJECT).bottom.gbr $(PROJECT).bottommask.gbr $(PROJECT).fab.gbr $(PROJECT).top.gbr $(PROJECT).topmask.gbr $(PROJECT).toppaste.gbr $(PROJECT).topsilk.gbr $(PROJECT).plated-drill.cnc $(PROJECT).xy  Makefile # $(PROJECT).xls
-       zip $(PROJECT).zip $(PROJECT).*.gbr $(PROJECT).*.cnc $(PROJECT).xy # $(PROJECT).xls
+zip: $(PROJECT).zip
+
+$(PROJECT).zip: $(PROJECT).gerb $(PROJECT).xy
+       rm -f $(PROJECT).zip
+       zip $(PROJECT).zip *.gbr *.cnc *.xy
 
 clean:
-       rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr *.cnc *bak* *- *.zip 
+       rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr $(PROJECT).gerb *.cnc *bak* *- *.zip 
        rm -f *.net *.xy *.cmd *.png partslist partslist.csv
        rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls