SFILES= 9733.R2.out__ gpx.R2.out__ mymachine.out__ sun3-160.R2.out__ sun3-50.R3.out__

9733.R2.out__:  9733.R2.out_

9733.R2.out_:  9733.R2.out

gpx.R2.out__:  gpx.R2.out_

gpx.R2.out_:  gpx.R2.out

mymachine.out__:  mymachine.out_

mymachine.out_:  mymachine.out

sun3-160.R2.out__:  sun3-160.R2.out_

sun3-160.R2.out_:  sun3-160.R2.out

sun3-50.R3.out__:  sun3-50.R3.out_

sun3-50.R3.out_:  sun3-50.R3.out


.SUFFIXES: .out .out_

.out.out_:
	cp $*.out $*.out_
	awk -f ../scripts/xstones.awk < $*.out >> $*.out_

.SUFFIXES: .out_ .out__

.out_.out__:
	awk -f ../scripts/summary.awk < $*.out_ > $*.out__

all:	
	echo must be called from Makefile

link:
	rm -f *.out
	ln ../results/*.out .

summary.raw: link $(SFILES)
	cat $(SFILES) > summary.raw

summary.sorted: link summary.raw
	sort -t! +9 -n -r <summary.raw >summary.sorted

summary.tbl: link summary.sorted
	-sh ../scripts/insSep.sh < summary.sorted > summary.tbl

summary.ms: link summary.tbl
	cat ../scripts/prefix.ms summary.tbl ../scripts/postfix.ms > summary.ms
	-(if grep "(2)" summary.ms > /dev/null; then\
	    echo ".br" >> summary.ms; \
	    echo "(2) corrupted benchmark data file" >> summary.ms ; \
	  fi);
	echo ".LP" >> summary.ms

detail.ms:  link
	    -rm detail.ms
	    -(for i in *.out; do     \
		awk -f ../scripts/detail.awk < $$i >> detail.ms ; \
	      done)
