BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom UC_NAME = $(shell echo $(NAME) | tr [a-z] [A-Z]) EQU = ../../dist/all.equ .PHONY: all test 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 '\' $(NAME).chr | \ grep -v '\<$(3)=[0-9][0-9.]*[fnpumkMG]\?$(4)\>' | \ $(call LIMIT,$(1)) ABSENT = @grep '\' $(NAME).chr | grep -v '\<$(3)=' | \ $(call LIMIT,$(1)) 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 '\' $(NAME).chr | grep -v '\' | \ grep -v '\