mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 01:14:04 +02:00
2744057e98
- boom/lib/e12.inc: several rules produces mal-formed results with leading zeroes - boom/manu/Makefile.common (spotless): added new target to remove $(NAME).chr - boom/manu/Makefile.common (MALFORMED): test for leading zeroes, allowing only 0R as an exception - boom/manu/stackpole/stackpole.gen: catch values < 1 R and convert them to mR
50 lines
1.1 KiB
Makefile
50 lines
1.1 KiB
Makefile
BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
|
|
|
|
UC_NAME = $(shell echo $(NAME) | tr [a-z] [A-Z])
|
|
|
|
EQU = $(shell ../../boom-config equ)
|
|
|
|
.PHONY: all test spotless sane
|
|
|
|
all: $(NAME).chr
|
|
|
|
$(NAME).chr: $(EQU) $(NAME).gen
|
|
$(BOOM) gen2chr $(UC_NAME) $^ >$@ || { rm -rf $@; exit 1; }
|
|
|
|
test:
|
|
$(BOOM) gen2chr -n $(UC_NAME) $(EQU) $(NAME).gen
|
|
|
|
LIMIT = sed '1{x;s/.*/--- $(1) ---/p;x;};6{s/.*/.../;q;}'
|
|
|
|
MALFORMED = @grep '\<T=$(2)\>' $(NAME).chr | \
|
|
grep -v '\<$(3)=\(0R\|[1-9][0-9.]*[fnpumkMG]\?$(4)\)\>' | \
|
|
$(call LIMIT,$(1))
|
|
|
|
ABSENT = @grep '\<T=$(2)\>' $(NAME).chr | grep -v '\<$(3)=' | \
|
|
$(call LIMIT,$(1))
|
|
|
|
spotless:
|
|
rm -f $(NAME).chr
|
|
|
|
sane:
|
|
@# general
|
|
|
|
$(call ABSENT,FP missing,.*,FP)
|
|
|
|
@# R
|
|
|
|
$(call MALFORMED,Malformed R=,R,R,R)
|
|
$(call ABSENT,T=R without ",R,P)
|
|
@# special case: 0R has no meaningful tolerance
|
|
@grep '\<T=R\>' $(NAME).chr | grep -v '\<R=0R\>' | \
|
|
grep -v '\<TOL=' | $(call LIMIT,T=R without TOL)
|
|
@# V is optional
|
|
@# TC ?
|
|
|
|
@# C
|
|
|
|
$(call MALFORMED,Malformed C=,C,C,F)
|
|
$(call ABSENT,T=C without M,C,M)
|
|
$(call ABSENT,T=C without V,C,V)
|
|
$(call ABSENT,T=C without TOL,C,TOL)
|