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:
parent
281dda5e09
commit
0a86c10803
@ -1,25 +1,28 @@
|
|||||||
DIST = dk
|
DIST = dk
|
||||||
MANU = avx johanson murata panasonic stackpole tdk yageo
|
MANU = avx johanson murata panasonic stackpole tdk yageo
|
||||||
|
|
||||||
EQU = dist/all.equ
|
EQU = $(shell ./boom-config equ)
|
||||||
INV = dist/all.inv
|
INV = $(shell ./boom-config inv)
|
||||||
DSC = dist/all.dsc
|
DSC = $(shell ./boom-config dsc)
|
||||||
CHR = $(foreach m,$(MANU),manu/$(m)/$(m).chr)
|
CHR = $(shell ./boom-config chr)
|
||||||
|
|
||||||
DB = $(EQU) $(INV) $(DSC) $(CHR) \
|
DB = $(EQU) $(INV) $(DSC) $(CHR)
|
||||||
$(DIST:%=dist/%/db/*.equ) \
|
|
||||||
$(DIST:%=dist/%/db/*.inv) \
|
|
||||||
$(DIST:%=dist/%/db/*.dsc)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all spotless tar count
|
.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:
|
spotless:
|
||||||
|
rm -f boom-config
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
tar cfj boom-db.tar.bz2 $(DB)
|
tar cfj boom-db.tar.bz2 boom-config $(DB)
|
||||||
|
|
||||||
count:
|
count:
|
||||||
perl ./count.pl $(CHR)
|
perl ./count.pl $(CHR)
|
||||||
|
25
boom/boom-config.in
Normal file
25
boom/boom-config.in
Normal 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
|
@ -2,12 +2,10 @@ BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
|
|||||||
|
|
||||||
KITS = 1
|
KITS = 1
|
||||||
|
|
||||||
MANU = avx johanson murata panasonic stackpole tdk yageo
|
EQU = $(shell ../boom-config equ)
|
||||||
|
INV = $(shell ../boom-config inv)
|
||||||
EQU = ../dist/all.equ
|
DSC = $(shell ../boom-config dsc)
|
||||||
INV = ../dist/all.inv
|
CHR = $(shell ../boom-config chr)
|
||||||
DSC = ../dist/all.dsc
|
|
||||||
CHR = $(foreach m,$(MANU),../manu/$(m)/$(m).chr)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all show again spotless
|
.PHONY: all show again spotless
|
||||||
|
Loading…
Reference in New Issue
Block a user