1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-16 18:51:53 +02:00

Generate script boom-config that lists all the database paths, like pkg-config

- boom/Makefile: generate boom-config
- boom/boom-config.in: template for boom-config script
- boom/Makefile (EQU, INV, DSC, CHR): use boom-config
- boom/test/Makefile (EQU, INV, DSC, CHR): use boom-config
This commit is contained in:
Werner Almesberger 2010-10-17 19:58:59 -03:00
parent 281dda5e09
commit 0a86c10803
3 changed files with 42 additions and 16 deletions

View File

@ -1,25 +1,28 @@
DIST = dk
MANU = avx johanson murata panasonic stackpole tdk yageo
EQU = dist/all.equ
INV = dist/all.inv
DSC = dist/all.dsc
CHR = $(foreach m,$(MANU),manu/$(m)/$(m).chr)
EQU = $(shell ./boom-config equ)
INV = $(shell ./boom-config inv)
DSC = $(shell ./boom-config dsc)
CHR = $(shell ./boom-config chr)
DB = $(EQU) $(INV) $(DSC) $(CHR) \
$(DIST:%=dist/%/db/*.equ) \
$(DIST:%=dist/%/db/*.inv) \
$(DIST:%=dist/%/db/*.dsc)
DB = $(EQU) $(INV) $(DSC) $(CHR)
.PHONY: all spotless tar count
all:
all: boom-config
boom-config: boom-config.in Makefile
sed 's/##DIST##/$(DIST)/;s/##MANU##/$(MANU)/' boom-config.in \
>$@ || { rm -f $@; exit 1; }
chmod 755 boom-config
spotless:
rm -f boom-config
tar:
tar cfj boom-db.tar.bz2 $(DB)
tar cfj boom-db.tar.bz2 boom-config $(DB)
count:
perl ./count.pl $(CHR)

25
boom/boom-config.in Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
DIST="##DIST##"
MANU="##MANU##"
base=`which "$0"`
base=`dirname "$base"`
[ "$base" = "${base#/}" ] && base=`pwd`/$base
[ . -ef "$base" ] && base=.
while [ "$1" ]; do
case "$1" in
equ)
for n in $DIST; do echo "$base/dist/$n/db/all.equ"; done;;
inv)
for n in $DIST; do echo "$base/dist/$n/db/all.inv"; done;;
dsc)
for n in $DIST; do echo "$base/dist/$n/db/all.dsc"; done;;
chr)
for n in $MANU; do echo "$base/manu/$n/$n.chr"; done;;
esac
shift
done
exit 0

View File

@ -2,12 +2,10 @@ BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
KITS = 1
MANU = avx johanson murata panasonic stackpole tdk yageo
EQU = ../dist/all.equ
INV = ../dist/all.inv
DSC = ../dist/all.dsc
CHR = $(foreach m,$(MANU),../manu/$(m)/$(m).chr)
EQU = $(shell ../boom-config equ)
INV = $(shell ../boom-config inv)
DSC = $(shell ../boom-config dsc)
CHR = $(shell ../boom-config chr)
.PHONY: all show again spotless