Root/boom/manu/Makefile.common

1BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
2
3UC_NAME = $(shell echo $(NAME) | tr [a-z] [A-Z])
4
5EQU = $(shell ../../boom-config equ)
6
7.PHONY: all test spotless sane
8
9all: $(NAME).chr
10
11$(NAME).chr: $(EQU) $(NAME).gen
12        $(BOOM) gen2chr $(UC_NAME) $^ >$@ || { rm -f $@; exit 1; }
13
14test:
15        $(BOOM) gen2chr -n $(UC_NAME) $(EQU) $(NAME).gen
16
17LIMIT = sed '1{x;s/.*/--- $(1) ---/p;x;};6{s/.*/.../;q;}'
18
19MALFORMED = @grep '\<T=$(2)\>' $(NAME).chr | \
20          grep -v '\<$(3)=\(0R\|[1-9][0-9.]*[fnpumkMG]\?$(4)\)\>' | \
21          $(call LIMIT,$(1))
22
23ABSENT = @grep '\<T=$(2)\>' $(NAME).chr | grep -v '\<$(3)=' | \
24          $(call LIMIT,$(1))
25
26spotless:
27        rm -f $(NAME).chr
28
29sane:
30        @# general
31
32        $(call ABSENT,FP missing,.*,FP)
33
34        @# R
35
36        $(call MALFORMED,Malformed R=,R,R,R)
37        $(call ABSENT,T=R without ",R,P)
38        @# special case: 0R has no meaningful tolerance
39        @grep '\<T=R\>' $(NAME).chr | grep -v '\<R=0R\>' | \
40          grep -v '\<TOL=' | $(call LIMIT,T=R without TOL)
41        @# V is optional
42        @# TC ?
43
44        @# C
45
46        $(call MALFORMED,Malformed C=,C,C,F)
47        $(call ABSENT,T=C without M,C,M)
48        $(call ABSENT,T=C without V,C,V)
49        $(call ABSENT,T=C without TOL,C,TOL)
50

Archive Download this file

Branches:
master



interactive