1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-28 18:03:19 +02:00
ben-wpan/bom/dk/Makefile
Werner Almesberger 6fc656fd7f Added Digi-Key catalog data for automated BOM processing.
- bom/dk/Makefile, bom/dk/dk-db.pl: Digi-Key catalog query environment from
  gta02-core
- bom/dk/digi-key.equ: manufacturer-distributor equivalences for some parts
  used in atusd and atusb
2010-09-11 17:12:05 -03:00

38 lines
793 B
Makefile

CACHE=query.data
.PHONY: update regen regenerate clean spotless
all: digi-key.dsc digi-key.inv
$(CACHE): digi-key.equ
awk '/^#END/ { exit } /^DIGI-KEY / { print $$2 }' \
digi-key.equ | \
perl ./dk-db.pl query \
`[ -r $(CACHE) ] && echo '' -i $(CACHE)` >_$@ || \
{ rm -f $@ _$@; exit 1; }
mv _$@ $@
digi-key.dsc: $(CACHE)
perl ./dk-db.pl dsc $(CACHE) >$@ || { rm -f $@; exit 1; }
digi-key.inv: $(CACHE)
perl ./dk-db.pl inv $(CACHE) >$@ || { rm -f $@; exit 1; }
update:
$(MAKE) clean all
regen regenerate:
rm -f digi-key.dsc digi-key.inv
$(MAKE) all
clean:
rm -f $(CACHE) _$(CACHE)
#
# we don't do a "make clean" on "make spotless", so that things like "make
# optimist" don't erase the cache.
#
spotless:
rm -f digi-key.dsc digi-key.inv _$(CACHE)