sort reference designators in bill of materials
authorBdale Garbee <bdale@gag.com>
Fri, 5 Dec 2008 01:29:00 +0000 (18:29 -0700)
committerBdale Garbee <bdale@gag.com>
Fri, 5 Dec 2008 01:29:00 +0000 (18:29 -0700)
Makefile

index 523442abc1d1993039e2dbd7256051ffffdec5b4..ef83c11c6647899c01d9849054f45c8c6fe853f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,14 @@
+# intentionally want to rebuild drc and bom on every invocation
 all:   drc bom
 
 drc:   beacon.sch
        -gnetlist -g drc2 beacon.sch -o beacon.drc
 
 bom:   beacon.sch
-       gnetlist -g bom -o beacon.bom beacon.sch
+       gnetlist -g bom -o beacon.unsorted beacon.sch
+       head -n1 beacon.unsorted > beacon.bom
+       tail -n+2 beacon.unsorted | sort >> beacon.bom
+       rm -f beacon.unsorted
 
 pcb:   beacon.sch project
        gsch2pcb project
@@ -15,4 +19,4 @@ zip:  beacon.plated-drill.cnc beacon.back.gbr beacon.front.gbr beacon.fab.gbr
 clean:
        rm -f *.bom *.drc *.log *~ beacon.ps *.gbr *.cnc *bak* *- *.zip 
        rm -f *.net *.xy *.cmd
-       rm -f *.partslist *.new.pcb
+       rm -f *.partslist *.new.pcb *.unsorted