From 545e51be154967ab3e8d82fff5f7c25487076e72 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 23 Jan 2003 16:28:10 +0000 Subject: Update tests to be somewhat consistant with the rest of the world --- test/math/Makefile | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'test/math/Makefile') diff --git a/test/math/Makefile b/test/math/Makefile index d41074939..c9231c5fc 100644 --- a/test/math/Makefile +++ b/test/math/Makefile @@ -25,8 +25,9 @@ EXTRA_LIBS=-lm PERL=/usr/bin/perl TARGETS:= -libm-tests:= +libm-tests=libm-test.c libm-tests+= test-double test-idouble +libm-tests+= diff #libm-tests+= test-float test-ifloat #libm-tests+= test-ldouble test-ildouble libm-tests.o = $(addsuffix .o,$(libm-tests)) @@ -35,7 +36,7 @@ libm-tests-generated = libm-test-ulps.h libm-test.c generated += $(libm-tests-generated) libm-test.stmp TARGETS += $(libm-tests) #$(libm-tests-generated) -all: libm-test.c $(TARGETS) +all: $(TARGETS) test-double: test-double.o $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) @@ -56,6 +57,36 @@ test-ildouble: test-ildoubl.o $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) -./$@ +rint: rint.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC) + -@ echo "-------" + -@ echo " " + -@ echo "Compiling vs uClibc: " + -@ echo " " + $(CC) $(CFLAGS) -c $< -o $@.o + $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) + $(STRIPTOOL) -x -R .note -R .comment $@ + -./$@ > $@.out 2>&1 + -@ echo " " + +rint_glibc: rint.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC) + -@ echo "-------" + -@ echo " " + -@ echo "Compiling vs glibc: " + -@ echo " " + $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o + $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) + $(STRIPTOOL) -x -R .note -R .comment $@ + -./$@ > $@.out 2>&1 + -@ echo " " + +diff: rint_glibc rint + -@ echo "-------" + -@ echo " " + -@ echo "Diffing output: " + -@ echo " " + -diff -u rint_glibc.out rint.out + -@ echo " " + test-float.o: libm-test.c test-ifloat.o: libm-test.c test-double.o: libm-test.c @@ -69,6 +100,6 @@ libm-test.c: $(ulps-file) libm-test.inc gen-libm-test.pl $(PERL) ./gen-libm-test.pl -u $< ./libm-test.inc -o "." 2>&1 > /dev/null clean: - rm -f *.[oa] *~ core $(TARGETS) $(generated) + rm -f *.[oa] *~ core $(TARGETS) $(generated) rint_glibc.out rint.out -- cgit v1.2.3